feat(style-editor): Improved empty message#35496
Conversation
…d permissions - Added and to manage access to the style editor and permissions tabs based on feature flags and user permissions. - Introduced to resolve permissions for displaying the permissions tab. - Updated routing to include guards and resolvers for the new tabs. - Enhanced component templates to reflect the new tab structure and logic. - Added unit tests for guards and resolver to ensure correct functionality. This implementation improves user experience by conditionally displaying tabs based on user permissions and feature availability.
|
Claude finished @KevinDavilaDotCMS's task in 2m 17s —— View job PR Review
Three real issues, one design concern. 1. Unused
|
Response to Claude bot reviewApplied #2 (removed dead i18n keys) and #3 (converted to functional Skipping the rest: #1 — Redundant API call: The resolver and guard serve different purposes — the resolver drives tab visibility in the parent template, while the guard protects direct URL access. Collapsing them by reading resolver data from the route snapshot would create tight coupling: if the resolver is ever removed, the guard would silently break. The extra API call is negligible for this path. #4 — Weak test assertions ( #5 — Magic string #6 — |
…tional resolver - Replaced the class-based DotContentTypeTabsResolver with a functional resolver, dotContentTypeTabsResolver, utilizing Angular's ResolveFn. - Updated unit tests to reflect the new resolver structure and ensure correct functionality. - Adjusted routing to use the new functional resolver for tab permissions. This change simplifies the resolver implementation and enhances maintainability.
…sibility and functionality - Added data-testid attributes to key elements in the DotUveStyleEditorEmptyStateComponent for better testability. - Replaced the anchor tag with a PrimeNG button for the call-to-action, improving accessibility and user interaction. - Updated the HTML structure to ensure proper rendering of the empty state message and title. - Introduced unit tests for the new component structure, ensuring correct functionality and rendering. This update enhances the user experience and maintainability of the style editor's empty state component.
…hance component tests - Removed unused GlobalStore dependency from DotContentTypeEditResolver, simplifying the resolver logic. - Updated the resolver to directly return content types without additional breadcrumb management. - Introduced GlobalStore mock in component tests for DotContentTypesEditComponent to ensure proper test isolation and functionality. - Enhanced unit tests to validate the new resolver behavior and component interactions. These changes improve the clarity and maintainability of the content type editing functionality.
rjvelazco
left a comment
There was a problem hiding this comment.
Yes, since is a route, is fetched every time the user enter |


This implementation improves user experience by conditionally displaying tabs based on user permissions and feature availability.
Proposed Changes
Checklist
Additional Info
** any additional useful context or info **
Screenshots
This PR fixes: #35466
This PR fixes: #35466