Skip to content
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

V15: Add abstraction for named entity detail workspaces #17959

Merged
merged 8 commits into from
Jan 14, 2025

Conversation

iOvergaard
Copy link
Contributor

@iOvergaard iOvergaard commented Jan 13, 2025

Description

This is part 1 of 2 for a fix to #17514

This pull request introduced a new abstract workspace base class to use for named entities such as data types, partial views, folders, static files, etc. This is useful because a lot of the code was duplicated, and it has the added benefit of validating all of the workspaces at runtime as a namable workspace. This last part becomes important later on in the next pull request, which will introduce validation for the name field on all the affected workspaces.

The change to the data type workspace showcased in this pull request is the change, that I will add to all other workspaces in the next pull request. This demonstrates that the abstraction works.

Bonus: Added validation to all the static file handlers (partial views, scripts, stylesheets, and templates) which mimics the server. This allows us to verify that the validation works.

Workspace Context Refactoring:

How to test

Make sure you can create new data types and update existing ones.

Copy link
Member

@leekelleher leekelleher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested out, I can create new data-types and save existing ones, as well as unable to save data-types without names. Browsing over the code, LGTM! 🚀

Looking forward to reviewing #17980 next!

@leekelleher leekelleher merged commit c3134cb into v15/dev Jan 14, 2025
30 checks passed
@leekelleher leekelleher deleted the v15/bugfix/static-files-validation branch January 14, 2025 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants