Skip to content

fix(dashboard): align segmented toggle button heights - #2800

Merged
riderx merged 1 commit into
mainfrom
fix/segmented-toggle-button-height
Jul 30, 2026
Merged

fix(dashboard): align segmented toggle button heights#2800
riderx merged 1 commit into
mainfrom
fix/segmented-toggle-button-height

Conversation

@riderx

@riderx riderx commented Jul 30, 2026

Copy link
Copy Markdown
Member

Summary (AI generated)

  • Lock Usage / Build chart segmented pills to Capgo h-9 min-h-9 (36px) so they match reload/info and d-btn-sm controls.
  • Apply the same height lock to storage chart mode toggles and PeriodDaySelector pills for consistency.

Live screenshots (AI generated)

Usage control row after fix (all pills + icon buttons = 36px):

Usage chart controls aligned height

Dashboard Usage tab:

Dashboard usage tab controls

Motivation (AI generated)

The Daily/Cumulative (and billing period) segmented pills used only py-1 with no height lock, so they rendered shorter than the adjacent reload/info buttons (sm:h-9 / Capgo d-btn-sm). That made the left controls look undersized next to the correct-height right controls.

Business Impact (AI generated)

Keeps the dashboard control chrome visually consistent, which reduces UI polish issues on the most-used org/app analytics surface.

Test Plan (AI generated)

  • Local dashboard Usage tab: Daily / Cumulative / Billing / Last 30 days measure 36px, matching Reload / Info
  • Confirm Build chart controls match the same height
  • Confirm PeriodDaySelector still aligns with nearby d-btn-sm refresh on delivery / notifications tabs
  • Spot-check storage Total / Hourly toggles at h-9

Generated with AI

Made with Cursor

Review in cubic

Summary by CodeRabbit

  • Style
    • Standardized dashboard chart, period, and storage control button heights for a more consistent interface.
  • Documentation
    • Added preview images showcasing dashboard usage controls.
  • New Features
    • Added support for organization email notification and notification statistics panels.

Usage chart pills were ~py-1 short next to h-9 reload/info buttons. Lock pills to Capgo h-9/min-h-9 everywhere.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6efcf9e4-ebdc-4598-a218-0385e3f5eaf5

📥 Commits

Reviewing files that changed from the base of the PR and between 721b5be and d2a3d73.

📒 Files selected for processing (6)
  • assets/pr-previews/dashboard-usage-controls.webp
  • assets/pr-previews/usage-controls-button-height.webp
  • src/components.d.ts
  • src/components/dashboard/BuildChartControls.vue
  • src/components/dashboard/PeriodDaySelector.vue
  • src/components/dashboard/Usage.vue
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • Cap-go/capacitor-updater (manual)

📝 Walkthrough

Walkthrough

Dashboard usage controls now enforce consistent fixed heights. Two preview assets and global declarations for notification panels were also added.

Changes

Dashboard usage controls

