-
Notifications
You must be signed in to change notification settings - Fork 480
Update usage dashboard UI to match official dotCMS UI #34168
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
Conversation
- Replaced the usage header with a PrimeNG toolbar for better action handling. - Enhanced loading state with a more structured skeleton layout for site metrics, system configuration, and user activity. - Updated error handling to use PrimeNG card components for a cleaner presentation. - Refactored dashboard content layout to utilize flexbox for better responsiveness. - Adjusted SCSS styles to align with new component structure and improve overall styling consistency. This update enhances the user experience and maintains a modern design approach.
…yling - Adjusted skeleton component heights for better visual consistency. - Added margin utility class to paragraph elements within skeleton templates. - Enhanced SCSS styles for skeleton display and h3 elements to improve layout and readability. These changes aim to refine the user interface and enhance the loading experience in the dot-usage-shell component.
…ttpClient providers
- Introduced DotUsageService to fetch usage summary metrics from the backend API. - Implemented error handling for various HTTP status codes. - Added unit tests for DotUsageService to validate summary retrieval and error handling. - Updated dot-usage-shell component to manage loading and error states using signals. - Refactored component tests to utilize the new service structure. These changes enhance the functionality and reliability of the dot-usage feature, ensuring accurate data retrieval and user-friendly error messages.
…ading state management
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR redesigns the Usage Dashboard UI to align with the official dotCMS design system, transitioning from service-level to component-level state management and relocating the DotUsageService to the data-access library for better reusability.
Key Changes:
- Moved DotUsageService from portlets library to data-access library with simplified state management
- Redesigned UI with card-based layout, improved spacing, and PrimeNG Toolbar component
- Implemented component-level signal-based state management replacing service-level signals
- Enhanced UX with skeleton loaders, error handling UI, and "Last Updated" timestamp with localization
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
dotCMS/src/main/webapp/WEB-INF/messages/Language.properties |
Added translation key for "Last Updated" label |
core-web/libs/portlets/dot-usage/src/lib/services/dot-usage.service.spec.ts |
Removed old service tests (service moved to data-access) |
core-web/libs/portlets/dot-usage/src/lib/dot-usage-shell/dot-usage-shell.component.ts |
Refactored to use component-level signals instead of service signals, added lastUpdated tracking |
core-web/libs/portlets/dot-usage/src/lib/dot-usage-shell/dot-usage-shell.component.spec.ts |
Updated tests to reflect component-level state management and new UI structure |
core-web/libs/portlets/dot-usage/src/lib/dot-usage-shell/dot-usage-shell.component.scss |
Simplified styles using design tokens, removed extensive custom styling |
core-web/libs/portlets/dot-usage/src/lib/dot-usage-shell/dot-usage-shell.component.html |
Complete UI redesign with PrimeNG Toolbar, improved skeleton loaders, and card-based layout |
core-web/libs/portlets/dot-usage/src/index.ts |
Removed service export (now exported from data-access) |
core-web/libs/data-access/src/lib/dot-usage/dot-usage.service.ts |
Relocated service with removed signal-based state, made getErrorMessage public |
core-web/libs/data-access/src/lib/dot-usage/dot-usage.service.spec.ts |
New comprehensive test suite for relocated service |
core-web/libs/data-access/src/index.ts |
Added export for DotUsageService |
core-web/libs/portlets/dot-usage/src/lib/dot-usage-shell/dot-usage-shell.component.html
Outdated
Show resolved
Hide resolved
core-web/libs/portlets/dot-usage/src/lib/dot-usage-shell/dot-usage-shell.component.scss
Show resolved
Hide resolved
core-web/libs/portlets/dot-usage/src/lib/dot-usage-shell/dot-usage-shell.component.html
Outdated
Show resolved
Hide resolved
core-web/libs/portlets/dot-usage/src/lib/dot-usage-shell/dot-usage-shell.component.html
Outdated
Show resolved
Hide resolved
core-web/libs/portlets/dot-usage/src/lib/dot-usage-shell/dot-usage-shell.component.ts
Outdated
Show resolved
Hide resolved
core-web/libs/portlets/dot-usage/src/lib/dot-usage-shell/dot-usage-shell.component.html
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
core-web/libs/portlets/dot-usage/src/lib/dot-usage-shell/dot-usage-shell.component.spec.ts
Outdated
Show resolved
Hide resolved
core-web/libs/portlets/dot-usage/src/lib/dot-usage-shell/dot-usage-shell.component.spec.ts
Outdated
Show resolved
Hide resolved
core-web/libs/portlets/dot-usage/src/lib/dot-usage-shell/dot-usage-shell.component.html
Outdated
Show resolved
Hide resolved
core-web/libs/portlets/dot-usage/src/lib/dot-usage-shell/dot-usage-shell.component.ts
Outdated
Show resolved
Hide resolved
core-web/libs/portlets/dot-usage/src/lib/dot-usage-shell/dot-usage-shell.component.spec.ts
Outdated
Show resolved
Hide resolved
core-web/libs/portlets/dot-usage/src/lib/dot-usage-shell/dot-usage-shell.component.html
Outdated
Show resolved
Hide resolved
core-web/libs/portlets/dot-usage/src/lib/dot-usage-shell/dot-usage-shell.component.ts
Show resolved
Hide resolved
core-web/libs/portlets/dot-usage/src/lib/dot-usage-shell/dot-usage-shell.component.scss
Show resolved
Hide resolved
|
Cursor Agent can help with this pull request. Just |
|
@sfreudenthaler that cursor change of line-height will potentially make a layout shift from loading state to loaded... but is not a big deal. |
I'll revert it. I'd rather not have a wobble |
53e6cf9 to
2603b96
Compare
|
probably should have done a cleaner revert but 🤷 it's done now. |
|
@freddyDOTCMS does this mean that we can resolve the conversation from @KevinDavilaDotCMS on. Merge was blocked on unresolved convos, I closed the rest that were copilot and outdated.
|
Before
After