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

fix(UI): refactor mining button states & fix up loading x animation sync #53

Merged
merged 10 commits into from
Aug 15, 2024

Conversation

shanimal08
Copy link
Collaborator

@shanimal08 shanimal08 commented Aug 14, 2024

Description

  • fixed up mining start/stop state x animation start/stop
  • fixed window border weirdness (added transparent:true back)
  • moved visuals hook calls to useMining
  • removed dependency on BE value cpu.is_minng_enabled as it wasn't reliably updating. used value based on app set up progress instead
  • added loading state directly to MiningButton component
  • refactored MiningButton + its styling so there's less computation and weird logic to figure out which state to display
  • **important: ** added react-hooks eslint plugin - a lot of our hooks were missing dependencies which contributed to weird mismatching states - updated hooks where deps were missing
  • other file changes are minor config & linting fixes

Motivation and Context

  • mining button loader had a weird delay on start
  • animation start was also a bit out of sync
  • eslint change motivation: easier for us to use hooks properly going forward

How Has This Been Tested?

  • locally:
Screen.Recording.2024-08-15.at.10.mp4

What process can a PR reviewer use to test or verify this change?

Breaking Changes

  • None
  • Requires data directory on base node to be deleted
  • Requires hard fork
  • Other - Please specify

SEMI-BREAKING CHANGE: Description what the user should do, e.g. delete a database, resync the chain

  • just npm ci really, but wanted to make a note !

@shanimal08 shanimal08 changed the title [wip] mining btn loading ui fix(UI): refactor mining button states & fix up loading x animation sync Aug 15, 2024
@shanimal08 shanimal08 marked this pull request as ready for review August 15, 2024 08:16
@stringhandler stringhandler merged commit e489045 into tari-project:main Aug 15, 2024
5 of 10 checks passed
@shanimal08 shanimal08 deleted the shanimal/mining-ui branch August 15, 2024 09:11
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