Commit Graph

20 Commits

Author SHA1 Message Date
Crystal Qian 489c0d9046 Added view component tag helper updates. (#823)
Added view component tag helper updates.

aspnet/mvc#1051
2016-08-24 16:01:59 -07:00
Ajay Bhargav Baaskaran f09e2bf571 [Fixes #804] Fixed unsafe cast in CSharpCodeVisitor 2016-08-08 16:38:51 -07:00
N. Taylor Mullen 9c4eee14b8 Update tests to follow developer guidelines.
- Moved tests to match their corresponding test src files.
- Updated test namespaces to match their corresponding test src files.

#782
2016-06-21 12:08:50 -07:00
mnltejaswini 3b9539960b [Perf] Preallocate TagHelperAttributes for simple bound string valued attributes Fixes #704 2016-06-01 11:24:32 -07:00
N. Taylor Mullen e14f4b095d Track `TagHelperAttribute` quotes.
- Removed `Minimized` from `TagHelperAttribute` and replaced it with `HtmlAttributeValueStyle`.
- Removed `AddMinimizedTagHelperAttribute` method from `TagHelperExecutionContext` since we always provide a `HtmlAttributeValueStyle` now.
- Stopped manually escaping double quotes because we now know how an attribute was originally written.
- Updated tests to account for new attribute format (from kvp).

#705
2016-05-27 12:28:33 -07:00
mnltejaswini bde78dc3d4 [Perf]: Avoid ViewBuffers for writing bound TagHelper attribute values
Fixes #717
2016-05-25 12:06:03 -07:00
N. Taylor Mullen d27ab1ce3d React to `HtmlEncodedString` rename to `HtmlString`.
- Updated test output to reflect new `HtmlString` naming.

aspnet/HtmlAbstractions.25
2016-05-17 12:13:26 -07:00
Ajay Bhargav Baaskaran 9bfa74d829 [Fixes #739] Newline after text tag rendered only if followed by html 2016-05-02 16:29:29 -07:00
Ajay Bhargav Baaskaran b520c9c15e Fix: Newline at the end of text tag in code block is rendered as markup 2016-04-26 15:43:18 -07:00
N. Taylor Mullen 4212b7e713 Add `SetOutputContentAsync` to `TagHelperExecutionContext` to prevent allocation of `Task<T>`.
- Previously we'd do `executionContext.Output.Content = await executionContext.Output.GetChildContentAsync()`. The problem with this approach is that it returned a `Task<TagHelperContent>` which could not be optimized when building in release.
- Added test to validate `SetOutputContentAsync` does the appropriate thing.

#721
2016-04-02 22:58:37 -07:00
N. Taylor Mullen f5c79b62de Prevent method => delegate conversion happening multiple times.
- The conversion now only occurs on the construction of the `TagHelperScopeManager` which only occurs once.
- Updated tests.

#720
2016-03-29 10:18:10 -07:00
N. Taylor Mullen 3c73ae9cfe Change `TagHelperOutput` and `TagHelperContext` lifetimes.
- `TagHelperOutput` and `TagHelperContext` lifetimes now mach `TagHelperExecutionContext`s. This means once a set of `TagHelper`s have run on a tag the `TagHelperOutput`/`TagHelperContext` will be re-used.
- Added tests to validate the various `Reset`/`Reinitialize` methods behaved correctly.
- Updated codegen to no longer set `TagHelperExecutionContext.Output`.

#719
2016-03-28 11:54:48 -07:00
Doug Bunting a8d4da9f17 Add a couple of missing `global::` prefixes
- was missing when writing out full name of an `enum` value
- was missing in one case when writing out `TagHelperAttribute` type name

nit: updated `CSharpTagHelperFieldDeclarationVisitor.WritePrivateField()` to always include the prefix
- no change in generated code but centralizes the prefix addition and reduces intermediate `string`s
2016-03-26 19:12:36 -07:00
N. Taylor Mullen e5927ddd01 Add CSS attribute selectors for `TagHelper` attributes.
- Added the ability for users to opt into CSS `TagHelper` selectors in their required attributes by surrounding the value with `[` and `]`. Added operators `^`, `$` and `=`.
- Added tests to cover code paths used when determining CSS selectors.

#684
2016-03-08 12:15:06 -08:00
N. Taylor Mullen 9f675abbca Pre-allocate unbound `TagHelper` attributes.
- Hoist `TagHelperAttribute` creation into `private static readonly` fields to avoid allocations on every request. With the recent `TagHelperAttribute` change that made them immutable we can now pre-allocate them without worry of them being modified.
- Added two extra class configuration pieces to enable pre-allocation.
- Updated test files to showcase new pre-allocations.

#600
2016-03-01 11:23:49 -08:00
Ajay Bhargav Baaskaran 6cd13c441e [Fixes #691] Use WriteAttributeTo when TextWrites is not null 2016-02-24 12:31:13 -08:00
hexelium a0164b005d (#346) Fixed case when razor fails to recognize escape shortcut when the first character in a text is `:`. For example @::sometext. 2016-02-15 20:51:43 +02:00
N. Taylor Mullen 6bad1bba5b Enable Razor templates inside of sections.
- Changed the variable used to render templates (`HelperResult`s) so they can be used inside of sections.
- Updated section test file to showcase nested scenario. Also Regenerated existing test files.

#572
2016-02-11 12:01:34 -08:00
N. Taylor Mullen 3968eded19 Rename AspNet 5 file contents.
See https://github.com/aspnet/Announcements/issues/144 for more information.
2016-01-22 12:21:25 -08:00
N. Taylor Mullen 3542ec3167 Rename AspNet 5 folders and files.
See https://github.com/aspnet/Announcements/issues/144 for more information.
2016-01-22 12:21:05 -08:00