Skip to content

Conversation

@IsraelMancha
Copy link

@IsraelMancha IsraelMancha commented Sep 11, 2025

Updated font sizes across components from px to rem to improve scalability, accessibility, and consistency with the theme.

Fixes #1024

  • I deployed the application locally.
  • I have performed a self-review and testing of my code.
  • I have included the issue # in the PR.
  • I have added i18n support to visible strings (instead of <div>Add</div>, use):
const { t } = useTranslation();
<div>{t('add')}</div>


<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- Style
  - Switched font sizes from pixels to rem for more consistent, scalable typography across the app.
  - Improved readability of mobile authentication page headings with responsive sizing.
  - Updated progress bar text sizing to scale with user/browser settings.
- Documentation
  - Added inline notes explaining font-size conversions in styles.
- Refactor
  - Standardized global font-size tokens to rem to align with accessibility and user preference scaling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

@coderabbitai
Copy link

coderabbitai bot commented Sep 11, 2025

Walkthrough

CSS font-size units were converted from px to rem across root variables, specific progress bar text, and several mobile auth page headings. No structural or functional code changes beyond unit updates and added comments in index.css.

Changes

Cohort / File(s) Summary
Root font-size variables
client/src/index.css
Converted seven :root font-size CSS variables from px to rem with annotated conversions; no other changes.
Auth mobile headings
client/src/Pages/Auth/index.css
Within @media (max-width: 800px), changed h1 font-size for forgot/check-email/password-confirmed/set-new-password pages from 18px to 1.125rem.
Progress bar typography
client/src/Components/ProgressBars/index.css
Updated .progress-bar-container p.MuiTypography-root:has(span) font-size from 12px to 0.75rem.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks (3 passed, 1 warning, 1 inconclusive)

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description includes a succinct summary of the change, correctly uses "Fixes #1024", and marks deployment/self-review and i18n checklist items as done, but several template checklist items remain unchecked or unaddressed (for example: "I have not included any files that are not related", "I didn't use any hardcoded values", "I made sure font sizes...are referenced from the theme", "I ran npm run format", and evidence/screenshots of visual changes). Because the repository template requests all relevant checklist entries and explicit evidence for UI changes, the current description is incomplete for a full review. The description therefore needs clarifications and additional confirmations before it meets the repository template requirements. Update the PR description to complete or explain each remaining checklist item, explicitly state whether font-size changes now use theme variables versus direct rems and why, run and commit the formatter output (npm run format) if required, and attach before/after screenshots (or a short recording) showing the visual impact on affected pages as requested by reviewers.
Linked Issues Check ❓ Inconclusive The code changes in the provided summary convert root font-size variables in client/src/index.css from px to rem and update specific component/page font-size declarations in client/src/Pages/Auth/index.css and client/src/Components/ProgressBars/index.css from px to rem, which directly implements the linked issue's primary requirement to use rem units (WCAG 1.4.4). However the PR touches only the three files listed in the summary, so I cannot verify from this diff whether all remaining px-based font declarations across the repository have been converted. Therefore compliance with the linked issue appears implemented for the changed files but cannot be confirmed as complete for the whole codebase without a repo-wide check. Run a repository-wide search (e.g., git grep or ripgrep) for remaining "px" font-size declarations and either convert them to rem or document exceptions, update the PR description with the search results and any remaining work, and ensure consistent use of theme variables where appropriate while attaching visual verification screenshots.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title accurately summarizes the primary change (switching font sizes to rem to address WCAG 1.4.4) and references the linked issue, so it reflects the main intent of the changeset and is focused rather than listing files. It is concise and relevant to the changes described in the diff. However the title contains a spelling typo ("accesibility" → "accessibility") and has redundant parentheses that could be cleaned up for clarity.
Out of Scope Changes Check ✅ Passed All modified files shown in the raw summary relate to font-size changes (root variables and specific component/page headings) and there are no indications of unrelated functional or large-surface changes in the provided diff. The changes are therefore within the scope of the linked issue's objective to move font sizes to rem units. No out-of-scope files or unrelated features are apparent from the summary.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Poem

I tweaked the sizes, hop by hop,
From rigid px to rem on top—
Now roots can grow, and text can bloom,
Adjusting neatly room to room.
A nibble of CSS, a joyful chime,
Accessibility, one hop at a time. 🐇✨

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


