Skip to content

feat: responsive dashboard tiles#2258

Merged
limetech merged 6 commits into
masterfrom
feat/responsive-dashboard-tiles
Jun 23, 2025
Merged

feat: responsive dashboard tiles#2258
limetech merged 6 commits into
masterfrom
feat/responsive-dashboard-tiles

Conversation

@zackspear

@zackspear zackspear commented Jun 13, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Style
    • Improved dashboard layout with modern, semantic HTML structure for better readability and maintainability.
    • Enhanced responsive design with updated CSS, including new breakpoints, flexible grid and flexbox layouts, and scalable font sizes.
    • Adjusted colors, spacing, and visual grouping for a cleaner and more consistent appearance across devices.
  • Refactor
    • Reorganized HTML and CSS to use more descriptive classes and utility styles, streamlining future updates.

…d structure

- Reorganized HTML structure within DashStats.page to enhance layout consistency and readability.
- Adjusted indentation and spacing for better code clarity.

This update aims to improve the maintainability of the code and enhance the user interface experience.
- Refactored HTML structure in DashStats.page to implement a new tile-header layout for improved organization and visual clarity.
- Adjusted CSS styles in DashStats.css and default-base.css to support the new layout, including flexbox adjustments for better alignment and spacing.

This update aims to enhance the user interface experience and maintainability of the code.
@coderabbitai

coderabbitai Bot commented Jun 13, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This update refactors the dashboard's HTML and CSS for improved semantic structure and responsive design. The HTML layout uses modern, nested elements and descriptive classes, while the CSS introduces flexible grid and flexbox layouts, responsive breakpoints, and utility gap classes. No changes to event logic or exported entities were made.

Changes

File(s) Change Summary
emhttp/plugins/dynamix/DashStats.page Refactored HTML structure to use semantic, nested elements and descriptive classes; updated JavaScript DOM selectors accordingly; minor formatting changes in dialog templates; no logic changes.
emhttp/plugins/dynamix/sheets/DashStats.css Added responsive breakpoints, grid/flexbox layouts, utility classes; commented out fixed widths/margins; updated font sizing and spacing for flexibility.
emhttp/plugins/dynamix/styles/default-base.css Adjusted dashboard table background layering, padding, and letter spacing; added utility gap classes; updated background color logic for dashboard context.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Browser
    participant DashboardPage (HTML/CSS/JS)

    User->>Browser: Loads Dashboard Page
    Browser->>DashboardPage: Parses new semantic HTML structure
    DashboardPage->>Browser: Applies responsive CSS and layout
    User->>DashboardPage: Interacts with dashboard controls
    DashboardPage->>Browser: Handles events using updated DOM selectors
Loading

Suggested reviewers

  • ljm42
  • elibosley

Poem

In the dashboard garden, code takes root,
With flex and grid, the styles reboot.
Spans and headers, all aligned,
Responsive tiles, neatly designed.
A hop, a skip, a CSS cheer—
This bunny loves the changes here! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a2973eb and b05f819.

📒 Files selected for processing (3)
  • emhttp/plugins/dynamix/DashStats.page (4 hunks)
  • emhttp/plugins/dynamix/sheets/DashStats.css (11 hunks)
  • emhttp/plugins/dynamix/styles/default-base.css (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • emhttp/plugins/dynamix/styles/default-base.css
  • emhttp/plugins/dynamix/sheets/DashStats.css
  • emhttp/plugins/dynamix/DashStats.page
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript-typescript)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

- Updated HTML structure in DashStats.page to incorporate a new tile-header format for better organization and visual clarity.
- Adjusted CSS in DashStats.css to introduce new styles for tile headers and improve layout responsiveness.
- Made minor adjustments in default-base.css for padding consistency.

This update aims to enhance the user interface experience and maintainability of the code.
- Changed grid-template-columns in DashStats.css to use repeat(2, 1fr) for better responsiveness.
- Commented out text-transform in default-base.css to allow for more flexible text styling.
@ljm42 ljm42 added the 7.2 label Jun 16, 2025
Base automatically changed from fix/css-for-hiding-rouge-dt-dd-tags-with-hidden-elements to master June 17, 2025 16:49
@zackspear zackspear marked this pull request as ready for review June 20, 2025 22:35

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (13)
emhttp/plugins/dynamix/styles/default-base.css (1)

1076-1084: Remove unused styling remnants
Commented-out margin-left and text-transform rules suggest leftover cruft. Consider deleting these lines to keep the codebase clean now that the new flex layout handles spacing and casing.

emhttp/plugins/dynamix/sheets/DashStats.css (8)

44-48: Clean up commented width on .head_info
The commented width: 250px; is dead code. Remove it to reduce clutter now that layouts are fluid.


55-57: Remove legacy padding rule on .head_gap
Commented padding-left: 14px; can be deleted—flexbox and grid now manage spacing.


76-80: Eliminate outdated float/margin on .ctrl
The commented float and margin hints at a previous layout hack. Prune these lines to keep the stylesheet lean.


105-107: Drop commented span#chart-toggle block
Since the element is no longer present in the HTML, the commented selector can be safely removed.


