ledmatrix-stocks: compact layout — definite chart size + content-sized entries - #225
ledmatrix-stocks: compact layout — definite chart size + content-sized entries#225ChuckBuilds wants to merge 3 commits into
Conversation
The inline mini-chart was anchored to the far-right of the per-entry scroll canvas (~2x display width), while the price text sits just right of the logo. On larger panels this left a big empty gap between the price and the chart (e.g. ~135px at 256x64). Draw the chart immediately to the right of the text column (small fixed gap, clamped so it stays on-canvas for unusually wide text), then crop the entry canvas to the content so the leftover space doesn't become dead scroll gap. _draw_mini_chart gains an optional chart_x (defaults to the old right-anchored position). Also removes the now-unneeded text/chart overlap clamp. Verified by rendering mock data: price->chart gap drops from 135px to 6px at 256x64 (already tight at 128x32), no overlap, wide-text case stays on-canvas, and the safety harness passes at all sizes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KEZK1P1Q1fu5pcuVrkrCFZ
|
Warning Review limit reached
Next review available in: 28 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughChangesStock chart layout
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
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.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@plugins/ledmatrix-stocks/display_renderer.py`:
- Around line 299-318: The chart placement in the renderer can overlap the text
when the clamped chart position falls inside the text column. Update the
toggle_chart path around _draw_mini_chart to preserve the intended chart_width
by expanding the rendering canvas before drawing, or skip the chart when it
cannot fit beside text; do not move the chart left into the text area. Ensure
rendering remains correct for all supported matrix sizes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: b1bf0b5f-caae-4364-befa-b46b70d0c1fa
📒 Files selected for processing (3)
plugins.jsonplugins/ledmatrix-stocks/display_renderer.pyplugins/ledmatrix-stocks/manifest.json
Make the mini-chart a fixed pixel size (chart_width_px / chart_height_px, default 64x32) instead of a fraction of the display. Previously width was a fraction of the display-scaled canvas and height a fraction of the display height, so the chart ballooned on wide chains and tall 4x panels (and looked "massive" in vegas mode). Also size each entry's canvas to its actual measured content (logo + text + chart) instead of a display-scaled guess that was then clamped. This removes the dead space between tickers and fixes a chart/text overlap that the clamp caused on narrow panels with a large logo. Replaces the chart_width_percent / chart_height_percent config keys with chart_width_px / chart_height_px (README + schema updated). Verified: chart is a constant 64x32 at 64x128, 256x64, 128x32; no overlap on the tall panel; vegas-style strips are compact; safety harness passes at all sizes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KEZK1P1Q1fu5pcuVrkrCFZ
Resolves the plugins.json conflict by taking main's registry and regenerating it with update_registry.py, rather than hand-merging an auto-generated file — a textual merge of it produces invalid JSON. The only resulting difference from main is the stocks bump this branch carries (2.4.0 -> 2.5.0) plus the regenerated timestamps.
Problem
The stock ticker layout scaled with the display, so it got massive on large/4x panels and in vegas mode:
display_width × multiplier) and its height a fraction of the display height — so it ballooned on wide chains (e.g. ~204px wide at 256) and on tall 4x panels (e.g. ~85px tall at 128).Changes
display.chart_width_px/display.chart_height_px(default 64×32), a fixed pixel size that does not scale with the display and is clamped to the panel. Replaceschart_width_percent/chart_height_percent.Verification
Manifest bumped 2.4.0 → 2.5.0 (config schema change); README + schema updated.
🤖 Generated with Claude Code
https://claude.ai/code/session_01KEZK1P1Q1fu5pcuVrkrCFZ