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

views: prop for optionally displaying value on ValueViewComponent #1923

Merged
merged 3 commits into from
Nov 25, 2024

Conversation

TalDerei
Copy link
Contributor

@TalDerei TalDerei commented Nov 22, 2024

the V2 ValueViewComponent needs a showValue prop. For instance the prepaid claim fee amount can't be shown in the public view and will need to set the prop to false.

@TalDerei TalDerei self-assigned this Nov 22, 2024
Copy link

changeset-bot bot commented Nov 22, 2024

🦋 Changeset detected

Latest commit: 73ffd08

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

This PR includes changesets to release 1 package
Name Type
@penumbra-zone/ui Patch

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 22, 2024

Visit the preview URL for this PR (updated for commit 73ffd08):

https://penumbra-ui-preview--pr1923-approval-dialogue-re-paxexa97.web.app

(expires Mon, 02 Dec 2024 15:41:28 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 709d729610ef7a6369b23f1cb2b820a60cc685b1

@TalDerei TalDerei requested a review from a team November 22, 2024 16:22
/**
* If false, the amount will not be displayed.
*/
showValue?: boolean;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

please review the storybook preview link

Copy link
Member

@hdevalence hdevalence left a comment

Choose a reason for hiding this comment

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

LGTM, this would have been useful for the insights page

packages/ui/src/ValueView/index.tsx Outdated Show resolved Hide resolved
@@ -58,19 +62,22 @@ export const ValueViewComponent = <SelectedContext extends Context = 'default'>(
priority = 'primary',
hideSymbol = false,
Copy link
Contributor

Choose a reason for hiding this comment

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

thought: hmm, maybe we should have called this showSymbol with a default to true 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that’s clearer now — it’s been renamed to showSymbol. Currently, the v2 ValueViewComponent is only used once within the dex-explorer in the SummaryCard.

@TalDerei TalDerei merged commit 5cf7c55 into main Nov 25, 2024
8 checks passed
@TalDerei TalDerei deleted the approval-dialogue-rendering branch November 25, 2024 21:43
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.

3 participants