Skip to content

Conversation

@planetabhi
Copy link
Member

@planetabhi planetabhi commented Sep 21, 2025

Summary by CodeRabbit

  • Documentation
    • Revamped introduction to emphasize core design foundations (colors, typography, spacing, reset, grid, layouts, layering).
    • Added a large Design Tokens & Primitives section with structured token categories and roles.
    • Expanded token taxonomy and tables (colors, effects, borders, spacings, typography) including desktop/mobile pairings.
    • Introduced a dedicated reset section with example baseline styles and accessibility notes.
    • Reorganized and enriched content with examples and clearer guidance on primitives, tokens, and line-height.

@coderabbitai
Copy link

coderabbitai bot commented Sep 21, 2025

Walkthrough

README.md was expanded and reorganized: the intro now emphasizes core design foundations; a large Design Tokens & Primitives section with structured token categories and responsive token taxonomy was added; a comprehensive CSS/SCSS reset example and accessibility notes were included. No code or public API exports changed.

Changes

Cohort / File(s) Summary of changes
Documentation
README.md
Refocused introductory paragraph on core foundations (colors, typography, spacing/sizing, reset, grid, layouts, layering); added a large Design Tokens & Primitives section (Colors, Borders, Button, Icon, Link, Support, Text, Effects, Focus, Borders widths, Spacings, Typography, line‑height notes) with desktop/mobile pairings and token scales; introduced a detailed Spacings and Typography schema; added a dedicated The new reset section with CSS/SCSS reset examples and accessibility considerations; reorganized and extended installation/usage and examples.

Sequence Diagram(s)

(omitted) — changes are documentation-only and do not modify control flow or runtime interactions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I thump my paws on grids so neat,
Tokens stacked in tidy rows,
Colors, type, and spacing meet,
A gentle reset breeze that blows.
Docs refreshed — I hop and go! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The title "doc updates" is related to the changes since the PR updates documentation, but it is overly generic and does not communicate the primary changes (notably the expanded Design Tokens & Primitives section and the new CSS/SCSS reset). A reviewer scanning history would not understand the main intent from this title alone. For these reasons the title check is inconclusive. Please update the title to a concise, specific summary of the main change, for example "README: add Design Tokens & CSS reset" or "Document Design Tokens and new reset rules"; alternatively "Add design tokens and reset to README" is acceptable. After renaming the PR, request re-review so the title can be re-evaluated.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature

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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
README.md (1)

29-36: Inconsistent default theme (two “Default” labels).

Only one default should be marked. If Light is default, remove “(Default)” from Dark.

Apply:

-Light (Default) | `light`
+Light (Default) | `light`
 ...
-Dark  (Default) | `dark`
+Dark | `dark`
🧹 Nitpick comments (6)
README.md (6)

18-20: Clarify CSS import usage alongside SCSS.

Provide a CSS example and a option to reduce ambiguity and discourage @import in production.

Apply:

 @use '@new-ui/foundations';     // Use `@import` for CSS
+/* CSS (bundlers): */
+/* @import "@new-ui/foundations"; */
+
+/* Plain HTML via link: */
+/* <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@new-ui/foundations@<version>/dist/index.css"> */

46-47: Fix nested list indentation (markdownlint MD007).

Use 2-space indent for sub-items.

Apply:

-    - `js-` for targeting JavaScript-specific functionality.
+  - `js-` for targeting JavaScript-specific functionality.

131-132: Wording nit: “order” → “outline”.

“Focus order” is a different concept (tab order). This token appears to describe line thickness for outlines.

Apply:

-**`--border-width-02`** | Used for the selection and focus order
+**`--border-width-02`** | Used for selection and focus outline

26-27: Close the HTML snippet for completeness.

Tiny clarity improvement for copy-paste.

Apply:

-<html data-new-ui-theme="light">
+<html data-new-ui-theme="light"></html>

189-190: Pin CDN version; avoid @latest for reproducibility.

Docs should encourage deterministic builds.

Apply:

-// https://cdn.jsdelivr.net/npm/@new-ui/reset@latest/dist/index.css
+// Prefer pinning: https://cdn.jsdelivr.net/npm/@new-ui/reset@1.2.3/dist/index.css

234-238: Minor reset enhancement: inherit line-height and color.

Improves consistency with typography tokens.

