Commit Graph

570 Commits

Author SHA1 Message Date
Ryan Nowak 6a28aa99c6 remove inadvertant test code 2018-05-02 11:07:52 +01:00
Ryan Nowak 87375f6ba1 Add support for most (if not all events)
This change adds tag helpers and defines event types for all of the DOM
events we could find. You'll find it much easier now to subcribe to
these events.

While we did define new event types, we didn't substantially expand the
set of data that we serialize for events. We're looking for feedback on
what is most critical to have, and looking for contributions adding
those data and tests.
2018-05-02 11:07:49 +01:00
Steve Sanderson 05f5bb423a Update binding redirection version range for 0.4.0 2018-05-01 19:36:11 +01:00
Steve Sanderson e55509e187 Update version to 0.4.0-preview1-* 2018-05-01 19:32:13 +01:00
Daniel Roth 6a4e5726ac Update survey link 2018-05-01 09:55:11 -07:00
Steve Sanderson 20a7fe7c2e Add isMultiProjectTemplate to hosted template vs-2017.3.host.json. Fixes #332 2018-05-01 17:49:57 +01:00
Steve Sanderson be8f2d43ee Support custom events and non-bubbling standard events (#722)
* Support non-bubbling events

* Support responding to arbitrary events. E2E coverage of this and bubbling.

* Rename E2E test files to avoid clash with other PR
2018-05-01 17:12:03 +01:00
Steve Sanderson f61ed4df4f For checkboxes, bind to 'checked'. Fix special property handling in BrowserRenderer.ts. Fixes #659 and #703
* Stop the value<-->checked conversions for checkboxes. Just use native 'checked' property. Fixes #703

* Properly handle removal of 'checked' and 'value' attributes

* E2E coverage for removing 'value'
2018-05-01 16:40:07 +01:00
Steve Sanderson 644bd37e8c Add [Parameter] to route parameter in paging sample 2018-05-01 13:48:38 +01:00
Steve Sanderson 370edda02d Use separate filenames for the two different reference arg files 2018-05-01 10:15:21 +01:00
Marcus Bowyer e5d78f8886 Pass list of references via temp file for resolve-dependencies and build commands 2018-05-01 10:15:21 +01:00
Steve Sanderson 18b9a70dbe Encourage encapsulation of component parameter properties (#713)
* Before refactoring ParameterCollection assignment logic, add more test coverage

* Begin caching parameter assignment info

* Factor out some reflection code to a reusable location

* Use IPropertySetter to avoid all per-property-assignment reflection

* More error cases and tests for parameter assignment

* Enable binding to nonpublic properties

* Add analyzer to warn and provide fix for public component parameters

* Unit test for analyzer

* Component tag helper now includes private properties if they have [Parameter]

* CR feedback: Remove garbage from csproj

* CR feedback: Rename .Build.Analyzers to .Analyzers

* CR feedback: Move BlazorApi.cs to shared; use it from Analyzers test

* Fix incorrect test name

* Make as many parameters private as possible. Replace ILayoutComponent with BlazorLayoutComponent.

* In component tag helper discovery, consider private members too

* Reduce the work in component parameter discovery by not inspecting the BlazorComponent base class (or System.Object)
2018-05-01 10:08:01 +01:00
Daniel Roth ec1b220b7d Fixup project templates to handle project names with dashes (#692)
Fixes #291
2018-04-30 21:27:22 -07:00
Ryan Nowak f661021324 Add [Parameter] for component parameters
This change introduces ParameterAttribute to specify a bindable
component parameter. As of the 0.3 release of Blazor we plan to make
[Parameter] required to make a property bindable by callers.

This also applies to parameters when their value is set by the
infrastructure, such as `Body` for layouts, and route paramters.

The rationale behind this change is that we think there is a need to
separate the definition of properties from their suitability for a
caller to set them through markup. We plan to introduce more features in
this area in the future such as marking parameters as required. This is
first step, and we think that this approach will scale nicely as we add
more functionaly.

The 0.3 release seems like the right time to change this behavior since
we're also introducing `ref` for captures in this release.
2018-04-30 13:35:08 -07:00
Steve Sanderson 76bf82eb49 OnAfterRender / OnAfterRenderAsync (#691)
* Implement OnAfterRender and OnAfterRenderAsync

* Add E2E test combining OnAfterRender with "ref" and JS interop

... because this combination is the key to integration with 3rd-party JS
libs
2018-04-27 19:45:19 +01:00
Steve Sanderson 4033560734 Support 'ref' syntax for capturing references to elements and components (#685) 2018-04-27 17:41:21 +01:00
Steve Sanderson a700fa945e Fix ordering issue with nested logical element insertion 2018-04-27 15:43:59 +01:00
Emanuele Filardo 74b2b6b232 Set Program class as public in standalone project template 2018-04-26 23:25:13 +01:00
Ryan Nowak ed06d7b12e Rough cut at async events 2018-04-26 13:31:28 -07:00
Steve Sanderson c8cc0145e0 Make Razor.Design a transitive dependency
By making Razor.Design a transitive dependency of Blazor.Build we can
avoid the need for users to care which version of Razor we depend upon,
and take it out of the templates.
2018-04-25 15:46:48 -04:00
Zachary Becknell 0457a709be Update README.md 2018-04-24 21:31:24 -04:00
Steve Sanderson 60dcc6e568 In Razor compilation, trim leading and trailing whitespace nodes (#586)
* In Razor compilation, trim leading and trailing whitespace

* Update all unit tests to account for whitespace trimming

* Recognize that TagHelperIntermediateNode produces output too

* Skip TrimWhitespacePass during first phase of two-phase compile

* Skip TrimWhitespacePass during design-time builds

* Update baselines after rebase
2018-04-24 21:44:30 +01:00
Ryan Nowak c152ed9e2a Update baseline linendings 2018-04-23 21:48:13 -07:00
Steve Sanderson 6e85f4cb13 Replace 'nobr' with 'span.text-nowrap'. Fixes #652 2018-04-23 09:36:37 +01:00
Daniel Roth b05b3cac23 Add instructions for installing the VSIX from myget 2018-04-20 16:33:54 -07:00
Steve Sanderson 9f589b71df Fix diffing when "bind" is combined with conditional attribute. Fixes #624 2018-04-20 22:49:12 +01:00
Daniel Roth d0e09a066c Change blazorlib output type to Library 2018-04-19 16:06:32 -07:00
Ryan Nowak f5dc6df13d Fix #597 Allow multiple tokens in attributes
The issue here is that we were missing tests for the design time code
path. We have tests that the bind-... cases work at runtime but were
missing coverage for the editor.

I took the most relevant set of the tests for running bind-... code and
added them to the tests for codegen.
2018-04-19 16:14:10 -04:00
Steve Sanderson d02436d55c Bootstrap 4 and new styling (#619)
* Upgrade to bootstrap v4

Remove  redundant MIME type

* Add new styling to StandaloneApp

* Update THIRD-PARTY-NOTICES.txt

* Update version of Blazor used by templates when running from source

* Update styling on BlazorStandalone.CSharp template

* Tweak brace style

* Update styling in BlazorHosted.CSharp template

* Update E2E tests that rely on specific CSS

* Add Open Ionic fonts license to notices too
2018-04-19 21:06:28 +01:00
Ryan Nowak 195bf63c6c Fix line endings on OSX
This change makes our baseline system use CRLF for line endings end to
end. This isn't needed for correctness, but it helps with quality of
life when developing on OSX.

This will avoid churn to the baseline files related to line endings when
updating.

This might only take effect if you nuke the TestFiles directory and
check it out again.
2018-04-18 15:04:35 -04:00
Steve Sanderson ac1af2274b Eliminate wrapper elements (#602)
* Factor out all DOM-structure modifying code into an abstraction. Currently, implementation is still backed by the same underlying DOM APIs

* Implement LogicalElement properly (store hierarchy in own property; use comment nodes as containers)

* In LogicalElement, be explicit about unsupported scenarios

* Update E2E tests to stop assuming existence of wrapper elements

* Where supported, store private properties using opaque symbols as keys
2018-04-18 13:54:25 +01:00
Daniel Roth ab023a375d Fix readme typo 2018-04-17 16:14:29 -07:00
Daniel Roth 5a29f2934e Point to Blazor getting started guide 2018-04-17 11:22:51 -07:00
Zachary Becknell dd7bd2ba20 Update README.md
Update SDK link
2018-04-17 11:17:00 -07:00
Zachary Becknell a9dc626cbe SimpleJson: more informative exception when attempting to deserialize
object with non-empty constructor
2018-04-17 14:35:02 +01:00
Steve Sanderson 6c5f2a2262 Fix for logic around whether to include custom restore sources in template output 2018-04-17 09:43:45 +01:00
Ryan Nowak 2027dd4acd Quote MSBuild arguments 2018-04-16 15:08:22 -07:00
Ryan Nowak fb560b0c7b Update README.md
Fix typos
2018-04-16 14:34:19 -07:00
Ryan Nowak 62de983753 Update README.md 2018-04-16 13:06:29 -07:00
Guillaume ZAHRA 5112f9b310 AutoRebuild: System.ComponentModel.Win32Exception : 'Access denied'
Current AutoRebuild implementation crash if trying to launch the app hosted in IIS.

Current found hierarchy:

- svchost
|
   -- w3wp
   |
     -- VSIISExeLauncher
     |
       -- dotnet

devenv is not found of course in this scenario.

Even if the try catch seem to be good, when accessing the root process svchost, this exception is thrown:

System.ComponentModel.Win32Exception : 'Access denied'

in the 'while' statement

Due to this behavior, the try/catch need to be bubbled on the top of the while loop in order to have the correct behavior in case of fatal failure.
2018-04-16 16:01:39 +01:00
Steve Sanderson 03b8f2c99f Update templates' global.json files to require SDK 2.1.300-preview2-008533 2018-04-16 10:03:19 +01:00
Steve Sanderson b4c023b053 Only remove templates' custom RestoreSources for final 'rtm' builds 2018-04-16 09:52:28 +01:00
Zachary Becknell 1ef5429ca9 Remove extra apostrophe 2018-04-16 09:39:32 +01:00
Steve Sanderson edf84cb80a Update link in compiler error message 2018-04-13 17:02:07 +01:00
Steve Sanderson 4cbf6cc64b Enable GenerateDocumentationFile. Add/fix XML docs. 2018-04-13 16:57:09 +01:00
Steve Sanderson 2f792cf53b Pass list of embedded resources candidate assemblies via temp file in intermediate dir. Fixes #554 2018-04-13 16:55:30 +01:00
Steve Sanderson ce8088f9a3 Inject MSBuild properties into templates during build 2018-04-13 16:50:33 +01:00
Steve Sanderson ce3c79e051 Reject script tags in components, but allow overriding. Fixes #552 (#553) 2018-04-12 16:28:31 +01:00
Steve Sanderson 2f4e60b134 Set 'NoRestartServerOnBuild' by default. This means we can re-enable IISExpress when we think people are all on VS15.7Pre3 or later 2018-04-12 12:12:09 +01:00
Steve Sanderson 2b5f61c8b1 Fixed version number of built templates package 2018-04-12 11:53:52 +01:00