Skip to content

fix(stickies): apply dark-theme sticky colors and add text color picker - #9951

Open
rabiaedayilmaz wants to merge 2 commits into
makeplane:previewfrom
rabiaedayilmaz:preview
Open

rabiaedayilmaz wants to merge 2 commits into
makeplane:previewfrom
rabiaedayilmaz:preview

Conversation

@rabiaedayilmaz

@rabiaedayilmaz rabiaedayilmaz commented Oct 5, 2026 •

Copy link
Copy Markdown

Description

Bug: sticky colors are always light pastels in dark mode

apps/web/styles/globals.css and apps/space/styles/globals.css declare an un-themed :root fallback for --editor-colors-*-background. @plane/editor/styles, imported earlier in the same file, defines the themed values under [data-theme*="light"] and [data-theme*="dark"]. Both :root and [data-theme*="dark"] have specificity (0,1,0), and the fallback comes later in the cascade, so it always wins. As a result, the dark values are never applied: under <html data-theme="dark">, --editor-colors-pink-background resolves to #fdd4e3 instead of #562e3d. The light text and icons on top become nearly invisible, so it looks as if sticky colors can't be changed.

Fix: the fallback is now :where(:root), which has zero specificity. The themed rules win, and the fallback still applies before a theme attribute is set.

Feature: text color for stickies

The sticky toolbar only offered bold, italic and to-do list, while the page and description editors already support text color. The lite editor already includes CustomColorExtension, and the sanitizer already allows data-text-color, so only the UI was missing.

  • Added a "Text colors" row to the sticky color palette (COLORS_LIST from @plane/editor, plus a "Remove text color" button).
  • Colors are applied with editorRef.executeMenuItemCommand({ itemKey: "text-color", color }), the same command the page toolbar uses.
  • Swatches use onMouseDown={(e) => e.preventDefault()} so the editor keeps its text selection.
  • The palette tooltip changes from "Background color" to "Colors", and the swatches now have aria-labels.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

ss2 ss1

Test Scenarios

  • Dark theme: on the Stickies page and in the Home stickies widget, create a sticky and change its background. It uses the dark ramp (e.g. pink #562e3d) and the text stays readable.
  • Light theme: the same flow still uses the light ramp (e.g. pink #fdd4e3).
  • DevTools: under <html data-theme="dark">, getComputedStyle(document.documentElement).getPropertyValue("--editor-colors-pink-background") returns the dark value.
  • Text color: select text in a sticky, open the palette and pick a text color. The selection is kept and colored. "Remove text color" clears it. After a reload, the color is still there.
  • Space app: editor color backgrounds follow the active theme.

References

Summary by CodeRabbit

  • New Features
    • Added text-color controls to the sticky editor, including an option to remove text color. Background-color controls remain available.
    • Renamed the color palette tooltip to “Colors.”
  • Bug Fixes
    • Editor background fallback colors can now be overridden by themed styles.

rabiaedayilmaz and others added 2 commits October 5, 2026 18:16
The un-themed :root fallback for --editor-colors-*-background tied the
editor's [data-theme*="dark"] rules on specificity and, coming later in
the cascade, always won, pinning stickies to the light ramp. Wrap it in
:where() so the themed rules apply while it still acts as a fallback.

Also add a "Text colors" row to the sticky color palette, using the
existing text-color editor command.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-and-text-color

fix(stickies): apply dark-theme colors and add text color picker
Copilot AI balanced review requested due to automatic review settings October 5, 2026 15:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 708f9467-7bf6-45bf-a4c9-a3ecc175031d
📥 Commits

Reviewing files that changed from the base of the PR and between 7466675 and 7ce12c9.

📒 Files selected for processing (4)
  • apps/space/styles/globals.css
  • apps/web/components/editor/sticky-editor/color-palette.tsx
  • apps/web/components/editor/sticky-editor/toolbar.tsx
  • apps/web/styles/globals.css

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The editor background fallback selectors now have zero specificity. The sticky editor palette now supports text-color selection and removal, alongside its existing background-color controls.

Changes

Editor color behavior

Layer / File(s) Summary
Themeable background fallbacks
apps/space/styles/globals.css, apps/web/styles/globals.css
The fallback selectors change from :root to :where(:root). The fallback color values remain unchanged.
Sticky-editor text-color controls
apps/web/components/editor/sticky-editor/color-palette.tsx, apps/web/components/editor/sticky-editor/toolbar.tsx
The palette adds text-color options and a control to remove text color. The toolbar sends selections to the editor’s text-color command, and the tooltip label changes to “Colors.”

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant ColorPalette
  participant Toolbar
  participant TextColorCommand
  User->>ColorPalette: Select a text color or remove text color
  ColorPalette->>Toolbar: Pass color key or undefined to callback
  Toolbar->>TextColorCommand: Execute text-color command
Loading

Merge Risk: ⚪ Minimal · up to 7ce12

The change lets themed sticky backgrounds apply in dark themes and adds text-color controls to the sticky palette. No merge-blocking risk was identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes both main changes: fixing dark-theme sticky colors and adding a text-color picker.
Description check ✅ Passed The description covers the bug, implementation, feature, change types, screenshots, and test scenarios. It does not report whether the listed tests were run or their results, but the description is ot…
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

This branch has not been deployed

No deployments
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