📜 Recent review details

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 530889a and 17452ab.

📒 Files selected for processing (1)
  • client/src/index.css (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • client/src/index.css
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
client/package.json (1)

61-61: Remove unused Rollup dependency (client/package.json)

Search output shows "rollup" only in client/package.json and package-lock.json; no rollup.config.* files, scripts, or imports were found — remove the dependency.

-    "rollup": "^4.50.1",
client/src/Components/ProgressBars/index.css (1)

5-7: Use a design token instead of a literal rem.

Keeps typography consistent with the new scale.

-.progress-bar-container p.MuiTypography-root:has(span) {
-	font-size: 0.75rem;
-}
+.progress-bar-container p.MuiTypography-root:has(span) {
+	font-size: var(--env-var-font-size-small-plus);
+}
client/src/Pages/Auth/index.css (1)

106-111: Prefer tokens over hard-coded 1.125rem.

Introduce a token for 18px to avoid magic numbers and ease future scale changes.

Change here:

  .forgot-password-page h1,
  .check-email-page h1,
  .password-confirmed-page h1,
  .set-new-password-page h1 {
-    font-size: 1.125rem;
+    font-size: var(--env-var-font-size-large-minus);
  }

And add the token in client/src/index.css (see separate comment).

client/src/index.css (1)

42-49: Add a token for 18px to support mobile h1 usage.

Completes the scale and removes the remaining hard-coded 1.125rem.

  --env-var-font-size-large: 1rem; /* 16px */
  --env-var-font-size-large-plus: 1.375rem; /* 22px / 16 */
  --env-var-font-size-xlarge: 1.875rem; /* 30px / 16 */
+  --env-var-font-size-large-minus: 1.125rem; /* 18px / 16 */
📜 Review details

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 45bfdbd and 530889a.

⛔ Files ignored due to path filters (2)
  • client/package-lock.json is excluded by !**/package-lock.json
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • client/package.json (1 hunks)
  • client/src/Components/ProgressBars/index.css (1 hunks)
  • client/src/Components/WalletProvider/index.css (1 hunks)
  • client/src/Pages/Auth/index.css (1 hunks)
  • client/src/index.css (1 hunks)
🔇 Additional comments (2)
client/src/index.css (1)

42-48: Nice conversion to rem—LGTM.

Accurate px→rem conversions, aligned with WCAG 1.4.4 goals.

client/src/Components/WalletProvider/index.css (1)

27-27: Drop !important from .wallet-adapter-modal-title; confirm CSS variables

File: client/src/Components/WalletProvider/index.css (around line 27)

-.wallet-adapter-modal-title {
-	font-size: var(--env-var-font-size-medium-plus) !important;
-}
+.wallet-adapter-modal-title {
+	font-size: var(--env-var-font-size-medium-plus);
+}
  • rg output shows spacing tokens used with !important in this file: line 33: margin: var(--spacing-md) 0 !important; and line 51: margin: var(--spacing-sm) 0 !important;.
  • No global definitions were found for --spacing-sm, --spacing-md, or --env-var-font-size-medium-plus; confirm these are declared in a global :root/theme file.
  • If overriding third‑party styles requires !important, keep it; otherwise remove to improve maintainability.

Copy link

@llamapreview llamapreview bot left a comment

Choose a reason for hiding this comment

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

Auto Pull Request Review from LlamaPReview

🎯 TL;DR & Recommendation

Recommendation: Approve with suggestions

This PR successfully converts font sizes to rem units for WCAG compliance but includes an unrelated dependency addition and minor issues that could be improved for better maintainability and clarity.

🌟 Strengths

  • Correct rem conversions enhance accessibility and respect user preferences.
  • Comprehensive changes across multiple components ensure consistency.
Priority File Category Impact Summary Anchors
P2 client/package.json Maintainability Unrelated dependency increases bloat
P2 client/src/Components/WalletProvider/index.css Architecture Semantic variable swap may break hierarchy
P2 client/src/index.css Correctness Missing html font-size limits scaling
P2 client/src/index.css Documentation Comment misstates rem as fixed px
P2 client/src/Components/ProgressBars/index.css Correctness Proper rem conversion enhances compliance
⚠️ **Unanchored Suggestions (Manual Review Recommended)**

The following suggestions could not be precisely anchored to a specific line in the diff. This can happen if the code is outside the changed lines, has been significantly refactored, or if the suggestion is a general observation. Please review them carefully in the context of the full file.


📁 File: client/src/index.css

Speculative: The rem conversions assume a 16px base font size (standard browser default), but without explicitly setting font-size: 100% on the html element, user browser preferences may not be fully respected. This limits the accessibility benefits of rem units.

Suggestion:

Add `html { font-size: 100%; }` to ensure proper scaling relative to user's browser settings.

Related Code:

:root {
    --env-var-font-size-small: 0.6875rem; /* 11px / 16 */
    --env-var-font-size-small-plus: 0.75rem; /* 12px / 16 */
    --env-var-font-size-medium: 0.8125rem; /* 13px / 16 */
}


💡 LlamaPReview Community
Have feedback on this AI Code review tool? Join our GitHub Discussions to share your thoughts and help shape the future of LlamaPReview.

"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.6",
"prettier": "^3.3.3",
"rollup": "^4.50.1",
Copy link

Choose a reason for hiding this comment

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

P2 | Confidence: High

The addition of the Rollup dependency is unrelated to the stated goal of converting font sizes to rem units. This introduces unnecessary bloat and maintenance overhead for a PR focused solely on accessibility improvements.

Suggested change
"rollup": "^4.50.1",
Remove this line as it's unrelated to the PR's objective.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Unrelated change, please do remove

Copy link
Author

Choose a reason for hiding this comment

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

sure, I work now

--env-var-font-size-small: 0.6875rem; /* 11px / 16 */
--env-var-font-size-small-plus: 0.75rem; /* 12px / 16 */
--env-var-font-size-medium: 0.8125rem; /* 13px / 16 */
--env-var-font-size-medium-plus: 0.875rem; /* 14px / 16 */
Copy link

Choose a reason for hiding this comment

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

P2 | Confidence: High

The comment incorrectly states 1rem equals 16px. While true at default browser settings, rem units are relative to the root font size, which may be changed by user preferences. The comment should clarify this relative nature to avoid future misunderstandings.

Suggested change
--env-var-font-size-medium-plus: 0.875rem; /* 14px / 16 */
Update comment to: `/* 1rem (relative to root font size) */`

}
.progress-bar-container p.MuiTypography-root:has(span) {
font-size: 12px;
font-size: 0.75rem;
Copy link

Choose a reason for hiding this comment

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

P2 | Confidence: High

The conversion from 12px to 0.75rem is mathematically correct (12/16=0.75) and maintains the same visual size while now respecting user font preferences. This change properly implements the WCAG 1.4.4 requirement.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@gorkemcetin your thoughts here?

Copy link
Contributor

Choose a reason for hiding this comment

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

I am good with this if that is the case.


.wallet-adapter-modal-title {
font-size: var(--font-size-h5) !important;
font-size: var(--env-var-font-size-medium-plus) !important;
Copy link

Choose a reason for hiding this comment

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

P2 | Confidence: Medium

This change replaces a semantic variable (--font-size-h5) with a specific size variable. While consistent with the rem conversion goal, it may break the design system's semantic hierarchy if --font-size-h5 was part of a structured heading scale. The new variable might not maintain the intended visual relationship with other heading levels.

Code Suggestion:

Either retain the original semantic variable (if it's being converted elsewhere) or ensure all heading variables are consistently converted to maintain design system integrity.

Copy link
Collaborator

@ajhollid ajhollid left a comment

Choose a reason for hiding this comment

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

Hello,

Thanks for your contribution here! @gorkem-bwl is the authority on styling here, so he'll make the call about changing the font sizes.

Please remove all the package and package-lock changes; bumping dependencies should be done in a separate PR if there is a need to do so.

Thank you!

@gorkem-bwl
Copy link
Contributor

@IsraelMancha we need a few screenshots about the new font sizes. I'll eventually test it but I have to make sure we are on the same page by looking at the screenshots, and see what has changed.

@gorkem-bwl
Copy link
Contributor

Closing due to inactivity

@gorkem-bwl gorkem-bwl closed this Oct 15, 2025
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.

FE - Font-sizes should adjust to user settings

3 participants