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

feat(@desktop/communities) Permissions, 'who holds' section - handling localiezed amounts #7392

Merged
merged 1 commit into from
Sep 19, 2022

Conversation

micieslak
Copy link
Member

What does the PR do

Allows taking from the user and displaying token/collectible amounts using user's locale. Amounts are presented with the same number of significant digits after decimal point as the number provided by the user.

Input component is used instead of StatusInput because the latter one doesn't support qml's buit-in validators.

Closes #7162

Affected areas

CommunityNewPermissionView

Screenshot of functionality (including design for comparison)

  • I've checked the design and this PR matches it
Screencast.2022-09-15.13.15.02.mp4

Copy link
Member

@caybro caybro left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of this! It will conflict a bit with #7258 but I will happily integrate it :)

Some minor remarks inline

ui/imports/shared/controls/AmountInput.qml Show resolved Hide resolved
ui/imports/utils/LocaleUtils.qml Show resolved Hide resolved
ui/imports/shared/controls/AmountInput.qml Outdated Show resolved Hide resolved
@status-im-auto
Copy link
Member

status-im-auto commented Sep 16, 2022

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
⁉️ 11c9f7f #2 2022-09-16 16:10:04 ~4 min linux-cpp 📄log
✔️ 11c9f7f #2 2022-09-16 16:18:15 ~12 min macos 📦dmg
✔️ 11c9f7f #2 2022-09-16 16:19:08 ~13 min linux 📦tgz
✔️ 11c9f7f #2 2022-09-16 16:33:19 ~27 min windows 📦exe

@elina2015 elina2015 requested review from elina2015 and removed request for anastasiyaig September 17, 2022 03:04
if (Number.isInteger(num))
return 0

return num.toString().split('.')[1].length
Copy link
Contributor

Choose a reason for hiding this comment

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

Just wonder if separator is always '.'

Copy link
Member Author

Choose a reason for hiding this comment

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

when using toString than yes, it's not localized

Copy link
Contributor

@faust4exe faust4exe 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 - just one small note.

@elina2015 elina2015 added tested and removed testing labels Sep 19, 2022
Copy link

@elina2015 elina2015 left a comment

Choose a reason for hiding this comment

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

Tested and approved

@micieslak micieslak merged commit 34625ad into master Sep 19, 2022
@micieslak micieslak deleted the feat/issue-7162 branch September 19, 2022 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants