Skip to content

feat(planning): plan view inline meters (area used, workforce need vs housed) - #590

Merged
jplacht merged 1 commit into
mainfrom
feat/charts-02-plan-inline-meters
Oct 13, 2026
Merged

jplacht merged 1 commit into
mainfrom
feat/charts-02-plan-inline-meters

Conversation

@jplacht

@jplacht jplacht commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What and why

The plan status bar showed area as "404 / 750 · 346 free", and Workforce showed Need, Supply and Open as three numbers per tier, so seeing how full a base is or which tier is short took reading and doing the maths. Small inline meters show it at a glance, without adding a chart to the planner. During review, two layout fixes on the same page were added: the production building row's delete button no longer wraps onto its own line, and Material I/O no longer breaks large numbers mid-digit.

Changes

  • PMeter (src/ui/charts/PMeter.vue): small used-of-total bar (6 px, ink at 72 %), negative and full when over, role="img" with an aria-label ("Area 54 % used")
  • Status bar: 88 px area meter between "used / total" and "free / over"; text unchanged
  • Workforce: Need and Supply merged into one "Need / Housed" cell with a meter; "–" for empty tiers (need 0 and housed 0), a full negative meter for need without housing (so a shortage stays visible)
  • Production building row is a flex row laid out by the production panel's width (@container on the panel): one line on a wide panel; on a narrow one name, qty and delete stay on top and the stats move below. The delete button lines up with the recipe rows' Tools column
  • Material I/O: numeric cells don't wrap (PDataTable's table-wide word-break: break-word broke "-119,080.31" across two lines in the 450 px side column). Scoped to this table: the same rule kit-wide made Market Live's table overflow
  • i18n en_US: plan.components.workforce.table.need_housed added (old need / supply removed), common.ui.meter.used added; docs/ui-and-i18n.md mentions PMeter

How it was verified

  • QA: PASS on every acceptance criterion (code review plus a walk in the running app with seeded data: plan over its area, new plan, shared plan logged out, colour-blind palette, 1440 one-row layout, 1280 status bar without wrap, 1024 / 768 / 375 with no sideways scroll)
  • pnpm test && pnpm test:components && pnpm tsc && pnpm lint && pnpm knip: PASS. (src/tests/main.test.ts, the app bootstrap smoke test, timed out at its 30 s limit twice under parallel load during development; it passes alone and in plain runs, and no startup code changed)
  • UI audit plan, plan-new (and market-live for the table change) at 1920, 1600, 1440, 1280, 1024, 768, 375: 0 regressions versus baseline; textOverlap and overflowPx stay 0; smallTargetsTouch improved (plan 768 −106, 375 −87; plan-new 768 −130, 375 −111)

Screenshots

Desktop (1440)

Plan over its area New plan, empty tiers Colour-blind palette
Plan over its area: full negative area meter, workforce meters New plan: area meter, all tiers show a dash Colour-blind palette: over meter orange
Shared plan (logged out) Building rows at 1280 (one line) Building rows at 1600 (narrow panel)
Shared plan with meters Building rows on one line, delete in the Tools column Narrow panel: name, qty and delete on top, stats below
Material I/O at 1920 Material I/O at 1600
Material I/O numbers on one line Material I/O numbers on one line

Mobile (375)

Plan over its area New plan, empty tiers Building rows
Phone: status bar meter and workforce table Phone: new plan Phone: delete on the building's top line

🤖 Generated with Claude Code

… housed)

- PMeter (src/ui/charts): small used-of-total bar, negative and full when
  over, role="img" with an aria-label
- Status bar: 88 px area meter between "used / total" and "free / over"
- Workforce: Need and Supply merged into one "Need / Housed" cell with a
  meter; "–" for empty tiers, a full negative meter for need without housing
- Production building row lays out by the panel width (@container): delete
  button never on a line of its own
- Material I/O: numbers no longer break mid-digit in the side column

Spec: specs/2026-10-13-charts-02-plan-inline-meters.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@netlify

netlify Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for prunplanner-preview ready!

Name Link
🔨 Latest commit 60974cd
🔍 Latest deploy log https://app.netlify.com/projects/prunplanner-preview/deploys/6ace4669e070d6621a691012
😎 Deploy Preview https://deploy-preview-590--prunplanner-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

jplacht added a commit that referenced this pull request Oct 13, 2026
@codacy-production

codacy-production Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

🟢 Coverage ∅ diff coverage · +0.00% coverage variation

Metric Results
Coverage variation ✅ +0.00% coverage variation (-1.00%)
Diff coverage ✅ ∅ diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (ace6f22) 4152 4061 97.81%
Head commit (60974cd) 4152 (+0) 4061 (+0) 97.81% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#590) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@jplacht
jplacht merged commit 742ae59 into main Oct 13, 2026
12 checks passed
@jplacht
jplacht deleted the feat/charts-02-plan-inline-meters branch October 13, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant