Commit Graph

180 Commits

Author SHA1 Message Date
Steve Sanderson a1d49e19b5 Revert feature that resets unspecified parameters to default(type). Fixes #6864 (#6931) 2019-01-22 16:16:07 -08:00
Steve Sanderson c901cc069d Rename IBlazorApplicationBuilder->IComponentsApplicationBuilder 2019-01-18 14:22:37 -08:00
Nate McMaster 5a70f5312f
Convert Components projects to use ProjectRef (#6698)
This addresses #4246 for src/Components/. A few other changes were necessary because components had been using stale dependencies.
2019-01-16 12:28:04 -08:00
Pranav K b56c589773
Dispose components on client disconnects (#6693)
* Dispose components on client disconnects
Fixes https://github.com/aspnet/AspNetCore/issues/4047
2019-01-15 14:52:40 -08:00
Steve Sanderson cbbdeaefd4
Enforce correct sync context on render, and allow explicit dispatch to sync context. Fixes #5639 (#6604)
* Only use async marshalling to renderer sync context when necessary

Note that the lifecycle methods already take care of capturing the correct sync context, so continuations will already be serialized.
Avoiding an extra layer of asynchrony keeps the semantics of rendering closer to the WebAssembly cases, and will fix a range of intermittent errors in the wild.

* Add E2E test of triggering rendering from outside the sync context

* Actually throw if attempting to render from incorrect sync context

* Add "Dispatch" API

* Handle dispatch within dispatch. Also test Dispatch on WebAssembly.

* Avoid heap allocation

* Simplify E2E test

* Replace Dispatch() with Invoke() and InvokeAsync()

* Add E2E test to validate async execution order

* Clean up
2019-01-14 15:31:53 +00:00
Steve Sanderson 70cdf11f76
Make Razor Components apps not use Blazor build (#6562)
* Replace UseServerSideBlazor with UseRazorComponents, which doesn't require Blazor build artifacts

* Make UseRazorComponents serve blazor.server.js from embedded resource

... so we don't need a build step to put it on disk somewhere.

* Fix TestServer

* Update ComponentsApp not to use Blazor build targets

* Update ComponentsApp.App sample to use new build package

* Update string constant in test

* Rename blazor.*.js to components.*.js

* Ensure correct build order

* Update nav menu title in Components sample app

* Fix remaining paths

* Switch ComponentsApp.App to use Sdk="Microsoft.NET.Sdk.Razor"

* Update mono.cecil version

* CR: Replace FrameworkFilesProvider with EmbeddedFileProvider

* CR: Use ManifestEmbeddedFileProvider
2019-01-11 16:14:11 +00:00
Steve Sanderson 8446b260d9
Split .Components.Build into .Blazor.Build+.Components.Build (#6538)
* Move Components.Build to blazor/src/. No content changes yet.

* Rename Components.Build to Blazor.Build and update file paths

* Move Components.Build.Test files. No content changes yet.

* Update contents in Blazor.Test

* Fix names of props/targets files

* Add minimal Components.Build package that just imports Razor targets and analyzer

* Make Blazor.Build depend on Components.Build and get Razor compilation targets from there

* Fix version of reference from .Blazor.Build to .Components.Build

* Fix signing error on local builds

* Update artifacts.props
2019-01-10 11:23:36 +00:00
Pranav K 6b0c0761a4 Avoid doing selenium 2019-01-09 17:17:22 -08:00
Steve Sanderson 326e329018
Run components E2E tests in CI (#5158)
* Auto-install local copy of selenium-standalone on build

* Automatically start/stop selenium-standalone when running E2E tests

* Update after rebase

* Exclude node_modules from E2ETests project

* Avoid deadlocks

* Include E2E tests when running all tests in src/Components

* Be more forgiving about waiting for selenium-server to be ready

* Update usage of shared source file
2019-01-08 16:07:07 +00:00
Ryan Nowak 9003c3cd75 PR Feedback
From:
2cb3964411..45adea0c6d (diff-9328b73f3a66921c3ef3fa8a4ce90031)
2019-01-04 13:38:32 -08:00
Ryan Nowak b1f4a7bafd Delete baseline files 2019-01-02 00:32:09 -08:00
Ryan Nowak 0dd1bf8cd3 Make the tests pass
- Remove baseline tests. Those live with tooling
- Unskip tests that should have been fixed years ago
- Fix rendering test infrastructure
2019-01-02 00:32:09 -08:00
Ryan Nowak bdb5982dbd Remove Blazor Compiler 2019-01-02 00:32:09 -08:00
Ryan Nowak 9e89a69a78 Update RazorCompilation.targets for new SDK 2019-01-02 00:32:09 -08:00
Ryan Nowak 4424594c9b Allow build to specify Razor SDK version 2019-01-02 00:32:09 -08:00
Ryan Nowak 688ab7fc49 Fix dotnet-blazor serve
This wasn't properly forwarding the base path to the configuration.
Basically nothing was setting RemainingArguments. We have a test project
that sets the base path, but it was never used when debugging locally.

I also cleaned this up a bit and changed it to use dotnet exec. This
allow you to debug the CLI and related server pipeline, but has the
tradeoff of not rebuilding.
2019-01-02 00:32:09 -08:00
Ajay Bhargav Baaskaran ffec555118 Added missed files 2018-12-18 15:35:38 -08:00
Ajay Bhargav Baaskaran 2a696f6a1c Merge branch 'release/2.2' 2018-12-18 12:50:01 -08:00
Steve Sanderson ceb1c8e562
Refactor Components.Browser package (#5166)
* Add empty Microsoft.AspNetCore.Blazor project

* Reorganize Blazor-specific parts of .Components.Browser into Microsoft.AspNetCore.Blazor. Delete redundant Components-CSharp template (it now ships from Templating).

* Fix unit test

* Add missing assembly description

* Move WebAssemblyBlazorApplicationBuilder

* Rename BrowserHttpMessageHandler -> WebAssemblyHttpMessageHandler

* Delete obsolete BrowserServiceProvider. Rename BrowserRenderer -> WebAssemblyRenderer.

* Rename BrowserUriHelper -> WebAssemblyUriHelper

* Remove redundant ActivateMonoJSRuntime helper

* Fix namespace

* Remove redundant MicrosoftNETCoreAppPackageVersion override

* Update test namespaces
2018-12-18 12:32:57 +00:00
Javier Calvarro Nelson 436b5461ad
[Components] Create a renderer to render components into HTML (#4463)
* Adds an HtmlRenderer to Microsoft.AspNetCore.Components
 * It renders the component into a list of strings.
 * It only handles synchronous rendering.
2018-12-14 21:28:05 +01:00
Steve Sanderson ec9676f51e
Make component parameter analyzer allow public getters. Imported from Blazor PR 1702. (#4594) 2018-12-14 18:50:45 +00:00
Steve Sanderson d30c407dd0
Support IServiceProviderFactory in WebAssemblyHostBuilder (imported from Blazor PR 1623) (#4785) 2018-12-14 17:37:14 +00:00
Steve Sanderson 343208331d
Replace AssignToProperties with SetParameterProperties, which also clears unspecified parameter properties (imported from Blazor PR 1108) (#4797) 2018-12-14 17:07:07 +00:00
Steve Sanderson 3757908b14
Fallback for Components router (imported from Blazor PR 1534) (#4794) 2018-12-14 17:06:47 +00:00
Steve Sanderson e768a78c2b
Ensure ComponentBase async lifecycle methods return non-null task (imported from Blazor PR 1620) (#4790) 2018-12-14 17:06:30 +00:00
Steve Sanderson 8a9df6c873
HttpClientJsonExtensions better handling for failed requests (imported from Blazor PR 1660) (#4788) 2018-12-14 17:06:03 +00:00
Steve Sanderson 93127b39e8
Overload UriHelper to forceLoad the page (imported from Blazor PR 1154) (#4786) 2018-12-14 17:05:45 +00:00
Steve Sanderson 8fbb9fb0e6
Add support for binding decimal? double? float? long? int? bool? (imported from Blazor PR 1658) (#4600) 2018-12-14 17:05:22 +00:00
Steve Sanderson 5c1fbe1af7
Run Components on netcoreapp3.0 (#4391) 2018-12-05 14:46:26 +00:00
Steve Sanderson 07e2d5420c Move all Components sources into src/Components 2018-11-27 11:03:30 +00:00