Commit Graph

646 Commits

Author SHA1 Message Date
Steve Sanderson 767a2373c8 Eliminate ElementRef's static incrementing ID for remote rendering cases
... because it's important not to disclose cross-user state, such as the number of IDs that have been assigned. Plus we don't want to run out of unique IDs, which we could if it's limited by the range of an 'int'.
2018-07-10 09:52:19 +01:00
Steve Sanderson c2f3128ef9 Extremely minor cleanups 2018-07-10 09:52:19 +01:00
Ryan Nowak ee62bd8d45 Add startup for client/mono Blazor
This change adds a host builder, and the startup pattern for client-side
Blazor apps running in mono/wasm. This will help us align better with
server side Blazor.
2018-07-09 11:13:26 -07:00
Joseph Musser ed57767e6a Removed trailing space from template survey link (#1099) 2018-07-09 13:47:07 +01:00
Steve Sanderson 9697525558 Update AppVeyor/Travis configs to run builds for master 2018-07-09 12:40:19 +01:00
Steve Sanderson 7bc67e1481 Simple approach for minifying blazor.*.js on release builds. Fixes #1003
Later we might want to emit both min and non-min variants of the file, when there is some way for developers to control which one they use
2018-07-09 11:04:14 +01:00
Steve Sanderson 5bccac05fc Refactoring to prepare for remote rendering.
- Prepare for building multiple entrypoint variants of the .js library
- Use async interop more consistently for rendering and event handling
- Add binary serializer for RenderBatch with tests
2018-07-09 11:04:14 +01:00
Steve Sanderson cafb56569d Initial debugger support 2018-07-06 11:56:21 +01:00
Steve Sanderson c881a63a78 Include Mono Debug proxy code in Server project (temporarily until it's shipped as a NuGet package) 2018-07-06 11:56:21 +01:00
Steve Sanderson f483e6293e Update linker config following Mono upgrade to f382b069151 2018-07-06 11:56:21 +01:00
Ryan Nowak e0168eb0c8 Implement server-side sync context
This is a synchronization context we can use for server side blazor to
support a single logical thread of execution. This is optimized for
scalability and non-blocking behavior.
2018-07-05 12:41:31 -07:00
Ryan Nowak 8724b84a14 Fix #1068
This changes the bind lowering pass to be more tolerant of unexpected
and invalid content.
2018-07-05 11:28:54 -07:00
Ryan Nowak 844e38e641 Update versions to 2.1
Updates ASP.NET package versions to 2.1

Tweaks TFMs
- libraries = netstandard2.0
- exes/apps/tools = netcoreapp2.1
- unit tests = netcoreapp2.0
- e2e tests = netcoreapp2.1 (dependency on apps)

The exception to this is the Browser.JS project which depends on our
tool for its build. however this project just builds the js code so its
TFM doesn't really matter.
2018-07-05 09:53:55 -07:00
Ryan Nowak 45544858a3 Fix #954 - use weak typing for 'event handlers'
This change introduces a mechanism for bypassing type checking and then
uses for the 'event handlers'. The event handler tag helpers have some
ideosyncratic behaviors and rely on overloading at the render tree
builder level.
2018-07-05 09:15:01 -07:00
Steve Sanderson 97d044e479 Update to Mono Linker d18d497 2018-07-05 13:13:28 +01:00
Carmelo Messina 033edeaae4 Fix for #1071 2018-07-03 09:56:01 +01:00
Steve Sanderson b869ced648 Add RenderBatch reader abstraction (#1052)
* In .JS project, make RenderBatch into an interface with SharedMemoryRenderBatch as implementation

* In SharedMemoryRenderBatch, use prototype functions instead of assigning references on each instantiation
2018-07-02 10:21:41 +01:00
Zef Ubachs 389ff14a82 - Changed targetframework of Microsoft.AspNetCore.Blazor.Server from netcoreapp2.0 to netstandard2.0. 2018-06-29 12:41:15 -07:00
Ryan Nowak baf6a21ef6 Update build tools 2018-06-29 12:40:57 -07:00
Steve Sanderson 2f548f0b27 Update BlazorLibrary template to use newer interop APIs 2018-06-26 14:00:50 +01:00
Steve Sanderson a2bade57c3 Move Mono.WebAssembly.Interop project into "src" dir to match build conventions 2018-06-26 13:16:36 +01:00
Steve Sanderson b275055835 JavaScript interop v3 (#1033)
* JavaScript interop via new IJSRuntime abstraction

* CR feedback
2018-06-25 15:14:42 +01:00
Anthony Chu dcd9cf7481 Add check for `wwwroot/` unix path separator (#1018) 2018-06-25 12:13:12 +01:00
Stefan Nikolei 61d6d71e8c Fix right mouse click on <a href> in firefox (#1010)
* Check if the left mouse is pressed

* using button instead of which
2018-06-25 12:11:15 +01:00
Benjamin Vertonghen 14013f5098 Typo: Fix Parmeter to Parameter 2018-06-15 15:51:58 -07:00
Benjamin Vertonghen 3a89b5121f Add para [Parameter] Code Snippet
Code Snippet Category is Blazor.
Added in the existing VSIX.
2018-06-15 15:51:58 -07:00
Steve Sanderson a1e613b717 When clicking <a> tag with no href, don't attempt navigation to "null". Fixes #943 2018-06-07 20:49:09 +01:00
Ryan Nowak 0fb47684c8 Fix #974
The root cause here was that we weren't setting the language version in
MSBuild, which is only for the command line version.

(cherry picked from commit 319e31f71a150e9b0d91e724f0e358390caec4c2)
2018-06-07 12:27:03 -07:00
Matt Ferderer 34971c9569 Update Steve Sanderson's demo to latest NDC talk
Steve recently did another NDC talk which is much more up to date. Suggesting that one be linked to instead of the older talk.
2018-06-06 16:35:41 -07:00
Steve Sanderson f7e2327378 Bump version to 0.5.0-preview1-* 2018-06-06 15:12:53 +01:00
Steve Sanderson 783edcbf4c Don't preventDefault on events. Fixes #803 2018-06-06 13:44:53 +01:00
Steve Sanderson 2492d00e75 Stylistic tweaks 2018-06-06 13:44:14 +01:00
Rémi BOURGAREL 3610068929 manages when users clicks on a link with the control button pushed. issue #867 2018-06-06 13:44:14 +01:00
Steve Sanderson 4427b3b773 Add more struct readonlyness hints 2018-06-06 11:49:55 +01:00
Todd Lang 1e866f7672 Refactoring SimpleJson.EatWhiteSpace
-Replacing arbitrary length IndexOf call with unrolled switch statement
-Reduces deserialization runtime on ~310KB test data from 13s to 5s.
2018-06-06 11:12:18 +01:00
Ryan Nowak c5c1b375ec Add more properties 2018-06-05 20:03:04 -07:00
Daniel Roth 13849a6739 Fix base type of UIErrorEventArgs 2018-06-05 20:03:04 -07:00
Ryan Nowak cb186f494a Add type checking for component parameters
Introduces a new primitive used by the compiler for type checking. Type
checking applies to component parameters when setting the value directly
and when using bind. This is nice because it also adds error checking
for bind.
2018-06-05 19:58:50 -07:00
Javier Calvarro Nelson 5cb544ece8 Improved interoperability
* Add support for invoking async JavaScript functions from .NET.
* Add support for invoking .NET methods from JavaScript.
* Add support for invoking async .NET methods from JavaScript.
2018-06-05 16:09:59 -07:00
Javier Calvarro Nelson a3a76c2e9a Update README.md
Indicate where and what version of Java to get.
2018-06-05 09:39:59 -07:00
Suchiman a3776b2a20 Add support for binding long / float / double / decimal 2018-06-05 16:42:31 +01:00
Ryan Nowak 1724c1bcbc Fix #316
This change should hopefully end the MSBuild craziness that happens when
you add a file to the project using the VS Add Item dialog.

VS apparently has a behavior that intentionally tries to make sure the
added file is only included in a single itemgroup. So when Blazor
defines an itemgroup at the top level of scope with the same members as
Content - VS does some gymnastics to prevent it working.

The workaround is to defer the initialization of our itemgroup.
2018-06-05 08:35:47 -07:00
Daniel Roth 5916d93118 Update survey links for 0.4.0 2018-06-01 09:17:12 -07:00
Ryan Nowak 5b40e3e121 Update versions to 2.1.0 (rtm) 2018-05-31 20:58:09 -07:00
Steve Sanderson 0e3b437dc1 Move <TemplateBlazorPackageVersion> prop to dependencies.props 2018-05-30 11:54:50 +01:00
Steve Sanderson b32c88c0d6 Remove suggestion to reference ASP.NET CI dev feed from readme 2018-05-29 17:18:58 +01:00
Suchiman 0e5f9c2562 Use RestoreAdditionalProjectSources instead of RestoreSources
- The former is additive while the latter replaces the existing sources
2018-05-29 17:16:45 +01:00
Nikolei, Stefan 54eda39cb8 Update Anglesharp 2018-05-29 17:08:01 +01:00
Steve Sanderson 5dc5404570 Add notes on how to upgrade Mono, plus modify some files to make future
upgrades simpler
2018-05-24 15:55:01 +01:00
Steve Sanderson 353da42cce Clean up use of relative URLs. Fixes #844 and #845 (#878)
* Handle links to empty-string href, resolved against base href

Needed to change the URLs used in E2E tests to be able to cover this (i.e., removed the /RouterTest prefixes so the default relative URL became an empty string)

* Change links in StandaloneApp sample to be relative

* Standardize on base URIs having trailing slash everywhere

Hence also change terminology from "base URI prefix" to simply "base URI"

* Handle link highlighting when visiting base-href-but-without-trailing-slash

* Removing leading slashes from base-relative URLs in templates
2018-05-24 09:54:43 +01:00