refactor: replace computed with functions in styles#547
Conversation
📝 WalkthroughWalkthroughThis PR refactors CSS variable resolution throughout the Uniwind bundler and runtime, shifting from lazy ChangesVariable Resolution Function Refactoring
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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.
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 `@packages/uniwind/tests/test.css`:
- Line 44: The new `@utility` at-rule is tripping the scss/at-rule-no-unknown
linter; either add a targeted inline suppression immediately above the `@utility`
usage (for example a single-line comment to disable scss/at-rule-no-unknown for
the next line) or whitelist this at-rule in the stylelint config by adding
"utility" to the ignoreAtRules list for the scss/at-rule-no-unknown rule so the
`@utility` declaration is allowed; locate the offending token "`@utility`" in the
test file and apply one of these two fixes.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: a6170e16-9a10-4b94-bc33-f3a9e2c38227
📒 Files selected for processing (16)
packages/uniwind/src/bundler/css-compiler/compileNativeCSS.tspackages/uniwind/src/bundler/css-processor/addMetaToStylesTemplate.tspackages/uniwind/src/bundler/css-processor/color.tspackages/uniwind/src/bundler/css-processor/css.tspackages/uniwind/src/bundler/css-processor/units.tspackages/uniwind/src/bundler/css-processor/utils.tspackages/uniwind/src/bundler/css-processor/var.tspackages/uniwind/src/core/config/config.native.tspackages/uniwind/src/core/native/native-utils.tspackages/uniwind/src/core/native/parsers/textShadow.tspackages/uniwind/src/core/native/parsers/transforms.tspackages/uniwind/src/core/native/store.tspackages/uniwind/src/core/types.tspackages/uniwind/src/hooks/useCSSVariable/getVariableValue.native.tspackages/uniwind/tests/native/styles-parsing/colors.test.tsxpackages/uniwind/tests/test.css
💤 Files with no reviewable changes (1)
- packages/uniwind/src/core/native/native-utils.ts
|
🚀 This pull request is included in v1.8.0. See Release v1.8.0 for release notes. |
Summary by CodeRabbit