Skip to content

Bug: Prioritize area views over regular views #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
JeremyCaney opened this issue Mar 16, 2021 · 1 comment
Closed

Bug: Prioritize area views over regular views #60

JeremyCaney opened this issue Mar 16, 2021 · 1 comment
Assignees
Labels
Area: Web Relates to the `AspNetCore` or other web-related functionality. Priority: 1 Severity 1: Minor Status 5: Complete Task is considered complete, and ready for deployment. Type: Bug Behavior that is inconsistent with documented or expected behavior.
Milestone

Comments

@JeremyCaney
Copy link
Member

The TopicViewLocationExpander defines a number of custom conventions for loading views based on the Topic.ContentType as well as an optional View (which can be defined in a variety of locations). Currently, if the view exists in both /Areas/{Area}/Views and /Views, however, the latter takes precedence. This is unintuitive and unexpected; we'd expect the view closest to the current controller to take precedence.

@JeremyCaney JeremyCaney added Type: Bug Behavior that is inconsistent with documented or expected behavior. Area: Web Relates to the `AspNetCore` or other web-related functionality. Severity 1: Minor Priority: 1 Status 5: Complete Task is considered complete, and ready for deployment. labels Mar 16, 2021
@JeremyCaney JeremyCaney added this to the OnTopic 5.1.0 milestone Mar 16, 2021
@JeremyCaney JeremyCaney self-assigned this Mar 16, 2021
JeremyCaney added a commit that referenced this issue Mar 17, 2021
If a view of the same name exists in both `/Areas/{Area}/Views` and `/Views`, the former should take precedence. Currently, the oppose is true. This is unintuitive and confusing. This resolves #60. This is validated by the new integration tests (b64b348, 7049cc9).
@JeremyCaney
Copy link
Member Author

This is resoled by placing the evaluation of the AreaViewLocations above the ViewLocations (b091617), and is validated by the new TopicViewLocationExpander integration tests (b64b348, 7049cc9).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Web Relates to the `AspNetCore` or other web-related functionality. Priority: 1 Severity 1: Minor Status 5: Complete Task is considered complete, and ready for deployment. Type: Bug Behavior that is inconsistent with documented or expected behavior.
Projects
None yet
Development

No branches or pull requests

1 participant