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: use proper states and make UtilityCard more generic #1777

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

apvale
Copy link
Contributor

@apvale apvale commented Nov 15, 2024

Description of the change

Breaking Change:

  • Removed the interactiveElementType prop in order to add two new states properties hoverable and clickable
  • Renamed categoryTag to subTitle to make it more generic
  • onClick prop is only required when using clickable as true

Minor:

  • Added hoverable and clickable to have more control of state of the card
  • Added emojiWrapperSize prop with options small and large so it's adaptable to different use cases
  • Added indicator to add a helper element to the top right of the card

Testing the change

  • Write your testing instructions here

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Non-Breaking Change (change to existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Development

  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached.

Copy link

changeset-bot bot commented Nov 15, 2024

🦋 Changeset detected

Latest commit: dec79d9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@localyze-pluto/components Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Nov 15, 2024

Size Change: +23 B (+0.05%)

Total Size: 43.6 kB

Filename Size Change
packages/components/dist/index.js 26.8 kB +23 B (+0.09%)
ℹ️ View Unchanged
Filename Size
packages/design-tokens/dist/index.js 8.59 kB
packages/design-tokens/dist/js/border-radius.js 181 B
packages/design-tokens/dist/js/border-style.js 140 B
packages/design-tokens/dist/js/border-width.js 146 B
packages/design-tokens/dist/js/colors.js 4.44 kB
packages/design-tokens/dist/js/font-family.js 141 B
packages/design-tokens/dist/js/font-size.js 261 B
packages/design-tokens/dist/js/font-weight.js 157 B
packages/design-tokens/dist/js/line-height.js 193 B
packages/design-tokens/dist/js/margin.js 131 B
packages/design-tokens/dist/js/padding.js 159 B
packages/design-tokens/dist/js/size.js 247 B
packages/design-tokens/dist/js/space.js 343 B
packages/design-tokens/dist/js/z-index.js 169 B
packages/theme/dist/index.js 1.47 kB

compressed-size-action

Copy link
Contributor

@franziiiini franziiiini left a comment

Choose a reason for hiding this comment

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

Looks good to me. Might be worthwhile to add a Story template. What do you think?

@@ -32,7 +33,11 @@ Default.args = {
export const CardWithBadge: Story = Template.bind({});
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can add CardWithContent here as well?

@apvale apvale marked this pull request as draft November 18, 2024 09:58
@apvale apvale force-pushed the feat/add-content-prop-to-utility-card branch 2 times, most recently from acc83d8 to fbd64a5 Compare February 6, 2025 10:17
@apvale apvale marked this pull request as ready for review February 6, 2025 10:17
@apvale apvale force-pushed the feat/add-content-prop-to-utility-card branch from fbd64a5 to dec79d9 Compare February 6, 2025 10:31
@apvale apvale changed the title feat: replace status prop with content prop in UtilityCard component feat: use proper states and make UtilityCard more generic Feb 6, 2025
- Renamed `categoryTag` to `subTitle` to make it more generic
- `onClick` prop is only required when using `clickable` as true

Minor:
Copy link
Contributor

Choose a reason for hiding this comment

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

is it fine that this is a major update but we include minor updates?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From what we have here, I would say it's fine. Do you see any specific issue with it?

Copy link
Contributor

@franziiiini franziiiini left a comment

Choose a reason for hiding this comment

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

Looks good to me

@apvale apvale merged commit 2ada712 into main Feb 11, 2025
14 checks passed
@apvale apvale deleted the feat/add-content-prop-to-utility-card branch February 11, 2025 09:28
@alpacatron alpacatron mentioned this pull request Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants