Steve Sanderson
cf237707f9
Log info message if IL linking is disabled. Fixes #302
2018-03-20 22:28:43 +00:00
Steve Sanderson
3e4ba1a35f
Add survey links to templates. Fixes #221
2018-03-20 22:27:29 +00:00
Steve Sanderson
678721cbad
In hosted template, enable response compression for .wasm
2018-03-20 20:07:25 +00:00
Steve Sanderson
4eb78b3a8f
Add global.json files to templates. Implements #300 .
2018-03-20 19:45:43 +00:00
Steve Sanderson
4a8dc5c4a6
Add missing quotes to illink command. Fixes #301 .
2018-03-20 19:42:25 +00:00
Steve Sanderson
f703732e98
In templates, update _ViewImports/NavMenu to match updated APIs
2018-03-20 13:59:20 +00:00
Steve Sanderson
aa43496d00
Update templates to Blazor 0.1.0-preview1-10112
2018-03-20 13:29:53 +00:00
Steve Sanderson
1760688d24
In BlazorComponent, add OnParametersSetAsync and make SetParameters overridable
2018-03-20 13:15:40 +00:00
Steve Sanderson
5bf0b891e9
In NavLink, support matching either complete URLs or just URL prefixes (both are necessary for typical nav menus)
2018-03-20 13:15:37 +00:00
Steve Sanderson
d921705881
Add ParameterCollection.GetValueOrDefault methods
2018-03-20 12:18:44 +00:00
Steve Sanderson
a88ab0db49
Support route constraints of the form ":type" (e.g, ":int", ":guid", etc.)
2018-03-20 10:17:00 +00:00
Steve Sanderson
c58df0b739
Temporary workaround for #219 ("data-" attributes don't compile)
2018-03-19 18:09:53 +00:00
Steve Sanderson
58cc946a88
Update templates to use new @page routing feature
2018-03-19 13:18:42 +00:00
Steve Sanderson
139601894a
Update templates to Blazor 0.1.0-preview1-10107
2018-03-19 13:13:07 +00:00
Javier Calvarro Nelson
70c4501497
[ Fixes #220 ] Support `@page` with custom route template on components
...
* Updates the router component to scan for components within assemblies.
* Parses the templates on `[Route]` in component instances and builds a
route table that maps paths to components.
* Uses the route table to map paths to components.
2018-03-16 19:15:00 -07:00
Steve Sanderson
2150820efe
Implement Blazor.navigateTo for triggering navigation from JS code, and use it in E2E tests
2018-03-16 16:55:46 +00:00
Steve Sanderson
0cfb25e2ad
Enable Razor build server by default
2018-03-16 12:49:59 +00:00
Steve Sanderson
d0731c337d
Add IUriHelper.NavigateTo
2018-03-16 11:19:09 +00:00
Steve Sanderson
a02ac60c8c
Fix selection on <select> box. Fixes #157
2018-03-16 10:27:26 +00:00
Steve Sanderson
03ac95f086
A better fix for the VS publishing hosted projects issue ( #274 )
2018-03-16 09:13:48 +00:00
Steve Sanderson
4202a6c9e1
In JsonUtil, support DateTimeOffset. Fixes #218 .
2018-03-15 17:25:50 +00:00
Steve Sanderson
e0481e1276
Update templates to Blazor 0.1.0-preview1-10098
2018-03-15 17:06:09 +00:00
Steve Sanderson
eb727c0464
In standalone template, generate a launchSettings.json that doesn't have
...
IISExpress. Fixes #235
2018-03-15 17:03:54 +00:00
Steve Sanderson
1d31a80b50
Apply equivalent change to BlazorHosted.CSharp.Client
2018-03-15 13:38:55 +00:00
Pranav K
b0d4e43a75
Make things build with preview1 SDK without warnings
2018-03-15 13:28:02 +00:00
Steve Sanderson
eb0a0a8154
Due to #267 , revert "In templates, specify blazor-dev feed in csproj instead of NuGet.config. Fixes #255 "
...
This reverts commit d75e518ed0b9c22f80955261e98ad368d8e5ac65.
2018-03-15 13:04:33 +00:00
Steve Sanderson
2176aa8c87
Stop IL linker from stripping System.Threading.WasmRuntime. Fixes #239
2018-03-15 09:26:53 +00:00
Steve Sanderson
fa54b0ab6e
Update templates to Blazor 0.1.0-preview1-10092
2018-03-14 14:32:41 +00:00
Steve Sanderson
75958845d2
Temporary workaround for #261 . Still need a proper fix.
2018-03-14 13:36:32 +00:00
Steve Sanderson
1d4ed4c0d6
In templates, specify blazor-dev feed in csproj instead of NuGet.config. Fixes #255
2018-03-14 12:13:16 +00:00
Steve Sanderson
5fce1edc99
Update templates to Blazor 0.1.0-preview1-10090
2018-03-14 12:09:54 +00:00
Steve Sanderson
f7830e7b77
Publishing support
2018-03-14 11:23:43 +00:00
Javier Calvarro Nelson
04df5491c2
[ Fixes #254 ] Microsoft.AspNetCore.Blazor.Build fails to build when referenced as a package.
2018-03-14 11:23:43 +00:00
Javier Calvarro Nelson
07d00442b1
Fix incremental builds
2018-03-14 11:23:43 +00:00
Steve Sanderson
0e9d52fe11
Support components and static content in external NuGet packages ( #247 )
...
* On build, drop <BlazorPackageContentFiles> items into dist\_content\(PackageName)\
* Add <script> and <link> tags to generated index.html
* Add testapp coverage of external content package. Still need to add E2E tests that uses it.
* Add missing unit test update
* Add example of packaging an entire Blazor component including CSS and images
* Add E2E test for component from NuGet package
2018-03-14 11:23:43 +00:00
Ryan Nowak
9549dccc54
Add @page directive
...
Adds the @page directive and support for specifying routes in components
at compile time.
For now the route is required and must begin with a leading /.
2018-03-14 11:23:43 +00:00
Javier Calvarro Nelson
700c2203c6
[ Fixes #66 ] Adds linking support to the build
...
* Switch the tasks used to generate the blazor output to be MSBuild based.
* Package the optimized mono runtime and the BCL inside a nuget package.
* Add opt-in support for linking the application on build.
* Make the whole build process incremental.
2018-03-14 11:23:43 +00:00
Ryan Nowak
ffadeecb45
Remove old <c:Foo> syntax
2018-03-14 11:23:42 +00:00
Ryan Nowak
d175b4d38a
Konvert to KoreBuild
2018-03-14 11:23:42 +00:00
Ryan Nowak
0c162e8c5a
Allow non-property attributes to be set
...
This removes a limitation that prevented callers from passing
attributes to a component that aren't backed by properties.
The majority of the complication here is required to deal with the more
sophisticated way that HTML attributes are represented in the Razor IR.
2018-03-14 11:23:42 +00:00
Ryan Nowak
c05657c7f2
Add support general delegate types
...
This builds upon existing support for UIEventHandler-typed component
properties and applies the same principle to any delegate type.
We try to help by generating the LSH of the lambda `=>` allowing you to
write `OnClick="Foo()"` rather than `OnClick="(e) => Foo()"`. You can of
course use @ as an escape.
The only rough edge here is that if the parameter names aren't memorable
for the delgate type, it's not super helpful.
2018-03-14 11:23:42 +00:00
Steve Sanderson
d1cfe0191a
Update templates to Blazor 0.1.0-preview1-10071 again, now the CI builds
...
are running again
2018-03-14 11:23:42 +00:00
Steve Sanderson
9027f82928
Revert "Update templates to Blazor 0.1.0-preview1-10071"
...
This reverts commit b448a5d096a27de5c8e700e43a264673de16b632.
This is because CI is currently unable to complete the signing process
so we can't upload that particular build.
2018-03-14 11:23:42 +00:00
Steve Sanderson
13719a60ea
Update templates to Blazor 0.1.0-preview1-10071
2018-03-14 11:23:41 +00:00
Steve Sanderson
0c736300d5
Update BlazorHosted template content to new APIs
2018-03-14 11:23:41 +00:00
Steve Sanderson
9f34048633
Update BlazorStandalone template content to new APIs
2018-03-14 11:23:41 +00:00
Steve Sanderson
2d2b1d335e
Update templates to Blazor 0.1.0-preview1-10069
2018-03-14 11:23:41 +00:00
Ryan Nowak
601e7914f7
Implement components as tag helpers
...
Implements Component code generation and tooling support end to end
udditionally adds some default `@addTagHelper` directives to make
programming in Blazor a little nicer.
Components are discovered as Tag Helpers using Razor's extensibility
during the build/IDE process. This drives the code generation during
build and lights up a bunch of editor features.
Add
2018-03-14 11:23:41 +00:00
Ryan Nowak
b47e3095ee
Add Razor SDK and packages to templates
2018-03-14 11:23:41 +00:00
Ryan Nowak
adf4674955
Fix clean builds
...
This got out of date with my other changes
2018-03-14 11:23:40 +00:00
Ryan Nowak
211561a6a6
Implement 2-phase compilation
...
This is a working (all tests passing) implementation of the two-phase
compilation system we will need for component discovery.
This builds on top of work we've doing in Razor, including the Razor
SDK, MSBuild tasks, and CLI/server.
This currently *does* discovery components during the build process, but
it doesn't use that data for anything yet.
It works like this:
1. Generate class declarations (structure only, no method bodies)
2. Compile a 'temp' assembly using the .cs files and output of 1.
3. Do component discovery using the 'temp' assembly
4. Generate class definitions (including method bodies)
5. Compile the 'real' assembly using the .cs files and output of 4.
2018-03-14 11:23:40 +00:00
Ryan Nowak
6182e8448d
Get rid of RazorCompiler
...
Adds a little more use of Razor extensibility.
Razor is a plugin model, so we can't be the 'first mover' for initiating
compilation in the build tools and IDE.
Reorganizes tests and fills out more reusable test infrastructure for
Razor-driven testing.
Adds tests for declaration-only configuration.
2018-03-14 11:23:40 +00:00
Ryan Nowak
daf6a404f9
Implement basic Component discovery
...
This is the basics of component discovery along with some tests.
The next set of changes will integrate it into the compilation process.
2018-03-14 11:23:40 +00:00
Ryan Nowak
a053155ab4
Implement layout and implements with directives
...
- Remove haxxxx
- Add proper directives with tooling support
2018-03-14 11:23:40 +00:00
Ryan Nowak
57a04fb178
Adopt more of Razor Exensibility
...
Removes some workarounds and uses Razor extensibility in a few more
places.
_ViewImports now works in VS
2018-03-14 11:23:40 +00:00
Steve Sanderson
a386444b64
Make GetPropertiesIncludingInherited private to its consuming class
...
Just because it's not being used anywhere else currently
2018-03-13 11:54:50 +00:00
Florian Dohrendorf
ef1b670b8b
fix #216
2018-03-13 01:03:26 +01:00
forest93
53ab54d7b1
Fix #225 .
2018-03-09 20:24:23 +08:00
Daniel Roth
969b8b86a6
Make templates show up in the One ASP.NET dialog ( #208 )
...
* Add templates parameter
* Fix primary outputs
* Reorder primary outputs
* Update hosted template name
* Fix whitespace
2018-03-05 23:56:11 +00:00
Steve Sanderson
493992ad04
Update templates to Blazor 0.0.5-preview1-10054 and use new GetJsonAsync<T> API
2018-03-05 14:38:21 -08:00
Steve Sanderson
a74124efbf
Add extension methods for HTTP JSON requests/responses
2018-03-05 02:02:26 +00:00
Steve Sanderson
0301250c4b
In SimpleJson, support enum values serialized as numbers.
...
Note: still doesn't support nullable enum types.
2018-03-05 02:02:26 +00:00
Steve Sanderson
61e07eb615
Support @bind for enum and DateTime values (with optional format string)
2018-03-05 02:02:26 +00:00
Steve Sanderson
3ef78dcb7b
Stop treating RenderFragment as immutable, because its output isn't
2018-03-05 02:02:26 +00:00
Alex Gavrilov
7afdccc53b
Changing target framework to netstandard20 (not net461 on the CI machine)
2018-03-02 12:39:29 -08:00
Alex Gavrilov
1c15be550f
VSIX Changes to have Blazor templates included into VSIX and show up in One ASP.NET Dialog
2018-03-01 20:08:34 -08:00
Steve Sanderson
dc1b494df0
Update templates to Blazor 0.0.5-preview1-10041
2018-02-28 17:42:02 +00:00
Steve Sanderson
649159e31d
Use real BCL System.Net.Http.HttpClient. Implements #159
2018-02-28 17:37:42 +00:00
Steve Sanderson
dd831b4552
In "fetch", don't pass a "body" value if there isn't one
2018-02-28 17:37:42 +00:00
Steve Sanderson
1d07783522
Use "application/wasm" media type for .wasm files to enable streaming compilation
2018-02-28 17:37:42 +00:00
Steve Sanderson
e3b995b933
Recompile Mono, updating MonoPlatform.ts to work with the newer version
2018-02-28 17:37:42 +00:00
Steve Sanderson
f3b10bfa4c
Template updates ( #185 )
...
* Remove unnecessary <OutputType>Exe</OutputType> from templates
* Rename BlazorHosted.* projects to BlazorHosted.CSharp.(Client|Server)
* Add empty BlazorHosted.CSharp.Shared, referenced from the two other BlazorHosted.CSharp.* projects
* Have BlazorHosted.CSharp.Client fetch data from BlazorHosted.CSharp.Server
* Update templates to Blazor 0.0.5-preview1-10037
* Make date handling consistent across the templates
* Enable response compression in "hosted" template
* Enable response compression in dev server
* Simplify template app code using new namespace arrangement
* Fix project name in hosted template
2018-02-28 12:02:35 +00:00
Steve Sanderson
4bd3cd98d6
Simplify apps by moving some commonly used types into Microsoft.AspNetCore.Blazor namespace
2018-02-28 11:29:14 +00:00
Steve Sanderson
1d5dfc2fbd
In SimpleJson, support parsing Json.NET-serialized DateTimes
2018-02-28 10:28:57 +00:00
Steve Sanderson
04a69ed618
For "hosted" template, run "dotnet restore" on solution after project creation
2018-02-27 22:39:48 +00:00
Steve Sanderson
f14c72bd9d
Stop transitive dependency on Microsoft.AspNetCore.Blazor causing regular MVC view compilation error. Fixes #180
2018-02-27 22:23:48 +00:00
Steve Sanderson
b96b78410c
Minor improvements to "hosted" project template (e.g., "dotnet restore" post-action)
2018-02-27 21:57:03 +00:00
Steve Sanderson
d0a05ff5db
Update templates to Blazor 0.0.5-preview1-10031
2018-02-27 21:40:24 +00:00
Steve Sanderson
89ebeda38c
Add multi-project template "BlazorHosted"
2018-02-27 21:40:24 +00:00
Steve Sanderson
39153955d6
Add "dotnet new" template BlazorStandalone.CSharp
2018-02-27 21:40:24 +00:00
Steve Sanderson
9a17a343cc
Ensure Microsoft.AspNetCore.Blazor.Build is packed in a post-publish form so it's cross-plat compatible
2018-02-27 20:22:19 +00:00
Steve Sanderson
de2bfe5162
Fix regression in app startup when running in E2E tests
2018-02-27 16:57:07 +00:00
Steve Sanderson
ff5b6a7f30
Fix to "hosted in ASP.NET" startup logic when consuming via package references not project references
2018-02-27 16:38:15 +00:00
Steve Sanderson
2fc2a23d41
Include *.html in UpToDateCheckInput
2018-02-27 14:28:20 +00:00
Steve Sanderson
3e5381c17e
Rename .DevHost project to .Cli, and make it work as a DotNetCliTool
2018-02-27 12:17:35 +00:00
Steve Sanderson
9d21eda9c4
Include "serve" command in dotnet-blazor tool
2018-02-26 17:37:00 +00:00
Steve Sanderson
c255e77ab5
Remove redundant entry in NuSpec file
2018-02-26 17:05:45 +00:00
Steve Sanderson
44a2603720
Have the Build package include all its own dependencies (otherwise the DotNetCliTool won't work)
2018-02-26 16:34:57 +00:00
Steve Sanderson
2f9515785e
Fixes for Microsoft.AspNetCore.Blazor.Build package layout
2018-02-26 16:22:06 +00:00
Steve Sanderson
a5b5b3fa27
Set IsPackable=false on certain projects
2018-02-26 15:27:57 +00:00
Steve Sanderson
6995b974e9
Support @bind for textboxes and checkboxes
2018-02-26 14:39:56 +00:00
Steve Sanderson
1c5acfbdcc
Temporarily rename 'Json' to 'JsonUtil' to avoid name clash
2018-02-26 12:06:28 +00:00
Steve Sanderson
1b0b5c61fe
Add proper JSON-fetching example to StandaloneApp
2018-02-26 11:57:39 +00:00
Steve Sanderson
314b5c339c
Add public JSON APIs to Microsoft.AspNetCore.Blazor. Swap implementation from MiniJSON to SimpleJson
...
MiniJSON is very small but doesn't deal with strongly-typed
deserialization by default (we can add it, but that's less
battle-tested). Also it has to allocate extra IDictionary versions of
everything before we map it to specific .NET types.
Also tried LitJSON, but has some correctness issues, e.g.,
https://github.com/LitJSON/litjson/issues/43
Also tried Json.NET but it's > 600KB
2018-02-26 11:35:27 +00:00
Steve Sanderson
8590f6e7a5
Remainder of initial HttpClient features plus E2E tests
2018-02-23 22:31:26 +00:00
Steve Sanderson
ea3a18af25
Add basic support for onchange
2018-02-23 14:02:55 +00:00
Steve Sanderson
423ad85a04
Implement OnInit/OnInitAsync and use it in sample HTTP request
2018-02-23 12:47:02 +00:00
Steve Sanderson
891f2a14d0
Basic implementation of temporary HttpClient. Currently only supports GET requests and doesn't return HTTP headers.
2018-02-23 12:29:53 +00:00
Steve Sanderson
8e57261167
In BrowserUriHelper, change URI caching logic to be more defensive in case OnLocationChanged isn't being used
2018-02-23 11:05:29 +00:00
Steve Sanderson
f684203721
Rename DefaultBrowserServiceProvider->BrowserServiceProvider for consistency
2018-02-23 10:50:35 +00:00
Steve Sanderson
0bb32ad628
Move BrowserRouter -> Router in Microsoft.AspNetCore.Blazor now it has no browser-specific aspects
2018-02-23 10:49:03 +00:00
Steve Sanderson
eab10dcf83
Move NavLink component into Microsoft.AspNetCore.Blazor
2018-02-23 10:43:16 +00:00
Steve Sanderson
82bcf9172a
Convert the static UriHelper into a service, IUriHelper, and inject where needed
2018-02-23 10:35:28 +00:00
Steve Sanderson
68f6ede3a7
Simplify UriHelper by making EnableNavigationInteception automatic
2018-02-23 09:59:56 +00:00
Steve Sanderson
e1aab02228
Add name/description values for InjectDirective
2018-02-23 09:32:26 +00:00
Steve Sanderson
8ff4cee323
Make ComponentFactory thread-safe
2018-02-23 09:32:26 +00:00
Steve Sanderson
c408045e31
In RazorCompiler, support @inject directive
2018-02-23 09:32:26 +00:00
Steve Sanderson
3f9d358004
Make ComponentFactory throw if you try to use [Inject] with a property that has no setter (otherwise it could be confusing)
2018-02-23 09:32:26 +00:00
Steve Sanderson
b4a3c852c5
Implement DefaultBrowserServiceProvider using Microsoft.Extensions.DependencyInjection.ServiceCollection
2018-02-23 09:32:26 +00:00
Steve Sanderson
e524994734
Make ComponentFactory do all the reflection up-front and cache the resulting delegates
2018-02-23 09:32:26 +00:00
Steve Sanderson
ceacd489aa
Simplistic implementation of property injection
2018-02-23 09:32:26 +00:00
Steve Sanderson
ce10e6fa19
In preparation for DI, give every Renderer an IServiceProvider
2018-02-23 09:32:26 +00:00
Ryan Nowak
dfe576f4fa
Add new Razor bits
...
- Adds the aspnetcore-dev feed as a package source
- Updates Razor to a relatively new build
- Fixes a few issues encountered with new bits
2018-02-22 08:48:32 -08:00
Steve Sanderson
f4e0d663fa
Tiny simplification to NavLink
2018-02-22 15:03:49 +00:00
Steve Sanderson
b705ac2c0a
Switch to slightly higher-level implementation of NavLink (sacrificing some perf for better representation of current idioms)
2018-02-22 15:03:49 +00:00
Steve Sanderson
58ae5dea9a
Additional methods on ParameterCollection to simplify usage
2018-02-22 15:03:49 +00:00
Steve Sanderson
3e30655ea4
Low-level NavLink implementation
2018-02-22 15:03:49 +00:00
Steve Sanderson
25b76bc6dc
Skip rerendering child components if their params are definitely unchanged
2018-02-22 13:23:52 +00:00
Steve Sanderson
08d7b77d38
Avoid component syntax confusion by making it a compile-time error. Fixes #145
2018-02-22 11:07:03 +00:00
Steve Sanderson
1a31634b70
Capture component child content as a RenderFragment parameter.
2018-02-22 11:07:03 +00:00
Steve Sanderson
bd455453d6
Report line/column when reporting mismatching tags
2018-02-22 11:07:03 +00:00
Steve Sanderson
0665d30e19
In RazorCompiler, reject malformed documents with mismatching tags
2018-02-22 11:07:03 +00:00
Steve Sanderson
95023c0300
In RazorCompiler, support components with children
2018-02-22 11:07:03 +00:00
Steve Sanderson
d67bf63864
Update to SpaServices.Extensions 2.0.0
2018-02-22 11:07:03 +00:00
Steve Sanderson
6f25663a32
In UriHelper, cache current absolute URL
2018-02-21 10:22:03 +00:00
Steve Sanderson
b764029ce0
Fix comment
2018-02-21 10:22:03 +00:00
Steve Sanderson
fc9cb1af65
Add E2E tests for BrowserRouter, plus implement querystring/hash support
2018-02-21 10:22:03 +00:00
Steve Sanderson
8bc7c92683
Support hosting at non-root URL. Prove it by updating BasicTestApp to serve from non-root location.
2018-02-21 10:22:03 +00:00
Steve Sanderson
7073429cd5
Clean up and include routing unit tests
2018-02-21 10:22:03 +00:00
Steve Sanderson
78a19c07e9
In RazorCompiler, allow HTML comments
2018-02-21 10:22:03 +00:00
Steve Sanderson
7370d748c6
Initial, minimal BrowserRouter implementation. No config besides subclassing yet.
2018-02-21 10:22:03 +00:00
Steve Sanderson
0b5294a8f5
Enable SPA fallback routing on server
2018-02-21 10:22:03 +00:00
Steve Sanderson
58af3e1638
Allow blazor-boot script to be served from apps not hosted at domain root
2018-02-21 10:22:03 +00:00
Steve Sanderson
796d915526
Make spelling one step closer to correctness
2018-02-20 09:47:19 +00:00
Eugene Bekker
ea2019ac39
Update a reference to the new API style
2018-02-20 09:40:09 +00:00
Eugene Bekker
79a4016b13
Refactoring middleware configuration API
2018-02-20 09:40:09 +00:00
Steve Sanderson
a4c74234b4
Introduce deliberate misspelling
2018-02-19 15:14:08 +00:00
Steve Sanderson
608da4c78b
Specifying entrypoint: Add tests and other stylistic tweaks
2018-02-19 14:22:03 +00:00
Eugene Bekker
1653e56b98
Adding ability to qualify the entry point of the main assembly
2018-02-19 14:11:25 +00:00
Steve Sanderson
1e0836167d
Make temporary "layout" and "implements" syntax work with _ViewImports hierarchies
2018-02-19 12:48:08 +00:00
Steve Sanderson
f649de2976
Support _ViewImports.cshtml files hierarchically
2018-02-18 23:57:20 +00:00
Steve Sanderson
782ca0137d
Support "@inherits ..." directive
2018-02-18 22:03:15 +00:00
Steve Sanderson
f6d6714251
Serve static content from wwwroot
2018-02-16 15:56:22 +00:00
Steve Sanderson
69498f68f9
Add LayoutDisplay component and use it in StandaloneApp
2018-02-16 15:04:57 +00:00
Steve Sanderson
f54df27c21
Define ILayoutComponent so there's compile-time validation that layouts are defined correctly
2018-02-16 15:04:51 +00:00
Steve Sanderson
7139cb70c5
Support temporary @(Implements<MyInterfaceType>()) syntax
2018-02-16 12:39:38 +00:00
Steve Sanderson
9e333e31c5
Support temporary @(Layout<MyLayoutType>()) syntax
2018-02-16 12:10:44 +00:00
Steve Sanderson
f91d1d4803
Better handling of render-after-disposed scenarios
2018-02-16 12:10:44 +00:00
Steve Sanderson
7ad88a9406
Fix ArrayBuilder capacity expansion bug
2018-02-16 10:10:13 +00:00
Steve Sanderson
ad2c63ca37
Make OpenRegion/CloseRegion not public because they are only to support AddContent(seq, fragment)
2018-02-16 10:10:12 +00:00
Steve Sanderson
41aae0b7e6
Add ability to append RenderFragment into a RenderTreeBuilder
2018-02-16 10:10:11 +00:00
Steve Sanderson
29a6175ac1
Define RenderFragment concept
2018-02-16 10:10:10 +00:00
Steve Sanderson
1ac5ee25c1
Rename RenderTreeBuilder's AddText to AddContent, since it will be used for other types too
2018-02-16 10:10:08 +00:00
Steve Sanderson
acc5b9461b
Add ability to add component frame using runtime type object instead of generic param
2018-02-16 10:10:07 +00:00
Steve Sanderson
535b601d55
Multitargeted generate AngleSharp twice, so minimise the chance of either seeing the other in an incomplete state during build
2018-02-15 17:26:07 +00:00
Steve Sanderson
b529f2b913
Avoid confusion with client apps not rebuilding after changing Blazor library code
2018-02-15 16:45:30 +00:00
Steve Sanderson
af0085f550
Add *.cshtml for UpToDateCheckInput for VS
2018-02-15 16:14:48 +00:00
Steve Sanderson
dcbd7a27eb
Workaround file locked issue during build
2018-02-15 15:59:00 +00:00
Steve Sanderson
2ebfddc237
Switch client apps to netstandard2.0 to fix type load errors
...
Do a "git clean -xdf" on your local copy if you get runtime errors after
updating to this.
2018-02-15 10:20:31 +00:00
Steve Sanderson
e046dfca6d
Build net461 Razor extensions target on Windows only
2018-02-15 10:20:51 +00:00
Steve Sanderson
2da17602ed
Support "Region" frames in JS-side code
...
They only appear in a prepended subtree, because the .NET-side diffing
code resolves them out if they are top-level to any given edit
2018-02-14 23:41:25 +00:00
Steve Sanderson
848f24536a
Support "Region" frames in diffing
2018-02-14 23:41:24 +00:00
Steve Sanderson
a9822216f1
Add the concept of a "Region" render tree frame
2018-02-14 23:41:24 +00:00
Ryan Nowak
043e623d5b
Split Razor extensibility into its own assembly
...
This functionality will need to cross-compile to desktop framework
(net461) so that we can use it in VS. VS doesn't yet have netstandard2.0
support.
2018-02-14 14:08:14 -08:00
Steve Sanderson
af98672b17
Remove redundant WeakValueDictionary
2018-02-13 19:52:44 +00:00
Steve Sanderson
0eb0555303
Eliminate IComponent.BuildRenderTree to guarantee that components are only rendered by themselves
2018-02-13 19:47:37 +00:00
Steve Sanderson
70a3ee3d98
Remove externally-callable Renderer.RenderInNewBatch() now that rendering is triggered by components themselves
2018-02-13 17:06:00 +00:00
Steve Sanderson
804ab2d89f
Add IHandleEvent concept so components can define their own lifecycle around events
2018-02-13 16:42:21 +00:00
Steve Sanderson
a889cd3152
Beginning lifecycle methods on BlazorComponent
2018-02-13 15:55:37 +00:00
Steve Sanderson
d98a6153f7
In RazorCompiler, have BuildRenderTree overrides call base implementation
2018-02-13 15:53:59 +00:00
Steve Sanderson
861154764c
Introduce IComponent.SetParameters, moving parameter-setting and rerendering logic into component base class
2018-02-13 15:00:53 +00:00
Steve Sanderson
37217db73a
Implement ParameterCollection
2018-02-13 13:14:55 +00:00
Steve Sanderson
695ddc0fd6
Add Init/RenderHandle concepts so components can rerender themselves arbitrarily (e.g., after internal state change)
2018-02-13 11:49:33 +00:00
Steve Sanderson
7bb4bbbe5c
In IndexHtmlFileProvider, preserve original source formatting
2018-02-12 23:05:47 +00:00
Eugene Bekker
b38718d77f
Require <script type="blazor-boot"> to define script injection location
2018-02-12 21:49:27 +00:00
Steve Sanderson
e37e22aa27
Further renderer refactoring
2018-02-10 10:55:44 +00:00
Steve Sanderson
5a9c41af0e
Make AngleSharp not strong-named. Change assembly name to Microsoft.AspNetCore.Blazor.AngleSharp to ensure no conflicts with other usages.
2018-02-09 17:37:21 +00:00
Steve Sanderson
15ddcd03b0
Major refactor of responsibilities in rendering code. Not quite done
...
with this yet either.
2018-02-09 14:50:07 +00:00
Steve Sanderson
91314ee8c8
Rename RenderTreeDiffComputer -> RenderTreeDiffBuilder
2018-02-08 15:50:14 +00:00
Steve Sanderson
b8ed7bc2c5
Track event handlers via explicit IDs rather than by index into frames
...
array
2018-02-08 15:31:45 +00:00
Mark Gaze
89796cae2c
Fixed BlazorBuildToolsExe path to remove backslash in path, (missed in PR #43 )
2018-02-07 16:30:26 +00:00
Mark Gaze
5a4bc2e6d6
Added quotes to paths in build that cause the build to fail when directory has a space in the path #44
2018-02-07 16:30:26 +00:00
Brian Allred
5da3c172b5
Make build target path platform agnostic
2018-02-07 10:27:33 +00:00
Steve Sanderson
48627db47f
ArrayRange and RenderTreeDiff are readonly structs, so use fields directly
2018-02-07 10:27:32 +00:00
Steve Sanderson
83fa72bc7e
Have RenderTreeDiff build its own array of referenced frames rather than pointing to the latest render tree
...
This is in preparation for supporting multiple diffs for the same
component in a single batch (which means we can't rely on there being at
most only new render tree per component)
2018-02-07 10:27:32 +00:00
Steve Sanderson
33932f41fc
Replace "DescendantsEndIndex" concept with "SubtreeLength"
...
In other words, use relative addressing so that frame data is
independent of its position in the array
2018-02-07 10:27:32 +00:00
Steve Sanderson
b59e68a84d
Clarify why ArrayBuilder<T> exists
2018-02-05 17:20:34 +00:00
Steve Sanderson
fdd0c124a1
Convert RenderTreeEdit to a readonly struct of fields
2018-02-05 00:50:02 +00:00
Steve Sanderson
848b7dc5df
Now that RenderTreeFrame is properly readonly (and because the usage is so low-level) can use fields directly
2018-02-05 00:37:03 +00:00
Steve Sanderson
93f17219ea
Rename OpenComponentElement -> OpenComponent for consistency
2018-02-05 00:19:44 +00:00
Steve Sanderson
1fda744770
Make RenderTreeFrame properly readonly to allow more pass-by-ref cases
2018-02-05 00:16:08 +00:00
Steve Sanderson
aae72c8136
In RenderTreeFrame, use explicit [FieldOffset] to shrink the struct from 40 bytes to 28 bytes (in 32-bit mode) or 32 bytes (in 64-bit mode)
2018-02-04 23:23:34 +00:00
Steve Sanderson
f1332919bc
Rename RenderTreeNode -> RenderTreeFrame (and correspondingly, "node" ->
...
"frame" everywhere)
2018-02-04 22:21:29 +00:00
Steve Sanderson
76dafa819f
Mechanism for components running logic when parents change their properties
2018-01-31 16:19:01 +00:00
Steve Sanderson
1c9c74c801
In RazorCompiler, fix bug about attribute nodes having wrong sequence
...
numbers. Make tests explicit about sequence numbers.
2018-01-31 10:23:56 +00:00
Steve Sanderson
cc053ddbbf
Better validation of C# class names in RazorCompiler
2018-01-31 10:23:49 +00:00
Steve Sanderson
50a5baa872
Dispose components on removal
2018-01-30 10:00:30 +00:00
Steve Sanderson
8839a6c558
In TypeScript, regard System_Array type as generic, even though the type param refers to the entry pointer type, not the element type
2018-01-29 22:07:16 +00:00
Steve Sanderson
855d93ce67
Improve TS annotations when calling readObjectField/readStructField
2018-01-29 21:47:55 +00:00
Steve Sanderson
c81d537ea3
Pass entire RenderBatch to JS side in one call
2018-01-29 21:43:49 +00:00
Steve Sanderson
080e6395cb
Move to batched rendering
2018-01-29 20:16:42 +00:00
Steve Sanderson
27d0ce4da9
Begin differentiating between rendering as a new batch on in an existing batch (even though batches don't exist yet)
2018-01-29 16:47:52 +00:00
Steve Sanderson
97d575f599
Refactor BrowserRenderer.ts to avoid tracking unnecessary child index stack
2018-01-29 12:56:41 +00:00
Steve Sanderson
7e76490844
Refactor RenderTreeDiffComputer to use more "ref local" for less array dereferencing
2018-01-29 12:56:41 +00:00
Steve Sanderson
882096755b
Rerender child components when their parameters change
2018-01-26 14:25:26 -08:00
Steve Sanderson
94ad26a479
Update properties on retained child components
2018-01-26 11:58:43 -08:00
Steve Sanderson
9f7dab3096
Better error handling when setting properties on child components
2018-01-26 10:10:06 -08:00
Steve Sanderson
3940ca8b60
For components, allow attribute values to be arbitrary objects
2018-01-26 09:54:35 -08:00
Steve Sanderson
1b4fa4781a
Give attribute nodes a single object-valued value so they can be used for component properties too.
2018-01-26 09:40:48 -08:00
Steve Sanderson
9dcb1c4fc4
Begin on setting properties on child components
2018-01-26 08:47:53 -08:00
Steve Sanderson
0aa164073d
Rename Microsoft.Blazor.* -> Microsoft.AspNetCore.Blazor.* everywhere
2018-01-24 15:48:38 -08:00
Steve Sanderson
9e90ff3689
Rename AddComponentElement->OpenComponentElement for clarity (you have to close it too)
2018-01-24 15:26:27 -08:00
Steve Sanderson
2469558410
Preserve child component instances across renders. Move instantiation into the diffing phase.
2018-01-24 14:29:46 -08:00
Steve Sanderson
2107a1927f
In RazorCompiler, support temporary <c:MyComponent /> syntax
2018-01-24 10:43:23 -08:00
Steve Sanderson
04fa5f4b71
Since ArrayRange is now what the tree builder APIs expose, ArrayBuilder can be internal
2018-01-24 08:58:16 -08:00
Steve Sanderson
9da3260eb7
Avoid some struct copying during array building
2018-01-23 23:50:21 -08:00
Steve Sanderson
6e4d0dbca4
Move common resizable-array logic into shared ArrayBuilder. Replace ArraySegment with ArrayRange since Offset is never used.
2018-01-23 23:30:48 -08:00
Steve Sanderson
cc2d097c99
More comments on thinking around child components and wrapper elements
2018-01-23 20:38:01 -08:00
Steve Sanderson
5d5931d3c5
Clarify comments about components needing wrapper elements
2018-01-23 17:21:45 -08:00
Steve Sanderson
b049c7f574
Fix diffing for consecutive text nodes
2018-01-23 09:43:14 -08:00
Steve Sanderson
df321b9b8d
Make RenderTreeEdit specify which sibling node it acts on, so we can eliminate the Continue concept and no longer track indices on JS side
2018-01-22 20:17:32 -08:00
Steve Sanderson
0ea4c930e9
Remove redundant property
2018-01-22 16:53:41 -08:00
Steve Sanderson
2c3925a05c
Apply render tree diffs on JS side
2018-01-22 16:02:52 -08:00
Steve Sanderson
584e363110
Pass the tree edits to JS code on render
2018-01-22 09:26:14 -08:00
Steve Sanderson
5435582c0e
Update rendering APIs to supply the diff as well as the final state
2018-01-22 08:54:03 -08:00
Steve Sanderson
bea15241f2
Various renames of diff-related types, plus XML docs for newly-public types.
2018-01-22 08:31:07 -08:00
Steve Sanderson
7c30d51be9
In tree diffs, omit trailing Continue entries and skip over unmodified subtrees
2018-01-22 01:55:10 +00:00
Steve Sanderson
b021e19598
In diffing, support elements with descendants
2018-01-21 21:30:01 +00:00
Steve Sanderson
0a5e27fdcf
Support diffing attributes. This required tracking 'sequence' values on attributes too.
2018-01-21 20:57:11 +00:00
Steve Sanderson
7a1abbaca3
In tree diffing, better handle scenario where both old and new sequences loop back but to different locations
2018-01-21 19:37:34 +00:00
Steve Sanderson
6b37494e7c
Begin on RenderTree diffing. Doesn't yet recurse into elements to handle attributes/children.
2018-01-21 18:53:09 +00:00
Steve Sanderson
a0b354e0eb
Add concept of 'sequence' to RenderTreeNode. This is in preparation for diffing.
2018-01-21 11:51:26 +00:00
Steve Sanderson
b038117961
Force VS to treat all Blazor cshtml components as inheriting from BlazorComponent so that helpers like @onclick appear in intellisense
2018-01-18 10:05:07 +00:00
Steve Sanderson
374d19c1a4
Move child component instantiation into a post-render phase to bring it closer to how it will work with rendertree diffing
...
This is also needed to make it possible to have a helper to insert
Component nodes from Razor without doing anything messy to pass the
RenderTreeBuilder into that heper.
2018-01-18 00:29:00 +00:00
Steve Sanderson
3deab026c8
Stop spurious VS "cannot override ExecuteAsync" errors even if you don't specify a base class
2018-01-18 00:07:54 +00:00
Steve Sanderson
d1f96153d3
Implement basics of @onclick()-type shorthand syntax
2018-01-16 18:01:06 +00:00
Steve Sanderson
946e25462e
In RazorCompiler, support @using statements
2018-01-16 17:17:22 +00:00
Steve Sanderson
7cd5228b7f
In RazorCompiler, support attributes whose values are C# code blocks (treated as event handlers)
2018-01-16 16:58:47 +00:00
Steve Sanderson
5949045319
In RazorCompiler, support expressions with non-string or null values
2018-01-16 16:30:29 +00:00
Steve Sanderson
7bbb2b6660
In RazorCompiler, support attribute values of type UIEventHandler
2018-01-16 16:15:46 +00:00
Steve Sanderson
3a7b6b2178
In Razor compiler, support attributes with interpolated expressions
2018-01-16 15:24:34 +00:00
Steve Sanderson
b690aeee28
In RazorCompiler, support attributes with C# expression values
2018-01-16 13:15:13 +00:00
Steve Sanderson
80b371c647
In RazorCompiler, support string-valued attributes
2018-01-16 12:23:12 +00:00
Steve Sanderson
1c1fd69bf2
In RazorCompiler, support self-closing and void elements
2018-01-16 11:50:40 +00:00
Steve Sanderson
a64ece0319
In RazorCompiler, support HTML elements
2018-01-16 11:36:55 +00:00
Steve Sanderson
75b083911c
Add AngleSharp with temporary InternalsVisibleTo
2018-01-16 11:11:49 +00:00
Steve Sanderson
604aa14518
Use Razor component in StandaloneApp sample
2018-01-15 23:11:54 +00:00
Steve Sanderson
7e40427ffe
Razor compilation: Support text literals and C# code
2018-01-15 23:11:48 +00:00
Steve Sanderson
3ccdc1d16f
Begin integrating with real Razor compiler
2018-01-14 16:37:01 +00:00
Steve Sanderson
a03cb48c7a
When compiling Razor components, take base namespace from host project
2018-01-14 14:40:57 +00:00