Skip to content

Improves task node color palette derivation and picker UX#2148

Merged
Mbeaulne merged 1 commit intomasterfrom
04-23-move_colour_selector
Apr 30, 2026
Merged

Improves task node color palette derivation and picker UX#2148
Mbeaulne merged 1 commit intomasterfrom
04-23-move_colour_selector

Conversation

@Mbeaulne
Copy link
Copy Markdown
Collaborator

@Mbeaulne Mbeaulne commented Apr 23, 2026

Description

Introduces a deriveColorPalette utility that computes a cohesive set of colors (background, border, section background, and WCAG-appropriate text) from a single base hex color. This replaces the previous approach of using the raw selected color directly as the card background, and instead applies the derived palette across the task node card, collapsed node, and task details panel for a more polished and accessible appearance.

The color picker in the task details header is replaced with a custom circular trigger button that previews the derived palette (background, border, and pencil icon color), and the color picker input field now strips and re-adds the # prefix so users type only the hex digits. The renderTrigger prop was added to ColorPicker to support this custom trigger pattern.

The task color picker has also been moved out of the collapsible configuration section and into the task name header row, making it more immediately accessible.

Related Issue and Pull requests

Resolves #2119
Resolves #2120

Type of Change

  • Bug fix
  • New feature
  • Improvement
  • Cleanup/Refactor
  • Breaking change
  • Documentation update

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

image.png

Test Instructions

  1. Open a pipeline in the editor and select a task node.
  2. Use the color picker button in the task name header to assign a color.
  3. Verify the task node card reflects the derived palette: background, border, section backgrounds, and text colors all update cohesively.
  4. Verify the collapsed task node also shows the correct border color.
  5. Confirm the color picker hex input accepts input without a leading # and applies correctly.
  6. Test with light and dark preset colors to confirm WCAG text contrast is applied correctly.

Additional Comments

The deriveColorPalette function performs HSL-space transformations: the border is darkened and slightly more saturated, while the section background is desaturated and lightened toward white. These values were chosen to produce visually consistent results across the full range of preset colors.

@Mbeaulne Mbeaulne mentioned this pull request Apr 23, 2026
8 tasks
Copy link
Copy Markdown
Collaborator Author

Mbeaulne commented Apr 23, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 23, 2026

🎩 Preview

A preview build has been created at: 04-23-move_colour_selector/9dc4045

@Mbeaulne Mbeaulne changed the title Move colour selector Improves task node color palette derivation and picker UX Apr 23, 2026
@Mbeaulne Mbeaulne force-pushed the 04-23-move_colour_selector branch from 333e5e5 to 45fd6a2 Compare April 23, 2026 15:48
@Mbeaulne Mbeaulne marked this pull request as ready for review April 23, 2026 15:55
@Mbeaulne Mbeaulne requested a review from a team as a code owner April 23, 2026 15:55
@Mbeaulne Mbeaulne force-pushed the 04-23-move_colour_selector branch from 45fd6a2 to bff8d22 Compare April 23, 2026 16:39
Comment thread src/routes/v2/pages/Editor/nodes/TaskNode/context/TaskDetails/TaskDetails.tsx Outdated
Comment thread src/components/ui/color.tsx Outdated
Comment thread src/components/ui/color.tsx Outdated
Comment thread src/routes/v2/shared/nodes/TaskNode/TaskNodeCard.tsx
Copy link
Copy Markdown
Collaborator

@camielvs camielvs left a comment

Choose a reason for hiding this comment

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

I'd like to see some comparisons between the current opacity-based system and this new palette-based system

Copy link
Copy Markdown
Collaborator

There's also no visual on-node feedback to indicate that a task is selected. Previously we added a darker border. In this PR the border is always dark and does not change when selected.

@Mbeaulne Mbeaulne force-pushed the 04-23-task_sections_are_now_collapsible branch from 3a004fc to eeb299c Compare April 28, 2026 16:15
@Mbeaulne Mbeaulne force-pushed the 04-23-move_colour_selector branch from 3b1a268 to 267d2e8 Compare April 28, 2026 16:15
@Mbeaulne Mbeaulne requested a review from camielvs April 28, 2026 16:48
Copy link
Copy Markdown
Collaborator Author

There's also no visual on-node feedback to indicate that a task is selected. Previously we added a darker border. In this PR the border is always dark and does not change when selected.

​I've adjusted the highlight on selection. We can adjust in another PR if needed.
image.png

@Mbeaulne Mbeaulne force-pushed the 04-23-move_colour_selector branch from 267d2e8 to cb3919d Compare April 28, 2026 16:53
@Mbeaulne Mbeaulne force-pushed the 04-23-task_sections_are_now_collapsible branch 2 times, most recently from 967f27f to 059ab3e Compare April 28, 2026 20:15
@Mbeaulne Mbeaulne force-pushed the 04-23-move_colour_selector branch from cb3919d to 17127e6 Compare April 28, 2026 20:15
@Mbeaulne Mbeaulne changed the base branch from 04-23-task_sections_are_now_collapsible to graphite-base/2148 April 28, 2026 20:23
@Mbeaulne Mbeaulne force-pushed the graphite-base/2148 branch from 059ab3e to e1193f4 Compare April 28, 2026 20:23
@Mbeaulne Mbeaulne force-pushed the 04-23-move_colour_selector branch from 17127e6 to bb3b4a1 Compare April 28, 2026 20:23
@graphite-app graphite-app Bot changed the base branch from graphite-base/2148 to master April 28, 2026 20:23
@Mbeaulne Mbeaulne force-pushed the 04-23-move_colour_selector branch from bb3b4a1 to 551e84c Compare April 28, 2026 20:23
Comment thread src/components/ui/color.tsx Outdated
Comment thread src/components/ui/color.tsx
Comment thread src/routes/v2/pages/Editor/nodes/TaskNode/context/TaskDetails/TaskDetails.tsx Outdated
@Mbeaulne Mbeaulne force-pushed the 04-23-move_colour_selector branch from 551e84c to 72635d4 Compare April 30, 2026 15:54
@Mbeaulne Mbeaulne requested a review from camielvs April 30, 2026 16:37
<Input
value={
localColor === "transparent"
? ""
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Given transparent is now maps through to empty string let's keep the # always visible

image.png

Copy link
Copy Markdown
Collaborator

@camielvs camielvs left a comment

Choose a reason for hiding this comment

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

lgtm. but suggest having the color input # always visible given transparent now renders as blank.

Copy link
Copy Markdown
Collaborator Author

Mbeaulne commented Apr 30, 2026

Merge activity

  • Apr 30, 7:56 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 30, 7:56 PM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 30, 7:59 PM UTC: @Mbeaulne merged this pull request with Graphite.

@Mbeaulne Mbeaulne force-pushed the 04-23-move_colour_selector branch from 72635d4 to 9dc4045 Compare April 30, 2026 19:56
@Mbeaulne Mbeaulne merged commit 5a0a7d7 into master Apr 30, 2026
17 checks passed
@Mbeaulne Mbeaulne deleted the 04-23-move_colour_selector branch April 30, 2026 19:59
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.

Editor V2: Improve affordance of task color selection control Editor V2: Keep task coloring tool next to task name

2 participants