Commit Graph

58 Commits

Author SHA1 Message Date
Ryan Brandenburg edf4e8fd9e DataAnnotations of Enum values use DataAnnotationLocalizerProvider 2018-05-25 16:00:00 -07:00
Jass Bagga d27e66a8fc
Initialize ViewContext for TagHelperComponentTagHelper (#7326)
Addresses #7017
2018-02-06 16:07:38 -08:00
Pranav K b6144142fe Update samples and tests to target netcoreapp2.1 2017-11-13 14:58:40 -08:00
Pranav K 6bf165f22f Update default Razor search paths to include ~/[PagesRoot]/Shared
Fixes #6604
2017-09-11 14:11:39 -07:00
Pranav K d1813a7cd7 Normalize paths returned by view location expanders
Fixes #6448
2017-06-27 08:48:07 -07:00
Jass Bagga e681c23d5c Add ITagHelperComponentManager (#6302)
Addresses #6282
2017-05-23 13:22:15 -07:00
Pranav K 1c5e417606 Change TFM to netcoreapp2.0 (#6234)
* Change TFM to netcoreapp2.0
2017-05-04 18:11:26 -07:00
Jass Bagga eda5028cf4 Add TagHelperComponentTagHelper
Addresses #5728
2017-03-29 11:29:24 -07:00
Pranav K badb6ce8e5 Remove net451 as a cross-compile target 2017-03-22 06:32:50 -07:00
Doug Bunting 63507c8da9 Bump test projects up to .NET 4.5.2
- aspnet/Testing#248
- xUnit no longer supports .NET 4.5.1
- update AppVeyor config so this framework version is available
- build tests for desktop .NET only on Windows
2017-02-21 07:15:36 -08:00
Ryan Nowak 84d2e027f5 Use new Razor in MVC 2017-01-30 10:55:49 -08:00
Pranav K a52d692de0 Updating to netcoreapp1.1 2016-10-13 11:21:09 -07:00
Pranav K ed1378a365 Revert "Updating to netcoreapp1.1"
This reverts commit 398a104810.
2016-10-12 16:09:12 -07:00
Pranav K 398a104810 Updating to netcoreapp1.1 2016-10-12 14:24:52 -07:00
Ajay Bhargav Baaskaran a6a4b5369a [Fixes #5166] Support passing instance directly when invoking ViewComponents with single parameter 2016-08-26 16:33:42 -07:00
Pavel Krymets 42c3397b6e Migrate tests, tools and samples to portable 2016-04-18 17:20:15 -07:00
N. Taylor Mullen 33d1aea8ea Transition to Netstandard.
- dotnet5.X => netstandard1.y (where y = x-1).
- DNXCore50 => netstandardapp1.5.
- Applied the same changes to ifdefs.
2016-03-01 13:39:31 -08:00
Pranav K 5b805bb12d Updating to use cli
Fixes #3908
2016-02-22 17:49:51 -08:00
ryanbrandenburg 2aca8810d3 * Give message correct path. 2016-02-02 11:08:41 -08:00
Ajay Bhargav Baaskaran f0777b95a8 [Fixes #3868] Exclude Antiforgery token in form with method Get 2016-01-21 11:29:41 -08:00
Ryan Nowak 676bde29b9 Make Begin[Route]Form include antiforgery 2016-01-07 13:24:01 -08:00
Pranav K 399e516065 Modify IViewComponentHelper to remove method selection ambiguity.
Fixes #612
2015-12-23 10:02:51 -08:00
Doug Bunting 08dd77d8c7 Add relative view path support
- #3307
- relative paths are now supported in `View()` calls from components and view components,
  `Html.PartialAsync()` and similar calls, and `RazorPage.Layout` settings.
  - support absolute paths, relative paths, and view location lookups consistently / everywhere
  - support view paths in `TemplateRenderer` e.g. passing an absolute path to `Html.EditorFor()`
- take a big swing at the `IRazorViewEngine` and `IViewEngine` interfaces
  - split lookups (view names) from navigation (view paths)
  - remove `Partial` separation; use parameters to set `IsPartial` properties
- correct `ViewContext` copy constructor and add unit test
- extend unit tests to cover relative paths
  - fix existing tests to handle newly-required extension in an absolute path
- add functional test that chains relative paths

nits:
- remove some YOLO line wrapping
- `""` -> `string.Empty`
2015-11-18 15:59:11 -08:00
N. Taylor Mullen bebd3dc9a0 Update test files to showcase block level Razor statements in attributes.
- Block level Razor statements in attributes used to not work. Added a few use cases to ensure that they're properly tested.

aspnet/Razor#594
2015-11-06 11:11:40 -08:00
Doug Bunting ff19702db5 Remove `WaitService`
- use `MvcTestFixture` instead of `TestHelper`
  - part of #3139
- continue to test e2e interaction of `FlushAsync()` with sections, partials, et cetera
- remove `FlushPointTest.FlushBeforeCallingLayout()`
  - `RazorPageTest.FlushAsync_ThrowsIfTheLayoutHasBeenSet()` unit test covers the scenario
2015-10-28 15:47:16 -07:00
Pranav K 89f58aa49f Allow @model specified in a page work with @inherits directive in
_ViewImports

Fixes #3144
2015-09-23 12:10:10 -07:00
N. Taylor Mullen e73e73acdd Add `srcset` to list of application relative resolvable URLs.
- Now allow the attribute to exist on `img` and `source` tags.
- Updated existing `UrlResolutionTagHelper` functional test to validate `srcset` attribute.

#2964
2015-08-14 15:58:02 -07:00
N. Taylor Mullen 1b51f6bca6 Enable input, image and url resolution `TagHelper`s to be written as void elements.
- Razor rendering now understands `TagMode` which allows void elements to be rendered.
- Added a `TagStructure.WithoutEnd` bit to `InputTagHelper`, `ImageTagHelper` and `UrlResolutionTagHelper`. This will allow users to write the various elements in the void format. Used the HTML5 spec to determine the elements appropriate.
- Added tests to ensure `TagMode.StartTagOnly` is rendered properly.
- Updated a few functional tests to showcase the void element formats.

aspnet/Razor#450
2015-08-13 16:19:28 -07:00
N. Taylor Mullen 0ef68eefc8 Added default `UrlResolutionTagHelper` to resolve app relative URLs.
- Razor removed the ability to automatically resolve URLs prefixed with `~/`; therefore `ScriptTagHelper`, `LinkTagHelper` and `ImageTagHelper` have changed to take in `IUrlHelper`s and auto-resolve their URL based properties if they start with `~/`.
- Added a catch-all `~/` resolver for non `TagHelper` based HTML elements. Razor used to resolve any attribute value that started with `~/` now the behavior is restricted to attributes that can contain URLs.
- Updated `IUrlHelper` to accept `null` values.
- Added functional tests to validate that URLs resolve correctly.
- Updated `TagHelper` tests to ensure that URLs are resolved via an `IUrlHelper`.

#2807
2015-08-03 16:00:33 -07:00
sornaks 7606c81482 Renaming - file case. 2015-07-02 14:20:10 -07:00
Kirthi Krishnamraju 30d11a8227 Added LanguageViewLocationExpander into framework and removed it from samples 2015-06-04 14:06:08 -07:00
Doug Bunting 8a701726b3 Rename _GlobalImport.cshtml files to _ViewImports.cshtml
- also rename files and directories with "GlobalImport" in name
 - nearly blind but avoid "ViewImportss" in new names
- public API change: `ViewHierarchyUtility.GetGlobalImportLocations()` -> `GetViewImportsLocations()`
 - primary source updates were comments, tests, and implementation details

nit:
- rename NestedGlobalImports.cs file to NestedViewImportsController.cs, matching class
2015-05-21 12:27:08 -07:00
Kirthi Krishnamraju caa8ea44fb Fix #448: Support app-wide defaults for HTML helpers 2015-05-12 14:10:59 -07:00
N. Taylor Mullen 35fc8279dd Updated missed dnx name changes. 2015-03-09 02:17:58 -07:00
Pranav K 73f44889f2 ViewLocationExpanderContext should have a flag that indicates if the
lookup is for a full or partial view

Fixes #1212
2015-02-26 16:41:54 -08:00
Pranav K eb7b0d6ae3 * Introduce _GlobalImports to inherit directives.
* Remove inheritance from _ViewStarts

Fixes #825
2015-02-18 10:02:37 -08:00
Pranav K a33e83f363 Adding IView.Path and ViewContext.ExecutingPagePath
Fixes #1940
2015-02-13 06:12:15 -08:00
Pranav K 7667eba34e Layouts for partials
Fixes #1621
2015-01-20 11:44:48 -08:00
Kirthi Krishnamraju 9ea5350271 Added more coverage in functional tests for FlushAsync 2015-01-05 10:36:37 -08:00
Pranav K 110ee28e3e Adding support for flowing compilation settings to views
Fixes #871
2015-01-02 15:34:52 -08:00
sornaks 1570e198ef Bug #1354 - ViewComponent View() fails on CoreCLR with IEnumerable<> passed in.
Fix - When the model is passed in to a View, ViewDataDictionary sets it. During this process, we recurse through all the properties and create FastPropertyGetters for each of them. In this case, since it is an enumerable, the properties which we recurse through are not the elements of the collection but the properties of the Enumerable instead. i.e - Enumerable.Current. Creating getters for these properties are not necessary. The fix moves the property iteration step to a place where the properties are actually requested.
- Splitting TypeInformation class into two and separating their caches appropriately.
2014-12-16 12:19:38 -08:00
Kirthi Krishnamraju d8455c3e64 Make Flush work without requiring curly braces
Fixes #1547
2014-12-05 14:53:09 -08:00
ianhong 5b1eae494e Update templates\samples\tests to use ensure viewstart.cshtml and views directory names are cased appropriately. #1559 2014-12-05 13:27:22 -08:00
Pranav K 7b20909a60 Revert changs to Flush point tests made as part of 4ad3e9
This should resolve timing issues that are currently being seen.
2014-12-03 12:56:14 -08:00
Pranav K 933f7eeb22 Layout specification and discovery should follow the same behavior as
partials

Fixes #1047
2014-12-03 11:54:46 -08:00
Praburaj cfd5630cf2 Addressing breaking IFileSystem changes
@pranavkm
2014-12-02 15:58:05 -08:00
Doug Bunting 5e067cdb9e Delete trailing whitespace
- #EngineeringDay
- Total replaced: 660  Matching files: 270 in *.cs
- Total replaced: 250  Matching files: 32 in all other files
- Total replaced: 22  Matching files: 8 in a few stragglers

Did not change files under following directories
- test\Microsoft.AspNet.Mvc.Razor.Host.Test\TestFiles\Output
- test\Microsoft.AspNet.Mvc.FunctionalTests\compiler\resources
- test\WebSites\TagHelpersWebSite
(Razor generates trailing whitespace in a case or two)
2014-11-20 16:18:09 -08:00
Pranav K 052ad3e95f RenderSection \ RenderSectionAsync does not work in sections
Fixes #1509
2014-11-14 12:17:25 -08:00
Pranav K 75c6327b2e Layout property needs to be propogated between nested view starts
Fixes #1364
2014-10-15 18:54:02 -07:00
Pranav K de77c92a0a Reviving PartialViewResult and associated methods on Controller
Fixes #824
2014-10-15 18:28:08 -07:00