Layer / File(s) Summary
Standardize dashboard control heights
src/components/dashboard/*.vue, assets/pr-previews/*
Chart, period, usage, and storage controls now use fixed 36px heights, with two related WebP preview assets added.
Register dashboard components
src/components.d.ts
Adds global declarations for OrgEmailNotificationsPanel and OrgNotificationStatsPanel.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: codex

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: aligning segmented dashboard toggle button heights.
Description check ✅ Passed The description includes summary, screenshots, motivation, impact, and a test plan, though the template checklist is omitted.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Visual diff passed

Visual changes

Generated at 2026-07-30T23:15:15.654Z. Threshold: 0.1% pixel difference.

Route Diff % Status
login 0.003 unchanged
dashboard 6.617 changed
apps 0.031 unchanged
app-overview 3.492 changed
channels 0.025 unchanged
devices 0.138 changed
observe 0.000 unchanged
observe-plugins 0.000 unchanged
api-keys-app-preview 2.211 changed

Commit: d2a3d739f4d141561c65e9573bf367f0cf57c573
Download the HTML report from workflow artifacts (artifact: visual-diff-report-d2a3d739f4d141561c65e9573bf367f0cf57c573).

Open index.html from the artifact for side-by-side before/after/diff screenshots.

@codspeed-hq

codspeed-hq Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 43 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing fix/segmented-toggle-button-height (d2a3d73) with main (721b5be)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@sonarqubecloud

Copy link
Copy Markdown

@riderx
riderx marked this pull request as ready for review July 30, 2026 23:08

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Risk: low. Approved — Cursor Bugbot passed with no findings requiring human review. No reviewers assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Approver

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Risk: low. Approved — Cursor Bugbot passed with no findings requiring human review. No reviewers assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Approver External

@coderabbitai coderabbitai Bot added the codex label Jul 30, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 6 files

Confidence score: 4/5

  • In src/components/dashboard/Usage.vue, the storage chart mode toggle uses fixed height classes (h-9 min-h-9) without the flex items-center alignment used by neighboring controls, which can cause label/icon vertical misalignment or clipping and make the UI feel inconsistent—add matching alignment classes (or otherwise center content) to de-risk visual regressions.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/components/dashboard/Usage.vue">

<violation number="1" location="src/components/dashboard/Usage.vue:1140">
P2: The storage chart mode toggle buttons now enforce a fixed 36px height via `h-9 min-h-9`, but unlike the Daily/Cumulative and Billing Period buttons in the same file (which include `flex items-center`), these storage buttons lack flex centering. As a result, inside the locked 36px box the text sits at the top `py-1` offset rather than being vertically centered, creating misalignment with the adjacent controls. Add `flex items-center` to the class list so the text is properly centered within the fixed height.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

<button
type="button"
class="rounded-md px-2.5 py-1 text-xs font-semibold transition-colors"
class="h-9 min-h-9 rounded-md px-2.5 py-1 text-xs font-semibold transition-colors"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: The storage chart mode toggle buttons now enforce a fixed 36px height via h-9 min-h-9, but unlike the Daily/Cumulative and Billing Period buttons in the same file (which include flex items-center), these storage buttons lack flex centering. As a result, inside the locked 36px box the text sits at the top py-1 offset rather than being vertically centered, creating misalignment with the adjacent controls. Add flex items-center to the class list so the text is properly centered within the fixed height.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/components/dashboard/Usage.vue, line 1140:

<comment>The storage chart mode toggle buttons now enforce a fixed 36px height via `h-9 min-h-9`, but unlike the Daily/Cumulative and Billing Period buttons in the same file (which include `flex items-center`), these storage buttons lack flex centering. As a result, inside the locked 36px box the text sits at the top `py-1` offset rather than being vertically centered, creating misalignment with the adjacent controls. Add `flex items-center` to the class list so the text is properly centered within the fixed height.</comment>

<file context>
@@ -1137,15 +1137,15 @@ onBeforeUnmount(() => {
             <button
               type="button"
-              class="rounded-md px-2.5 py-1 text-xs font-semibold transition-colors"
+              class="h-9 min-h-9 rounded-md px-2.5 py-1 text-xs font-semibold transition-colors"
               :class="storageUsageMode === 'total' ? 'bg-white text-slate-900 shadow-sm dark:bg-slate-700 dark:text-white' : 'text-slate-500 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white'"
               @click="storageUsageMode = 'total'"
</file context>
Suggested change
class="h-9 min-h-9 rounded-md px-2.5 py-1 text-xs font-semibold transition-colors"
class="flex items-center h-9 min-h-9 rounded-md px-2.5 py-1 text-xs font-semibold transition-colors"

@riderx
riderx merged commit 96fb555 into main Jul 30, 2026
126 of 193 checks passed
@riderx
riderx deleted the fix/segmented-toggle-button-height branch July 30, 2026 23:18
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.

1 participant