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

🪄 [QA] Update stage environments #701

Merged
merged 35 commits into from
Nov 16, 2023
Merged

🪄 [QA] Update stage environments #701

merged 35 commits into from
Nov 16, 2023

Conversation

github-actions[bot]
Copy link

This is a pull request that upon merging will update stage environments with recent main changes.
The environments that will be updated:

Read more: Deployment to Production Flow

Karolina Kosiorowska and others added 30 commits November 2, 2023 10:29
Make input component handle value changes with bigints not strings.
Adjust components using the `TokenAmountInput` to new format.
`bigIntToDisplayUserAmount` should be able to display nice label for values
smaller than desired precision, let's make it to show the smallest
possible number like: `<0.01` for desired precision `2` etc.
Allow using "Max" button and don't allow the input to
override the real value with stringified value with less precision.
Added "step=any" to hide the tooltip on the "number" input
Closes #607

#### What else should be done
- [x] Setting the correct animation for bubbles.
- [x] If possible, add animations for `RealmsBar`. `RealmBarIcon` should
move more smoothly when the population is changed.
- [ ] After joining the realm, show a bubble instantly.
- [ ] Improve intervals for realms.
- [x] Adding bubble to the modal window.


### What

The app should be more lively. This PR adds +1 bubble over a realm every
time somebody joins. The bubble should be visible over the realm on the
map but also in the modal window. The population is fetched from the
contracts every minute. We shouldn't show 20 bubbles at the same time
and then not show anything for 1 minute. We should spread out the number
of bubbles we show.

- So let's add a variable `displayedPopulation` to increment it and show
the bubbles with the correct interval.
- Intervals should be different for the realms to make the app more
lively.
- When we init game data, we should refresh the `displayedPopulation`
and align it with the true number.

### Testing

Let's use a patch file to increase the population and do tests. Use the
following file:

[increase-population.patch](https://github.com/tahowallet/dapp/files/13249010/increase-population.patch)
The population is increased randomly every minute.

```
git apply increase-population.patch
```

- [ ] When a user joins the region, a bubble should show up immediately
in the modal.
- [ ] Bubbles should occur at different intervals between realms.
- [ ] After refreshing the page, the population should show the correct
number.
Copy link

netlify bot commented Nov 16, 2023

Deploy Preview for taho-development ready!

Name Link
🔨 Latest commit c42630a
🔍 Latest deploy log https://app.netlify.com/sites/taho-development/deploys/65562eb7b2bfe200083cd471
😎 Deploy Preview https://deploy-preview-701--taho-development.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

xpaczka and others added 3 commits November 16, 2023 14:55
Resolves #694

### Problem

We have been using floating point numbers to transform bigints to
strings with 18 decimal places. But it was easy to mess up the precision
because bigints were larger than max safe int. We need a way to be able
to work in the inputs with both very large and very small numbers.

### What has been done
Make input component handle value changes with bigints not strings.
Adjust components using the `TokenAmountInput` to new format.

- show nicely small balances (`<0,0001 TAHO`) -
`bigIntToDisplayUserAmount` should be able to display nice label for
values smaller than desired precision, let's make it to show the
smallest possible number like: `<0.01` for desired precision `2` etc.
- Allow using "Max" button and don't allow the input to override the
real value with stringified value with less precision.
- Add util to display bigints as strings with max precision


![image](https://github.com/tahowallet/dapp/assets/20949277/d9dc904b-e726-4914-b6af-c0a23eef5f31)


### Testing

To test it please use stake and unstake forms. Type some value or click
"max" and try to unstake/stake - check the value that is displayed on
the wallet token allowance screen (make sure you don't have any
allowance set on the TAHO or veTAHO on that account so you'll be able to
test it that way)

- [x] test it with super small amounts (up to 18 decimal places)
- [x] test it with big amounts (for example >=3301 TAHO)
- [x] test it with big amounts with some values on decimal places
(`3000.0000000001`)
Copy link
Contributor

@andreachapman andreachapman left a comment

Choose a reason for hiding this comment

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

Approved for stage

@andreachapman andreachapman merged commit af17434 into stage-live Nov 16, 2023
7 checks passed
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.

3 participants