Ran
|
Files
608
|
Run time
17s
|
Badge
Embed âž
README BADGES
|
push
github
feat(organizations): update usage limits modals and banners TASK-996 (#5249) ### đ Notes - The full idea behind some of the changes is to improve translation process, converting broken down texts to longer sentences with context and formatting where needed. - At first a simpler markdown parser was implemented, but after some discussion in [its PR](https://github.com/kobotoolbox/kpi/pull/5257) we've decided to use `react-markdown` instead. - We could now consider updating the places in Kobo where we're using HTML and it could be dangerous, so @magicznyleszek created a task for that refactor: [TASK-1257](https://www.notion.so/kobotoolbox/Refactor-some-dangerouslySetInnerHTML-code-to-use-react-markdown-13e7e515f65480c5a95ec9b1a7a7477c?pvs=4) đđģ ### đŖ Summary Usage limits modal and banner descriptions were changed to reflect the individual, organization or team subscription. ### đ Description Information for usage limits modal and banner was changed: - The subject changes between "you", "your organization" and "your team" depending on the user subscription - Texts were updated to fix translation problems, isolated in longer sentences (even if it makes the code look a bit redundant) - A Bug was fixed where the warning limits would be displayed repeated times. (Was already fixed for non-warning messages) - The `react-markdown` library was added to format markdown-like strings ### đ Preview steps 1. âšī¸ have an account and a project 2. have Stripe [setup](https://www.notion.so/kobotoolbox/Setting-Up-Stripe-9a958a84d6324ec8a4ca887b820eb8cf) 2. Reach the usage limit or get close to the usage limit. Easiest way is to override values in [useUsage.hook.ts](https://github.com/kobotoolbox/kpi/blob/3ede0c8fc/jsapp/js/account/usage/useUsage.hook.ts) 3. Open projects view. 4. đĸ Banner should show up informing about the usage limit. The message will vary depending on the `is_mmo` flag from the organization and on the `shouldUseTeam... (continued)
5751 of 9232 branches covered (62.29%)
21968 of 27329 relevant lines covered (80.38%)
0.8 hits per line
Coverage | â | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
---|