Skip to content

Add rounding radius property to theme#861

Merged
jassmith merged 5 commits into6.0.0from
feature/add-rounding-theme-prop
Jan 11, 2024
Merged

Add rounding radius property to theme#861
jassmith merged 5 commits into6.0.0from
feature/add-rounding-theme-prop

Conversation

@lukasmasuch
Copy link
Copy Markdown
Collaborator

@lukasmasuch lukasmasuch commented Jan 9, 2024

Introduces an optional roundingRadius theming option which is used as a default/fallback for rounded rects in GDG:

This is applied in:

  • Skeleton of loading cell
  • Checkbox
  • Image cell
  • Button cell
  • Tags cell
  • Bubble cell
  • Drilldown cell

Example with roundingRadius==6

image

Closes #845

@lukasmasuch lukasmasuch changed the base branch from main to 6.0.0 January 9, 2024 15:06
readonly target: Rectangle;
readonly forceEditMode: boolean;
readonly isValid?: boolean;
readonly theme: Theme;
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I added this to make the theme available to custom editors, but eventually ended up not using this. But I think it could be useful to have access to this when implementing editors. Wdyt?


drilldownCache[key] = canvas;

const trueRounding = Math.min(rounding, targetWidth / 2, targetHeight / 2);
Copy link
Copy Markdown
Collaborator Author

@lukasmasuch lukasmasuch Jan 9, 2024

Choose a reason for hiding this comment

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

I removed this because the overlay editor also just used a static value (6px), but I can also try to figure out how to keep this logic in. Wdyt?

@lukasmasuch lukasmasuch requested a review from jassmith January 9, 2024 16:13
@lukasmasuch lukasmasuch marked this pull request as ready for review January 9, 2024 16:13
Copy link
Copy Markdown
Contributor

@jassmith jassmith left a comment

Choose a reason for hiding this comment

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

LGTM

@jassmith jassmith merged commit 5e084d8 into 6.0.0 Jan 11, 2024
@jassmith jassmith deleted the feature/add-rounding-theme-prop branch January 11, 2024 02:40
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