fix: Color naming & CSS (BLO-946)#2684
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
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 selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughCSS selectors for text/background colors were changed to target parent blocks via :has(> .bn-block-content[...]) instead of direct element attributes; multiple locale files updated to rename the color-picker "default" label to "auto"/equivalent; an example app HTML moved color data attributes onto Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 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)
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: 2
🤖 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/react/src/editor/styles.css`:
- Around line 203-206: Fix the typo in the selector that prevents orange
backgrounds from matching: in the rule that targets
[data-style-type="backgroundColor"][data-value="orange"] and .bn-block:has(>
.bn-block-content[data-background-color="broorangewn"]), replace the incorrect
attribute value "broorangewn" with "orange" so the .bn-block:has(...) selector
correctly matches elements with data-background-color="orange" and applies
var(--bn-colors-highlights-orange-background).
- Around line 158-161: The CSS selector contains a typo: .bn-block:has(>
.bn-block-content[data-text-color="broorangewn"]) won't match the DOM which
emits data-text-color="orange"; update the selector to use
data-text-color="orange" (and also verify the adjacent attribute selector
[data-style-type="textColor"][data-value="orange"] remains correct) so the
orange text color variable (--bn-colors-highlights-orange-text) is applied.
🪄 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: 5d44c20b-7367-48b8-8ef5-05da1a7908fc
📒 Files selected for processing (25)
packages/core/src/editor/Block.csspackages/core/src/i18n/locales/ar.tspackages/core/src/i18n/locales/de.tspackages/core/src/i18n/locales/en.tspackages/core/src/i18n/locales/es.tspackages/core/src/i18n/locales/fa.tspackages/core/src/i18n/locales/fr.tspackages/core/src/i18n/locales/he.tspackages/core/src/i18n/locales/hr.tspackages/core/src/i18n/locales/is.tspackages/core/src/i18n/locales/it.tspackages/core/src/i18n/locales/ja.tspackages/core/src/i18n/locales/ko.tspackages/core/src/i18n/locales/nl.tspackages/core/src/i18n/locales/no.tspackages/core/src/i18n/locales/pl.tspackages/core/src/i18n/locales/pt.tspackages/core/src/i18n/locales/ru.tspackages/core/src/i18n/locales/sk.tspackages/core/src/i18n/locales/uk.tspackages/core/src/i18n/locales/uz.tspackages/core/src/i18n/locales/vi.tspackages/core/src/i18n/locales/zh-tw.tspackages/core/src/i18n/locales/zh.tspackages/react/src/editor/styles.css
💤 Files with no reviewable changes (1)
- packages/core/src/editor/Block.css
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/mantine
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
commit: |
Summary
This PR fixes 2 issues:
Closes #2005
Rationale
These issues cause confusion for users.
Changes
Impact
N/A
Testing
N/A
Screenshots/Video
N/A
Checklist
Additional Notes
N/A
Summary by CodeRabbit