Repository navigation
Replace inline note styles and share outlined button rules - #20
Conversation
- 23 inline font-size/colour styles in index.html (loading, error, citation notes, top-N controls) become .note, .note-loading, .note-label, .note-detail and .top-n-select. - Six near-identical outlined buttons share one base rule for background, border, radius, cursor, font and transition. Computed styles of the affected elements are unchanged in both themes. Brought back from the closed #7 redesign. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 54 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe stylesheet consolidates base styles for outlined buttons and adds shared note and selector classes. The HTML replaces inline presentation styles on prompts, controls, and analysis loading and error messages with those classes. ChangesShared interface styles
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Refactor Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change centralizes existing button and note presentation without a concrete user-facing regression identified. It is ready for normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="assets/styles.css">
<violation number="1" location="assets/styles.css:310">
P3: The shared rule hardcodes `transition: all 0.15s ease;` for all six button types, which deviates from `main` in two ways despite the PR's no-difference goal: `.refresh-btn` previously used `transition: all 0.2s ease;` (now 0.15s), and `.citation-box .copy-btn`, `.ci-share-btn`, and `.pagination button` had no transition at all on `main` — these now gain a 0.15s hover animation (see the `:hover`/`.active` background and border-color changes on each). If intent is to unify timing, this is fine, but the reshuffle button hover and the copy/share/pagination hover fade are visibly different from `main`. Restore the per-button timings: keep the shared rule but re-add `transition: all 0.2s ease;` to `.refresh-btn` and drop the transition for the buttons that didn't have one, or accept the change explicitly.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| /* Shared outlined button: card background, hairline border, page font. */ | ||
| .citation-box .copy-btn, .trend-filter-btn, .refresh-btn, .bm-page-btn, .pagination button, .ci-share-btn { | ||
| background: var(--flora-card-bg); border: 1px solid var(--flora-border); border-radius: 6px; | ||
| cursor: pointer; font-family: var(--font-sans); transition: all 0.15s ease; |
There was a problem hiding this comment.
P3: The shared rule hardcodes transition: all 0.15s ease; for all six button types, which deviates from main in two ways despite the PR's no-difference goal: .refresh-btn previously used transition: all 0.2s ease; (now 0.15s), and .citation-box .copy-btn, .ci-share-btn, and .pagination button had no transition at all on main — these now gain a 0.15s hover animation (see the :hover/.active background and border-color changes on each). If intent is to unify timing, this is fine, but the reshuffle button hover and the copy/share/pagination hover fade are visibly different from main. Restore the per-button timings: keep the shared rule but re-add transition: all 0.2s ease; to .refresh-btn and drop the transition for the buttons that didn't have one, or accept the change explicitly.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At assets/styles.css, line 310:
<comment>The shared rule hardcodes `transition: all 0.15s ease;` for all six button types, which deviates from `main` in two ways despite the PR's no-difference goal: `.refresh-btn` previously used `transition: all 0.2s ease;` (now 0.15s), and `.citation-box .copy-btn`, `.ci-share-btn`, and `.pagination button` had no transition at all on `main` — these now gain a 0.15s hover animation (see the `:hover`/`.active` background and border-color changes on each). If intent is to unify timing, this is fine, but the reshuffle button hover and the copy/share/pagination hover fade are visibly different from `main`. Restore the per-button timings: keep the shared rule but re-add `transition: all 0.2s ease;` to `.refresh-btn` and drop the transition for the buttons that didn't have one, or accept the change explicitly.</comment>
<file context>
@@ -304,7 +304,12 @@ h1, .serif, .card-header, .stats-card .number,
+/* Shared outlined button: card background, hairline border, page font. */
+.citation-box .copy-btn, .trend-filter-btn, .refresh-btn, .bm-page-btn, .pagination button, .ci-share-btn {
+ background: var(--flora-card-bg); border: 1px solid var(--flora-border); border-radius: 6px;
+ cursor: pointer; font-family: var(--font-sans); transition: all 0.15s ease;
+}
+.citation-box .copy-btn { position: absolute; top: 0.5rem; right: 0.5rem; padding: 0.3rem 0.6rem; font-size: 0.75rem; color: var(--flora-muted); }
</file context>
The shared outlined-button rule no longer sets a transition. The trend filter and mobile pager keep 0.15s and the refresh button 0.2s; copy, share and citation pagination stay instant, as on main (cubic review). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve conflicts with #19 and #20: renderMcCharts keeps FloraCharts.theme() (which also drops the stale #8b1a4a fallback), and the outlined-button rules keep this branch's --color-* tokens with #20's per-button transition timings. Also restore a visible stats-card hover border (--color-primary-border); it had become a no-op after the token rename (cubic review). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A small CSS cleanup brought back from the closed #7 redesign. No visual change is intended.
font-size/colour styles inindex.htmlmove to.note,.note-loading,.note-label,.note-detailand.top-n-select. These cover the loading and error messages, error detail, citation notes and the "Show top" controls. Elements that JavaScript shows or hides keep their inlinedisplay:none.Verification
🤖 Generated with Claude Code
Summary by cubic
Cleans up the stylesheet by moving inline note styles to shared CSS classes and consolidating six near-identical outlined buttons into one base rule, with no visual change intended.
index.htmlto.note,.note-loading,.note-label,.note-detailand.top-n-select; thedisplay:nonethat JavaScript toggles stays inline.main.Verification
mainand this branch on all five tabs in light and dark mode; only randomly sampled outcome badges differed.Written for commit f94af3a. Summary will update on new commits.
Summary by CodeRabbit