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

Extract HeadingSubtitleWithUsdValue #6037

Merged
merged 1 commit into from
Dec 18, 2024
Merged

Extract HeadingSubtitleWithUsdValue #6037

merged 1 commit into from
Dec 18, 2024

Conversation

dskloetd
Copy link
Contributor

Motivation

On the wallet page, we show the account balance in USD in the heading subtitle.
We want to do something similar on the NNS and SNS neuron details page.

To make this easier, in this PR we extract a component to show a heading subtitle with USD value.

Changes

  1. Extract HeadingSubtitleWithUsdValue from WalletPageHeading.
  2. Use HeadingSubtitleWithUsdValue in WalletPageHeading if ENABLE_USD_VALUES is enabled.

Tests

  1. Unit test added.
  2. Page objects adjusted.
  3. Tested manually.

Todos

  • Add entry to changelog (if necessary).
    not necessary

@dskloetd dskloetd marked this pull request as ready for review December 18, 2024 13:58
@dskloetd dskloetd requested a review from a team as a code owner December 18, 2024 13:58
@dskloetd dskloetd enabled auto-merge December 18, 2024 14:02
Copy link
Contributor

@yhabib yhabib left a comment

Choose a reason for hiding this comment

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

lgtm

@dskloetd dskloetd added this pull request to the merge queue Dec 18, 2024
Copy link
Contributor

@mstrasinskis mstrasinskis left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Merged via the queue into main with commit 1026fb0 Dec 18, 2024
31 checks passed
@dskloetd dskloetd deleted the kloet/usd-heading branch December 18, 2024 14:37
github-merge-queue bot pushed a commit that referenced this pull request Dec 18, 2024
# Motivation

Want to show the stake in USD on the neuron details page similar to how
we show the account balance on the wallet page.

This PR does it for NNS neurons. Another PR will do SNS neurons.
And a third PR will make sure token prices are loaded when the neuron
page is deep linked.

# Changes

1. Use `HeadingSubtitleWithUsdValue` which was extracted in
#6037 in `NnsNeuronPageHeading`.
Some of the slot content is temporarily duplicate between with and
without feature flag.

# Tests

1. Unit tests added.
2. Manually at
https://qsgjb-riaaa-aaaaa-aaaga-cai.dskloet-ingress.devenv.dfinity.network/neuron/?u=qsgjb-riaaa-aaaaa-aaaga-cai&neuron=7894867686608507388

# Todos

- [ ] Add entry to changelog (if necessary).
not yet
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