Colors, effects, and grid improvements#19
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughयह PR पैकेज वर्ज़न बम्प, ग्रिड क्लास/मॉडिफायर रीनेमिंग, ग्रिड उपयोगिताएँ जोड़ने, इफेक्ट्स के शैडो वैरिएबल अपडेट और नई CSS उपयोगिता कक्षाएँ जोड़ता है; रंग थीम के Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (3)
packages/effects/src/_utilities.scss (1)
30-158: यहाँ भी utility generation को token maps से drive करने पर duplication काफी घटेगी।
radius/blur/backdrop/transitionblocks repeat हो रहे हैं;@eachpattern से consistency और maintenance बेहतर होगी।🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/effects/src/_utilities.scss` around lines 30 - 158, The utilities file duplicates radius, blur, backdrop-blur and transition classes; replace the repeated blocks with token-driven generation using Sass maps and `@each` loops: create maps for radii (e.g., keys xs, sm, md...), blurs (xs, sm...), backdrop-blurs and transition variants, then loop to emit .nu-u-radius-#{key}, .nu-u-blur-#{key}, .nu-u-backdrop-blur-#{key} and .nu-u-transition-#{variant} classes using the corresponding map values; update or add map names and loop logic near the existing .nu-u-radius-*, .nu-u-blur-*, .nu-u-backdrop-blur-*, and .nu-u-transition* definitions so the generated output matches current variable names (e.g., --radius-*, --blur-*, --default-transition-duration/timing-function).packages/grid/src/_utilities.scss (1)
2-172: रीपीटेड utility declarations को Sass maps +@eachसे generate करना maintainability बढ़ाएगा।अभी file में काफी duplication है; map-driven generation से future additions safer और कम error-prone होंगी।
♻️ छोटा refactor pattern (उदाहरण)
- .nu-u-d-block { display: block; } - .nu-u-d-inline { display: inline; } - .nu-u-d-inline-block { display: inline-block; } - .nu-u-d-flex { display: flex; } - .nu-u-d-inline-flex { display: inline-flex; } - .nu-u-d-grid { display: grid; } - .nu-u-d-none { display: none; } + $display-utils: ( + block: block, + inline: inline, + inline-block: inline-block, + flex: flex, + inline-flex: inline-flex, + grid: grid, + none: none + ); + + `@each` $name, $value in $display-utils { + .nu-u-d-#{$name} { + display: $value; + } + }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/grid/src/_utilities.scss` around lines 2 - 172, The file _utilities.scss repeats many utility classes (e.g., .nu-u-d-block/.nu-u-d-inline/.nu-u-d-flex, .nu-u-flex-row/.nu-u-flex-col, .nu-u-flex-wrap/.nu-u-flex-nowrap, .nu-u-justify-start/.nu-u-justify-center, .nu-u-items-start/.nu-u-items-center, .nu-u-self-start/.nu-u-self-center, .nu-u-flex-grow/.nu-u-flex-grow-0, sizing like .nu-u-w-full/.nu-u-w-auto, and overflow utilities) — convert these into Sass maps and generate the classes with `@each` loops to remove duplication; create maps keyed by utility suffix (e.g., ("d": (block: block, inline: inline, flex: flex, none: none)), ("flex-direction": (row: row, row-reverse: row-reverse, col: column, ...)), ("justify": (start: flex-start, center: center ...)), etc.), then loop to output the selector names (.nu-u-<prefix>-<key>) with the corresponding property/value; ensure unique selectors like .nu-u-d-*, .nu-u-flex-*, .nu-u-justify-*, .nu-u-items-*, .nu-u-self-*, .nu-u-flex-grow-*, .nu-u-w-*, .nu-u-h-*, and .nu-u-overflow-* match existing names so behavior is preserved.packages/grid/src/_grid.scss (1)
245-253:--no-growऔर--autoमें duplicate flex rule को dedupe करें।दोनों modifiers में
flex: 0 0 auto;repeat हो रहा है; इसे merge करने से maintenance आसान होगी।♻️ Suggested cleanup
- &--no-grow { - flex: 0 0 auto; - } + &--no-grow, + &--auto { + flex: 0 0 auto; + } // Size to content, remove max-width constraint &--auto { - flex: 0 0 auto; width: auto; max-width: none; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/grid/src/_grid.scss` around lines 245 - 253, Both &--no-grow and &--auto contain the identical rule "flex: 0 0 auto"; remove duplication by moving that common declaration into a shared selector so both modifiers inherit it (for example combine the selectors like "&--no-grow, &--auto" or extract a shared placeholder/mixin used by both), then keep unique rules (width/ max-width) only in &--auto; update only the selectors &--no-grow and &--auto (or the new shared placeholder/mixin) so the visual behavior is unchanged while the duplicate flex declaration is removed.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/effects/src/_variables.scss`:
- Around line 3-5: The CSS custom properties --dialog-strong, --dialog,
--content (and the other shadow/color declarations later in the file) use legacy
rgba() alpha syntax which violates stylelint rules; replace each rgba(r, g, b,
a) instance with the modern color-function notation rgb(r g b / X%) (e.g.
rgba(0,0,0,0.16) -> rgb(0 0 0 / 16%); rgba(255,255,255,0.04) -> rgb(255 255 255
/ 4%)) throughout the file so the variables (--dialog-strong, --dialog,
--content and the other affected variables) use the modern notation and the lint
errors are resolved.
In `@packages/grid/src/_grid.scss`:
- Around line 72-73: You renamed public CSS classes (.nu-container, .nu-grid,
.nu-col and the content/utility modifiers) which breaks downstream consumers;
restore backward compatibility by adding deprecated aliases that map the old
class names to the new ones (e.g., keep .nu-container, .nu-grid, .nu-col
selectors that simply `@extend` or re-apply the new rules), add clear deprecation
comments above each alias, update the stylesheet comment/header to document the
deprecation/migration plan and target removal version, and add or update
unit/visual tests to assert the old class names still produce the same styling
until the major-version removal.
---
Nitpick comments:
In `@packages/effects/src/_utilities.scss`:
- Around line 30-158: The utilities file duplicates radius, blur, backdrop-blur
and transition classes; replace the repeated blocks with token-driven generation
using Sass maps and `@each` loops: create maps for radii (e.g., keys xs, sm,
md...), blurs (xs, sm...), backdrop-blurs and transition variants, then loop to
emit .nu-u-radius-#{key}, .nu-u-blur-#{key}, .nu-u-backdrop-blur-#{key} and
.nu-u-transition-#{variant} classes using the corresponding map values; update
or add map names and loop logic near the existing .nu-u-radius-*, .nu-u-blur-*,
.nu-u-backdrop-blur-*, and .nu-u-transition* definitions so the generated output
matches current variable names (e.g., --radius-*, --blur-*,
--default-transition-duration/timing-function).
In `@packages/grid/src/_grid.scss`:
- Around line 245-253: Both &--no-grow and &--auto contain the identical rule
"flex: 0 0 auto"; remove duplication by moving that common declaration into a
shared selector so both modifiers inherit it (for example combine the selectors
like "&--no-grow, &--auto" or extract a shared placeholder/mixin used by both),
then keep unique rules (width/ max-width) only in &--auto; update only the
selectors &--no-grow and &--auto (or the new shared placeholder/mixin) so the
visual behavior is unchanged while the duplicate flex declaration is removed.
In `@packages/grid/src/_utilities.scss`:
- Around line 2-172: The file _utilities.scss repeats many utility classes
(e.g., .nu-u-d-block/.nu-u-d-inline/.nu-u-d-flex, .nu-u-flex-row/.nu-u-flex-col,
.nu-u-flex-wrap/.nu-u-flex-nowrap, .nu-u-justify-start/.nu-u-justify-center,
.nu-u-items-start/.nu-u-items-center, .nu-u-self-start/.nu-u-self-center,
.nu-u-flex-grow/.nu-u-flex-grow-0, sizing like .nu-u-w-full/.nu-u-w-auto, and
overflow utilities) — convert these into Sass maps and generate the classes with
`@each` loops to remove duplication; create maps keyed by utility suffix (e.g.,
("d": (block: block, inline: inline, flex: flex, none: none)),
("flex-direction": (row: row, row-reverse: row-reverse, col: column, ...)),
("justify": (start: flex-start, center: center ...)), etc.), then loop to output
the selector names (.nu-u-<prefix>-<key>) with the corresponding property/value;
ensure unique selectors like .nu-u-d-*, .nu-u-flex-*, .nu-u-justify-*,
.nu-u-items-*, .nu-u-self-*, .nu-u-flex-grow-*, .nu-u-w-*, .nu-u-h-*, and
.nu-u-overflow-* match existing names so behavior is preserved.
🪄 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
Run ID: 7f0417d0-98a7-449c-bec0-cda9f48af559
⛔ Files ignored due to path filters (12)
bun.lockis excluded by!**/*.lockdist/index.cssis excluded by!**/dist/**dist/index.css.mapis excluded by!**/dist/**,!**/*.mappackages/colors/dist/index.cssis excluded by!**/dist/**packages/colors/dist/index.css.mapis excluded by!**/dist/**,!**/*.mappackages/effects/dist/index.cssis excluded by!**/dist/**packages/effects/dist/index.css.mapis excluded by!**/dist/**,!**/*.mappackages/grid/dist/index.cssis excluded by!**/dist/**packages/grid/dist/index.css.mapis excluded by!**/dist/**,!**/*.mappackages/reset/dist/index.cssis excluded by!**/dist/**packages/spacings/dist/index.cssis excluded by!**/dist/**packages/typography/dist/index.cssis excluded by!**/dist/**
📒 Files selected for processing (10)
.gitignorepackages/colors/package.jsonpackages/colors/src/_theme-dark--cold.scsspackages/effects/package.jsonpackages/effects/src/_utilities.scsspackages/effects/src/_variables.scsspackages/grid/package.jsonpackages/grid/src/_grid.scsspackages/grid/src/_utilities.scsspackages/grid/src/index.scss
|
@coderabbitai कृपया इस PR की समीक्षा करें |
|
✅ Actions performedReview triggered.
|
Summary by CodeRabbit
नई सुविधाएं
अद्यतन
कौशल/अन्य