Skip to content

feat: Variable Font Size for Flex Nodes#1832

Merged
camielvs merged 1 commit intomasterfrom
02-20-feat_variable_font_size_for_flex_nodes
Feb 26, 2026
Merged

feat: Variable Font Size for Flex Nodes#1832
camielvs merged 1 commit intomasterfrom
02-20-feat_variable_font_size_for_flex_nodes

Conversation

@camielvs
Copy link
Collaborator

@camielvs camielvs commented Feb 20, 2026

Description

Allows both the title and body text of a Flex Node to be customizable via a slider in the context panel.

Related Issue and Pull requests

Type of Change

  • New feature

Checklist

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

Screenshots (if applicable)

image.png

image.png

Test Instructions

  • Edit a sticky note via the context panel. Confirm you can change the font size via a new popover above the edit box. Sticky Note should update in real time.

Additional Comments

@camielvs camielvs force-pushed the 02-20-feat_variable_font_size_for_flex_nodes branch from d320bde to fabafff Compare February 21, 2026 00:15
@camielvs camielvs force-pushed the 02-18-feat_lock_flex_nodes branch from 1a7771b to 8e50ac2 Compare February 21, 2026 00:15
@camielvs camielvs mentioned this pull request Feb 21, 2026
3 tasks
@camielvs camielvs force-pushed the 02-20-feat_variable_font_size_for_flex_nodes branch from fabafff to 21c4bc8 Compare February 21, 2026 00:40
@camielvs camielvs marked this pull request as ready for review February 21, 2026 00:43
@camielvs camielvs requested a review from a team as a code owner February 21, 2026 00:43
"@radix-ui/react-scroll-area": "^1.2.10",
"@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-separator": "^1.1.8",
"@radix-ui/react-slider": "^1.3.6",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thinking outloud - if we need to add one more package for this, or can we just use a drop-down with predefined sizes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I did originally just offer our standard Text component sizes (xs, sm, md etc). But then we're limited by our Text component. I can very easily see a world where more granularity is desired and hence I went for a slider

Comment on lines +49 to +55
<Slider
value={[value]}
onValueChange={([newValue]) => onChange(newValue)}
min={TEXT_SIZE_MIN}
max={TEXT_SIZE_MAX}
step={1}
/>
Copy link
Collaborator

Choose a reason for hiding this comment

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

IMO: using simple dropdown + free input as in Figma works better for me.

image.png

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ultimately it comes down to how much granularity & control we want to give users over the font size. I agree a nice, small, compact dropdown is preferred. I guess, arguably we could include an input box to allow any value, rather than a slider. Maybe something to explore as a follow-up

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Comment on lines +29 to +36
<div
className={cn(
"cursor-pointer border border-muted rounded-sm p-1 bg-background h-fit aspect-square hover:bg-secondary flex items-center justify-center",
className,
)}
>
<Icon name="Type" />
</div>
Copy link
Collaborator

Choose a reason for hiding this comment

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

It should be a \<Button variant="ghost" > I believe?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can't use Button here - I already tried. PopoverTrigger is already a button component and we get warnings and issues if we try to render a button inside a button

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

(we could update our shadcn Popover code though)

Copy link
Collaborator

@maxy-shpfy maxy-shpfy left a comment

Choose a reason for hiding this comment

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

Approving this - considering we can think about comments I left.

Copy link
Collaborator Author

I think you have a fair suggestion with the dropdown - provided we include an input box for custom sizing. I have marked it for follow up. Issue to track is here: https://github.com/Shopify/oasis-frontend/issues/493

@camielvs camielvs force-pushed the 02-20-feat_variable_font_size_for_flex_nodes branch from 21c4bc8 to e600c32 Compare February 26, 2026 04:04
@camielvs camielvs force-pushed the 02-18-feat_lock_flex_nodes branch from 8e50ac2 to 1c44d77 Compare February 26, 2026 04:04
@camielvs camielvs force-pushed the 02-20-feat_variable_font_size_for_flex_nodes branch from e600c32 to e1855fb Compare February 26, 2026 04:23
@camielvs camielvs force-pushed the 02-18-feat_lock_flex_nodes branch from 1c44d77 to 3e4049f Compare February 26, 2026 04:23
@camielvs camielvs force-pushed the 02-20-feat_variable_font_size_for_flex_nodes branch from e1855fb to b1ddeb7 Compare February 26, 2026 04:24
@camielvs camielvs force-pushed the 02-18-feat_lock_flex_nodes branch from 3e4049f to 31283cc Compare February 26, 2026 04:24
@camielvs camielvs changed the base branch from 02-18-feat_lock_flex_nodes to graphite-base/1832 February 26, 2026 04:28
@camielvs camielvs force-pushed the 02-20-feat_variable_font_size_for_flex_nodes branch from b1ddeb7 to a5fa3d7 Compare February 26, 2026 04:29
@graphite-app graphite-app bot changed the base branch from graphite-base/1832 to master February 26, 2026 04:29
@camielvs camielvs force-pushed the 02-20-feat_variable_font_size_for_flex_nodes branch from a5fa3d7 to 7c9fade Compare February 26, 2026 04:30
@camielvs camielvs force-pushed the 02-20-feat_variable_font_size_for_flex_nodes branch from 7c9fade to 4b867ec Compare February 26, 2026 04:33
Copy link
Collaborator Author

camielvs commented Feb 26, 2026

Merge activity

  • Feb 26, 4:37 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Feb 26, 4:37 AM UTC: @camielvs merged this pull request with Graphite.

@camielvs camielvs merged commit c16cda2 into master Feb 26, 2026
14 checks passed
@camielvs camielvs deleted the 02-20-feat_variable_font_size_for_flex_nodes branch February 26, 2026 04:37
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