Apply:

 input, textarea, button, select {
   font-family: inherit;
   font-size: inherit;
+  line-height: inherit;
+  color: inherit;
   margin: 0;
 }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 254fe9b and cb2abf6.

📒 Files selected for processing (1)
  • README.md (2 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
README.md

46-46: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)

🔇 Additional comments (3)
README.md (3)

4-4: Strong, focused intro.

Clear scope and audience; reads well.


50-121: Design tokens section is comprehensive and well-structured.

Tables are scannable; taxonomy reads cleanly.

Also applies to: 128-179


180-181: Confirmed: --lh- tokens are present in the distributed CSS.*
dist/index.css defines --lh-mobile-* and --lh-desktop-* variables (e.g. --lh-desktop-body-xl), so the README note is accurate.

Comment on lines +195 to +201
html {
-moz-text-size-adjust: none;
-webkit-text-size-adjust: none;
text-size-adjust: none;
vertical-align: baseline;
}

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Accessibility: avoid disabling text size adjustment; remove no-op.

text-size-adjust: none can hinder user scaling on mobile. Also vertical-align on html has no effect.

Apply:

 html {
-  -moz-text-size-adjust: none;
-  -webkit-text-size-adjust: none;
-  text-size-adjust: none;
-  vertical-align: baseline;
+  /* Allow user scaling; keep defaults */
+  /* text-size-adjust: 100%; */
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
html {
-moz-text-size-adjust: none;
-webkit-text-size-adjust: none;
text-size-adjust: none;
vertical-align: baseline;
}
html {
/* Allow user scaling; keep defaults */
/* text-size-adjust: 100%; */
}
🤖 Prompt for AI Agents
In README.md around lines 195 to 201, the css block on the html selector
disables user text scaling and contains a no-op vertical-align; remove the
vendor-prefixed and unprefixed text-size-adjust: none rules (or replace with
text-size-adjust: 100% if you need to explicitly allow scaling) and delete the
vertical-align: baseline declaration so users can scale text on mobile and the
no-op property is not present.

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)
README.md (4)

42-47: Fix nested list indent to satisfy markdownlint (MD007).

Current indent uses 4 spaces; use 2 spaces.

-    - `c-` for UI components.
-    - `l-` for layout-related styles.
-    - `u-` for utilities.
-    - `is-` and `has-` for state-based classes.
-    - `js-` for targeting JavaScript-specific functionality.
+  - `c-` for UI components.
+  - `l-` for layout-related styles.
+  - `u-` for utilities.
+  - `is-` and `has-` for state-based classes.
+  - `js-` for targeting JavaScript-specific functionality.

18-20: Clarify SCSS vs CSS import with separate examples.

The inline comment is easy to miss; show both forms explicitly.

-```scss
-@use '@new-ui/foundations';     // Use `@import` for CSS
-```
+```scss
+// SCSS
+@use '@new-ui/foundations';
+```
+
+```css
+/* CSS */
+@import url('@new-ui/foundations/dist/index.css');
+/* or via <link>:
+<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@new-ui/foundations@latest/dist/index.css" />
+*/
+```

31-36: Two “Default” themes listed; pick one or clarify initial default.

Having both Light and Dark marked “(Default)” is confusing.

- Dark  (Default) | `dark`
+ Dark | `dark`

If Dark is actually the initial default, switch the “(Default)” label accordingly.


130-132: Wording nit: likely “focus ring” (or border), not “focus order”.

Assuming this describes width for focus outlines.

-**`--border-width-02`** | Used for the selection and focus order
+**`--border-width-02`** | Used for selection and the focus ring
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cb2abf6 and d1a7d66.

📒 Files selected for processing (1)
  • README.md (2 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
README.md

46-46: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)

🔇 Additional comments (2)
README.md (2)

89-93: Typo fix confirmed: --link-visited is correct.

Looks good; resolves the earlier misspelling.


195-201: Accessibility: don’t disable text scaling; remove no-op.

Blocking user zoom hurts accessibility; vertical-align on html is a no-op.

Apply:

 html {
-  -moz-text-size-adjust: none;
-  -webkit-text-size-adjust: none;
-  text-size-adjust: none;
-  vertical-align: baseline;
+  /* Allow user scaling; keep defaults */
+  /* text-size-adjust: 100%; */
 }

@planetabhi planetabhi merged commit cd38179 into main Sep 21, 2025
1 check passed
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.

2 participants