Commit Graph

34 Commits

Author SHA1 Message Date
Doug Bunting ff91e796c1 Revert "Fixing tests"
- wrong fix especially now that test encoders work as expected
- touch up `HtmlHelperTest` and `RazorViewTest` since test encoders are now consistent
- remove references to old `Microsoft.Extensions.WebEncoders.Testing` package

This reverts commit a9d5876cd9.
- but leave `FormTagHelperTest` and `ValidationMessageTagHelperTest` cleanup alone

nit: use `string.Empty` in `HtmlHelperLinkGenerationTest`
2015-11-02 09:45:56 -08:00
Chris R 52f4a83139 React to WebEncoders changes. 2015-10-30 17:59:19 -07:00
Doug Bunting c267ef3904 Rename `AppendEncoded()` to `AppendHtml()` and `SetContentEncoded()` to `SetHtmlContent()`
- #3225, 3 of 3
2015-10-22 16:57:47 -07:00
Doug Bunting 40b7636b72 Use `ModelMetadata.GetDisplayName()` in error message replacing `FormatException` and `OverflowException`
- #3227
- much of change is to tests, creating and passing `ModelMetadata`
- updated `InputFormatterContext` to make `ModelMetadata` available to `JsonInputFormatter`
  - walk `ModelMetadata` tree to get information about property with an issue
- add missing `null` checks in `ModelStateDictionaryExtensions`
2015-10-22 15:50:36 -07:00
Eilon Lipton 55b72c04bf Add high-pri doc comments for views, controllers, HTML helpers, Startup 2015-10-20 18:24:56 -07:00
Pranav K 8b0c157296 Rename ModelState (the type) -> ModelStateEntry
Fixes #3326
2015-10-20 16:43:00 -07:00
Ajay Bhargav Baaskaran d40e6612a4 Moving the order of generated hidden tags for checkbox to end of the form
- #2994
- Affects both HtmlHelper and TagHelper scenarios
- Checkboxes not enclosed in a form will generate inline hidden tags
- Added necessary properties to FormContext
- Added some functional and unit tests
2015-10-14 15:43:13 -07:00
Pranav K a602d548e2 Allow ViewFeature tests to run in dnxcore50 2015-10-06 09:46:49 -07:00
Pranav K f57e180971 Renaming Microsoft.Framework.* -> Microsoft.Extensions.* 2015-10-03 15:44:53 -07:00
Ryan Nowak 6185b16795 Custom dictionary type for attributes 2015-10-02 18:08:58 -07:00
Ajay Bhargav Baaskaran eefa58e617 [Fixes #3043] Overflow exceptions converted to invalid value messages 2015-09-29 16:24:19 -07:00
Ryan Nowak 0d6edf240a Move ModelExplorer to ViewFeatures 2015-09-28 14:14:40 -07:00
Pranav K 18c80d156c Replace NotNullAttribute with thrown exceptions 2015-09-26 23:48:43 -07:00
Kirthi Krishnamraju 0889b18f95 Add localizers to validation attributes 2015-09-25 16:13:21 -07:00
Ryan Nowak a318c4599a API Review - Split up .Actions
Abstractions - Core MVC extensibility

Controllers - MVC implementations of .Abstractions and supporting
contracts

Infrastructure - General purpose support APIs. Metadata APIs that don't
fit clearly with a feature or with .Abstraction
2015-09-21 21:54:02 -07:00
Pranav K 7b433820b1 Changes per PR comments
Reformatting parameter identation
2015-09-17 15:42:58 -07:00
Ryan Nowak 538cd9c191 Move less-commonly used types out of .Rendering 2015-09-16 23:52:29 -07:00
Ryan Nowak 9a15b54d30 Flow IHtmlContent through to the razor buffer 2015-09-16 16:17:40 -07:00
Ryan Nowak a707311d9e Fix #3087 - use IHtmlContentBuilder in TagBuilder
Improves authoring experience when using TagBuilder by taking advantage of
IHtmlContentBuilder an its extension methods.

TagBuilder.InnerHtml is no longer settable.
2015-09-16 10:03:03 -07:00
Ryan Nowak 94388a8804 React to BufferedHtmlContent changes 2015-09-13 13:51:53 -07:00
Ryan Nowak 076ce6a8a1 Make ModelBindingResult a struct. 2015-09-03 12:52:50 -07:00
Hao Kung 3ebdcc5f6f React to options changes 2015-09-02 14:07:06 -07:00
Ryan Nowak 229724c4ea Reorganize MVC namespaces 2015-09-01 22:28:33 -07:00
Doug Bunting a045324d3a Do not include compiler-generated names in expression names
- #2890
- add lots of `ExpressionHelper` tests using `IdFor()` and `NameFor()` (which are thin veneers)
2015-08-23 14:22:49 -07:00
Ryan Nowak 6d365e9a32 Make ValueProviderResult a string-ish struct 2015-08-21 11:02:40 -07:00
sornaks f2540f9ba1 Making TagBuilder implement IHtmlContent and removing ToHtmlContent.
- Making TagRenderMode a property in TagBuilder.
- Modifying places where TagBuilder is used to suit the new model.
- This reduces space occupied by a normal application by 11.8%.
2015-08-14 10:58:51 -07:00
sornaks b6a109e2a3 Making DefaultDisplayTemplates and DefaultEditorTemplates use IHtmlContent.
- Making TagBuilder's InnerHtml an IHtmlContent.
- Delay encoding until the content is written.
- Moving BufferedHtmlContent to Common cos it is used in aspnet/Razor also.
- Changing GenerateOption to take in a string and create StringHtmlContent.
- This reduces the space used by around 13%.
2015-08-10 14:55:34 -07:00
Pranav K 7120b2ff92 Removing MvcViewEngineDescriptor and switching to use OptionsSetup to
setup RazorViewEngine.

Fixes #2269
2015-07-29 14:14:07 -07:00
Ajay Bhargav Baaskaran 8039ebc7d1 Merge branch 'release' into dev 2015-07-16 15:55:15 -07:00
Ajay Bhargav Baaskaran 92f3e21fe6 Fix: Metadata ignored for non model-specific EditorTemplate
Issue - #2778
2015-07-16 15:48:01 -07:00
Mugdha Kulkarni a6a7903b84 2721: Fixing the error message for empty html field name 2015-07-16 12:37:18 -07:00
Ajay Bhargav Baaskaran baee4a0661 [Fixes #2780] Use type=text for float and double 2015-07-14 15:32:25 -07:00
sornaks a02082397a Introducing IHtmlContent in Mvc.Razor.
- Changing HtmlHelper and HelperResult to implement IHtmlContent.
- Introducing BufferedHtmlContent.
- Making RazorPage handle only IHtmlContent and clearing out other types.
- Making StringCollectionTextWriter use BufferedHtmlContent so that it can be returned where necessary.
- Updating places which involve Write/Copy to pass in encoders.
- The encoders are currently not being used during write. But when HtmlString is modified to carry encode metadata, the encoder can be used for writing. This is a perf optimization and hence not a part of this change.
- Making TagHelperContent implement IHtmlContent.
2015-07-10 16:24:32 -07:00
Ryan Nowak e985fa5d42 Split up MVC.Extensions into smaller packages
Startup.cs API experience to follow in a separate change. This change just
gets the bulk of the code churn out of the way.
2015-07-06 23:41:22 -07:00