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

[DDW-675] Catalyst dynamic content #2856

Merged
merged 29 commits into from Feb 15, 2022

Conversation

lucas-barros
Copy link
Contributor

@lucas-barros lucas-barros commented Feb 3, 2022

This PR changes how catalyst fund information are retrieved, from hard coded values to values fetched from catalyst API. A new message was added in case of errors when retrieving data from API.

To force switch between phases during tests:
window.daedalus.stores.voting._checkFundPhase(new Date('Jan 20, 2022, 11:00 UTC'))
To force API error message:
window.daedalus.stores.voting._checkFundPhase()
Access voting screen on testnet
daedalus.stores.app._updateRouteLocation({route: "/voting/registration"})

Phases
Snapshot: Jan 6, 2022, 11:00 UTC
Voting: Jan 20, 2022, 11:00 UTC - Feb 3, 2022, 10:59 UTC
Tallying: Feb 3, 2022, 11:00 UTC - Feb 9, 2022, 23:59 UTC
Results: Feb 10, 2022

Data fetched from API:

  • Current fund number
  • Current fund start date
  • Current fund end date
  • Current fund results date
  • Current fund snapshot date
  • Next fund number
  • Next fund snapshot date

Data not present on API

  • Fund rewards

Screens affected:

  • Voting screen (fund name/number and dates)
  • Voting registration dialog steps (fund number)

Todos

  • TODO

Screenshots

image

image

image

image

image

image

image

Testing Checklist


Test Scenario

Validate voting when API is unavailable

Given that I am on the voting screen
When I ran the following command to force the API to return no date
 
"window.daedalus.stores.voting._checkFundPhase()"

Then I can see there is a message on the screen that indicates the API is unavailable
And the current phase info and the register option are no longer visible

Review Checklist

Basics

  • PR assigned to the PR author(s)
  • input-output-hk/daedalus-dev and input-output-hk/daedalus-qa assigned as PR reviewers
  • If there are UI changes, Alexander Rukin assigned as an additional reviewer
  • All visual regression testing has been reviewed (assign run Chromatic label to PR to trigger the run)
  • PR has appropriate labels (release-vNext, feature/bug/chore, WIP)
  • PR link is added to a Jira ticket, ticket moved to In Review
  • PR is updated to the most recent version of the target branch (and there are no conflicts)
  • PR has a good description that summarizes all changes
  • PR contains screenshots (in case of UI changes)
  • CHANGELOG entry has been added to the top of the appropriate section (Features, Fixes, Chores) and is linked to the correct PR on GitHub
  • There are no missing translations (running yarn manage:translations produces no changes)
  • Text changes are proofread and approved (Jane Wild / Amy Reeve)
  • Japanese text changes are proofread and approved (Junko Oda)
  • Storybook works and no stories are broken (yarn storybook)
  • In case of dependency changes yarn.lock file is updated

Code Quality

  • Important parts of the code are properly commented and documented
  • Code is properly typed with typescript types
  • React components are split-up enough to avoid unnecessary re-renderings
  • Any code that only works in main process is neatly separated from components

Testing

  • New feature/change is covered by acceptance tests
  • New feature/change is manually tested and approved by QA team
  • All existing acceptance tests are still up-to-date
  • New feature/change is covered by Daedalus Testing scenario
  • All existing Daedalus Testing scenarios are still up-to-date

After Review

  • Update Slack QA thread by marking it with a green checkmark

@lucas-barros lucas-barros marked this pull request as ready for review February 7, 2022 13:13
@lucas-barros lucas-barros self-assigned this Feb 7, 2022
Copy link
Contributor

@renanvalentin renanvalentin left a comment

Choose a reason for hiding this comment

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

Hey @lucas-barros great job! This feature will be valuable for next catalyst funds. 🚀

source/renderer/app/stores/VotingStore.ts Outdated Show resolved Hide resolved
@lucas-barros lucas-barros force-pushed the feature/ddw-675-catalyst-dynamic-content branch from c5c843d to 1c28bdb Compare February 9, 2022 18:40
@alexander-rukin
Copy link
Contributor

@lucas-barros is it worth adding "api error" state to storybook?

@alexander-rukin
Copy link
Contributor

alexander-rukin commented Feb 10, 2022

image

https://zpl.io/Pqz9Ymm Can you pls also update title to be semibold like in designs (it also should be fixed for those titles "Fund7" "Fund8" as they use same style)

@daniloprates my suggestion is to swap medium and light highlighting and add dots "." in the end of sencences. Wdyt?

@lucas-barros
Copy link
Contributor Author

image

https://zpl.io/Pqz9Ymm Can you pls also update title to be semibold like in designs (it also should be fixed for those titles "Fund7" "Fund8" as they use same style)

@daniloprates my suggestion is to swap medium and light highlighting and add dots "." in the end of sencences. Wdyt?

@alexander-rukin I've made the updates. Storybook also.

Copy link
Contributor

@alexander-rukin alexander-rukin 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

@alexander-rukin
Copy link
Contributor

image

noticed that title is not per design it's 19px font size -> should be 18px and it lacks letter-spacing

you can fix it here or pls create a card for this

Copy link
Contributor

@szymonmaslowski szymonmaslowski left a comment

Choose a reason for hiding this comment

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

Nice work 🚀 Just few comments/suggestions.

source/renderer/app/api/api.ts Outdated Show resolved Hide resolved
source/renderer/app/api/api.ts Outdated Show resolved Hide resolved
source/renderer/app/api/api.ts Outdated Show resolved Hide resolved
@ManusMcCole ManusMcCole self-requested a review February 15, 2022 13:21
Copy link

@ManusMcCole ManusMcCole 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 👍

@danielmain danielmain merged commit 4c86612 into develop Feb 15, 2022
@danielmain danielmain deleted the feature/ddw-675-catalyst-dynamic-content branch February 15, 2022 19:07
renanvalentin pushed a commit that referenced this pull request Mar 7, 2022
Co-authored-by: Daniel Main <daniel.main.cernhoff@icloud.com>
renanvalentin pushed a commit that referenced this pull request Mar 7, 2022
Co-authored-by: Daniel Main <daniel.main.cernhoff@icloud.com>
renanvalentin pushed a commit that referenced this pull request Mar 7, 2022
Co-authored-by: Daniel Main <daniel.main.cernhoff@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants