Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: better deephaven ui button defaults #613

Merged
merged 6 commits into from
Jul 12, 2024

Conversation

dsmmcken
Copy link
Contributor

@dsmmcken dsmmcken commented Jul 9, 2024

Make accent the default variant, and fill the default style.

  1. Buttons should have a default variant and style specified., since variant is actually a required prop. Style being set to fill makes using static_color easier.
  2. Remove deprecated cta and overBackground variants.
  3. element_type wasn't plumbed through but needs to be set to a for href link buttons to work. I've made this internal and just auto set it for users if href is set.

BREAKING CHANGE:

ui.button defaults changed to variant="accent" and style="fill". To restore previous styling, use variant="primary" and style="outline".

`cta` and `overBackground` aren't variants
Copy link
Contributor Author

@dsmmcken dsmmcken left a comment

Choose a reason for hiding this comment

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

No idea where you got cta and overBackground, co-pilot hallucinations?

I see now they are deprecated spectrum legacy options:

/** @deprecated */
type LegacyButtonVariant = 'cta' | 'overBackground';

@dsmmcken dsmmcken changed the title fix: remove non-existent types fix: remove non-existent button variant types Jul 9, 2024
@dsmmcken dsmmcken changed the title fix: remove non-existent button variant types fix: remove non-existent button variant types and add button element_type Jul 9, 2024
… no variant it doesn't get a hover states, and with no style static_color won't work without a variant and style.
@dsmmcken dsmmcken changed the title fix: remove non-existent button variant types and add button element_type feat: polish deephaven ui button defaults Jul 9, 2024
@dsmmcken dsmmcken changed the title feat: polish deephaven ui button defaults feat: better deephaven ui button defaults Jul 9, 2024
Co-authored-by: Mike Bender <mikebender@deephaven.io>
@dsmmcken dsmmcken requested a review from mofojed July 11, 2024 20:35
@dsmmcken dsmmcken merged commit 351f3a5 into main Jul 12, 2024
15 checks passed
@dsmmcken dsmmcken deleted the dmckenzie_remove_button_types branch July 12, 2024 16:51
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