125-128: Remove deprecated margin on icon font spans
Commented margin-right: 18px; is no longer needed thanks to .tile-header-left gap utilities.


231-234: Prune redundant icon margin comment
The commented margin-right: 8px; under i[class^="icon-"] can be removed. Spacing is now handled by the tile header grid/gap.


249-256: Strip out old .info link overrides
The commented block for a.info is obsolete—remove entirely to avoid confusion.


446-449: Avoid !important on tile controls
The font-size: 2rem !important hack forces sizing. Consider refactoring specificity or design tokens to remove !important.

emhttp/plugins/dynamix/DashStats.page (4)

205-207: Add ARIA roles/labels to the grid and tile containers
With the introduction of the .grid and .tile wrappers for responsiveness, consider annotating these containers with ARIA roles (e.g. role="region" or role="group") and descriptive aria-label attributes to improve screen-reader navigation.


1902-1902: Remove commented-out dead code
The line // $('table.dashboard tbody').before(stopgap); is stale and should be deleted to avoid confusion.


1906-1906: Simplify static sort key generation
Using '_system_information_'.md5() for a constant identifier always yields the same hash. You could replace this with a fixed, human-readable sort="system_information" attribute unless you need cryptographic uniqueness.


1907-1907: Use a more intuitive icon and add accessibility
The fa-eject icon may not clearly indicate “toggle all content”. Consider swapping to fa-expand-alt/fa-compress-alt (or another more explicit glyph) and wrapping it in a <button> with aria-controls and aria-pressed.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 83c4560 and a2973eb.

📒 Files selected for processing (3)
  • emhttp/plugins/dynamix/DashStats.page (5 hunks)
  • emhttp/plugins/dynamix/sheets/DashStats.css (11 hunks)
  • emhttp/plugins/dynamix/styles/default-base.css (5 hunks)
🔇 Additional comments (15)
emhttp/plugins/dynamix/styles/default-base.css (5)

1026-1032: Separate table and tbody background layers
Setting background-color: transparent on the <table> and moving the mild background to <tbody> improves layering for mixed row styles. This change aligns with the HTML restructure.


1039-1042: Symmetrical padding on first-row cells
Adjusting both top and bottom padding to 1rem ensures consistent vertical spacing for the header row.


1070-1075: Normalize letter-spacing in VPN cells
Switching from a fixed pixel value to normal letter-spacing improves text readability and adapts better across fonts.


1909-1923: Add new utility gap classes
.gap-5 through .gap-8 extend spacing scale for responsive layouts. These Tailwind-inspired utilities nicely fill spacing gaps.


2547-2554: Verify theme-specific dashboard variables
This override uses --dashboard-background-color and --dashboard-border-color within .Theme--sidebar. Please confirm these CSS variables are defined and reflect the intended design palette.

Run this to verify definitions:

#!/bin/bash
rg "dashboard-background-color" -n .
rg "dashboard-border-color" -n .
emhttp/plugins/dynamix/sheets/DashStats.css (9)

3-6: Introduce responsive breakpoint variables
Adding --dashstats-medium-breakpoint and --dashstats-large-breakpoint centralizes media-query breakpoints and promotes consistency.


238-240: Responsive icon sizing with clamp()
Using font-size: clamp(80px, 5vw, 128px) for #mycase ensures the icon scales fluidly between breakpoints.


363-368: Enable flexible grid container
Adding gap: 2rem and box-sizing: border-box to div.grid improves consistency and responsiveness across breakpoints.


379-387: Center pie charts with margin
Applying margin: 1rem auto to div.pie guarantees proper centering on small viewports.


413-419: Introduce semantic tile header container
.tile-header flex layout organizes header components into left/right groups, enhancing readability and maintainability.


421-426: Define main header typography
.tile-header-main sets clear font sizing and spacing for tile titles—great for consistent header styling.


428-435: Group header controls on the left
.tile-header-left flex-wrap and gap utilities handle multi-line control clusters, improving responsiveness.


436-444: Align and wrap right-side controls
.tile-header-right with flex-wrap: wrap-reverse prevents overflow and keeps control icons accessible.


450-455: Responsive memory section grid
Converting .tile-system-memory-body to a grid with breakpoint-based column counts enhances layout flexibility for varied screen widths.

Also applies to: 457-461

emhttp/plugins/dynamix/DashStats.page (1)

198-198: Ensure new CSS include is correct and versioned
The added jquery.switchbutton.css import looks necessary for the switch buttons, but please verify that this file is checked into the repo under /webGui/styles/ and that autov() resolves to the expected, cache-busted URL.

Comment thread emhttp/plugins/dynamix/DashStats.page Outdated
- Adjusted gap values in DashStats.page for improved alignment and spacing.
- Updated CSS in DashStats.css to enhance layout controls and added new styles for tile-header-right-controls.
- Commented out letter-spacing in default-base.css for better text presentation and adjusted control styles for consistency.

This update aims to enhance the visual clarity and responsiveness of the dashboard layout.
@limetech limetech merged commit 5d1ba8c into master Jun 23, 2025
3 checks passed
@limetech limetech deleted the feat/responsive-dashboard-tiles branch June 23, 2025 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants