Commit Graph

484 Commits

Author SHA1 Message Date
Steve Sanderson f1283940b7 In live reloading, also reload if the server is being recycled. Plus rewrite LiveReloading.ts completely to be better organized. 2018-04-04 14:06:30 +01:00
Steve Sanderson de4d78f454 Only trigger live reloading from VS when enabled in MSBuild 2018-04-04 12:31:43 +01:00
Steve Sanderson 6f7c188a76 Revert the attempt to share signal file path between MSBuild and VS extension code, because it doesn't get populated at the right time 2018-04-04 12:26:51 +01:00
Guillaume ZAHRA 3b0f1313fe Resolution for "The path must be absolute" on published projects
Trying to replace the internal "." folder with the local assembly path in order to have an absolute path for the PhysicalFileStorage class at startup ("The path must be absolute" error at startup for published projects)

May resolve the issue of #376 on dev
2018-04-04 11:41:56 +01:00
Steve Sanderson 049673db0d Update templates to Blazor 0.2.0-preview1-10165 2018-04-04 11:31:36 +01:00
Steve Sanderson 71a3e31799 Trigger live reload feature after successful builds in VS 2018-04-04 11:29:59 +01:00
Steve Sanderson 5dfa857eab Minor NavLink cleanups 2018-04-04 10:21:07 +01:00
Austin Cummings 30ec582767 Add `ActiveClass` option to NavLink component 2018-04-04 10:16:49 +01:00
Olivier Lefebvre 1626b3b8c8 Support arbitrary 'fetch' arguments 2018-04-04 10:12:42 +01:00
Ryan Nowak 0c942ccc76 Fix for #453
This fix adds missing line mappings for the Blazor runtime code
generation. We had the correct line mappings for design time code, but
they were missing in this case for runtime code - where they are used
for error messages and debugging (not yet supported).

Once this fix is is in the error window and output log will report the
file/line/column of the original source in .cshtml.

It looks like jumping to the code from the error window is currently not
working correctly in VS. It works from the output window.

I'm going to follow up on the VS issue in the Razor repo, since the fix
won't come from the Blazor side.
2018-04-03 15:34:41 -07:00
Ryan Nowak d097190824 Add support for conditional attributes
Adds conditional attributes for HTML elements.

This means that an attribute with a 'false' .NET bool value or a null
.NET value of another type will not be rendered in the HTML.
2018-04-03 14:06:48 -07:00
flash2048 ff5e6a78c3 Fix some tests with DateTime in German culture 2018-04-03 15:09:26 +01:00
Steve Sanderson 2c268a4eca Live reloading (currently enabled only for command-line builds - will
add VS support next)
2018-04-02 15:33:00 +01:00
Steve Sanderson 1fe90e2c0f Avoid unnecessary assembly/type lookups when retrieving cached method handles 2018-04-02 13:14:48 +01:00
Grahame Horner 590a47f6c7 Mono Platform Method Caching 2018-04-02 13:11:12 +01:00
flash2048 e696325b76 Corrects spelling of some comments 2018-04-02 12:34:08 +01:00
Steve Sanderson 0f73aca42e Different attempt to fix AppVeyor CI issues 2018-03-30 13:39:22 +01:00
Steve Sanderson e7573e00da Hopefully fix the AppVeyor CI issues 2018-03-30 13:09:03 +01:00
Steve Sanderson 38cdb870f8 Update templates to Blazor 0.2.0-preview1-10152 2018-03-30 12:22:58 +01:00
Steve Sanderson b596d0d9f8 Reorder package-lock.json to make NPM happy 2018-03-30 12:22:58 +01:00
Steve Sanderson b52912a460 Handle ternary expressions inside interpolated attributes. Fixes #446 2018-03-30 11:38:10 +01:00
Luke Latham 2a8d06b539 Double-quote attribute values? 2018-03-30 10:12:35 +01:00
Ryouko Konpaku ef3db51bbf Text Area Bind Fix for issue #434 (#439)
* Text Area Bind Fix for issue #434

* Correct Typo/Mispelling on test method name.
2018-03-30 10:10:23 +01:00
Stephen Roe cda3692d0b Added SVG support (#366) (#435)
* Added SVG support (#366)

* Added E2E tests for SVG
2018-03-30 10:07:10 +01:00
Ryan Nowak 5b658c80a1 Replace @bind with bind-...
This change introduces a 'tag helper' that replaces @bind with custom
code generation that accomplishes roughly the same thing.

This feature lights up by dynamically generating tag helpers that are
visible to tooling and affect the code generation based on:
- pattern recognition of component properties
- attributes that create definitions for elements
- a 'fallback' case for elements

'bind' also supports format strings (currently only for DateTime) via
a separate attribute.

This change introduces the basic framework for bind and tooling support.
We know that we'll have to do more work to define the set of default
'bind' cases for the DOM and to flesh out the conversion/formatting
infrastructure.

This change gets us far enough to replace all of the cases we currently
have tests for :) with the new features. The old @bind technique still
works for now.

Examples:

@* bind an input element to an expression *@
<input bind="@SelectedDate" format="mm/dd/yyyy" />
@functions {
    public DateTime SelectedDate { get; set; }
}

@* bind an arbitrary expression to an arbitrary set of attributes *@
<div bind-myvalue-myevent="@SomeExpression">...</div>

@* write a component that supports bind *@

@* in Counter.cshtml *@
<div>...html omitted for brevity...</div>
@functions {
    public int Value { get; set; } = 1;
    public Action<int> ValueChanged { get; set; }
}

@* in another file *@
<Counter bind-Value="@CurrentValue" />
@functions {
    public int CurrentValue { get; set; }
}
2018-03-29 22:04:24 -07:00
flash2048 b53d39e16f Corrects spelling of some comments, method name and remove an excess flag 2018-03-29 14:20:04 +01:00
Steve Sanderson f15c995a2a Ensure JSON deserializer only uses Activator.CreateInstance implicitly for structs 2018-03-29 10:41:07 +01:00
Matthew Lazarow 25cf73ed80 Json to struct error 388 2018-03-29 10:41:07 +01:00
Benjamin 64d7091b2b fix #396 - added TimeSpan serialization and deserialization 2018-03-29 10:07:00 +01:00
Miha Markič 9a01ec5743 Corrects spelling of some comments and method names (#398)
* Corrects spelling of some comments and method names

* Correctly renames one more instance of wrongly spelled enableNavigationInteception
2018-03-28 08:15:27 -07:00
Ryan Nowak f6479a75cb Remove workaround for old Razor tooling
This isn't needed anymore to support the Blazor design-time experience.

Now that it's gone, it will no longer cause conflicts with MVC's types
so we can remove the other workaround (privateassets).
2018-03-27 19:24:10 -07:00
Ryan Nowak d7d0c617ce Add a Blazor project capability 2018-03-27 19:21:48 -07:00
Pranav K 811482d9da Update versions to 0.2.0-preview1 2018-03-27 13:51:31 -07:00
Javier Calvarro Nelson a1ba0ab8ea [Fixes #355] Generated index.html not regenerating when source Index.html changes (#375) 2018-03-25 18:36:27 -07:00
Ryan Nowak eccd9ccdf9 Improve dependencies of the Blazor VSIX
This should now correctly require VS 15.7-preview1 or newer with the
ASP.NET and web development tools to installed.

Removed the Razor Language Servcies dependency since it's prompting an
install of the wrong tools from the VS gallery.
2018-03-23 12:52:36 -07:00
Daniel Roth 04e850353b Fix VS workload name 2018-03-23 11:35:23 -07:00
Daniel Roth aed0490cd5 Update third party notices 2018-03-22 13:21:38 -07:00
Steve Sanderson 29a7d4e5bc In Hosted template, exclude .sln when generating from VS (to avoid duplication) 2018-03-22 19:39:12 +00:00
Daniel Roth b669dcad1b Readme update tweak 2018-03-22 12:39:24 -07:00
Daniel Roth 492bfd4982 Add back older browser support statement 2018-03-22 12:39:24 -07:00
Daniel Roth d01b10aec1 Add back asm.js support to the future list 2018-03-22 12:39:24 -07:00
Daniel Roth bcc7e62d04 Fix list item indentation 2018-03-22 12:39:24 -07:00
Daniel Roth 4bb570190b Update readme for initial preview release 2018-03-22 12:39:24 -07:00
Steve Sanderson b3619f3e10 Fix serving of woff/woff2 files for standalone-published apps on IIS/Azure 2018-03-22 10:15:55 +00:00
Ryan Nowak daa54ef1af Fix the Blazor about dialog
Have to do some gritty work to be able to show a proper version in the
about dialog. The generation of the proper assembly attributes is part
of the new-style csproj, so we don't get to use it for free.
2018-03-21 17:46:44 -07:00
Ryan Nowak 64d78c6e62 Add license and metadata to VSIX 2018-03-21 21:07:58 +00:00
Ryan Nowak 808f741cdd Fix for #314 - streamline lambda component args
This change removes the magic 'auto-lambda' feature that has some
unconvincing UX.

Also working around a razor bug where explicit expressions are lowered
incorrectly. This should make it possible to write code like:

<Foo Bar="@(e => { OnChanged(e); })" />
2018-03-21 13:59:35 -07:00
Ryan Nowak 635aa55d03 Force LF for package-lock.json
Most versions of NPM in use always use LF for line endings anyway.
Forcing LF on windows should limit the number of no-op changes.

This issue has been fixed in NPM
(see https://github.com/npm/npm/issues/1716) but not everyone will have
the fix.
2018-03-21 13:59:35 -07:00
Steve Sanderson 3b5ce7f4a7 In templates, move survey content out into a separate component 2018-03-21 16:22:32 +00:00
Steve Sanderson fb3beab270 Link on build by default for all configurations, not only Release 2018-03-21 15:58:49 +00:00