Closed cwastche closed 5 days ago
The latest updates on your projects. Learn more about Vercel for Git โ๏ธ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
eternum | โ Ready (Inspect) | Visit Preview | ๐ฌ Add feedback | Jul 4, 2024 0:50am |
โฑ๏ธ Estimated effort to review: 2 ๐ต๐ตโชโชโช |
๐งช No relevant tests |
๐ No security concerns identified |
โก Key issues to review **Possible Bug:** The division of `STOREHOUSE_CAPACITY` by 1000000 in `Resources.tsx` assumes that the capacity is always in the millions, which might not be the case if the constant changes. Consider adding a utility function to format the number based on its actual value. |
Category | Suggestion | Score |
Accessibility |
Improve the
___
**Consider using a more descriptive | 9 |
Readability |
Improve readability by breaking a long sentence into shorter ones___ **Break the long text inside the paragraph into multiple shorter sentences or separateparagraphs for better readability and user experience.** [client/src/ui/components/hints/Combat.tsx [62-63]](https://github.com/BibliothecaDAO/eternum/pull/1073/files#diff-7b23abb989c0a5df3246c7c9c4a5efde28f897e7fd9355f7cbc409f263033a40R62-R63) ```diff -Battles erupt when armies clash, with duration dependent on troop numbers. These engagements are open to all, involving both offensive forces and defenders of structures. +Battles erupt when armies clash, with duration dependent on troop numbers. These engagements are open to all. They involve both offensive forces and defenders of structures. ``` Suggestion importance[1-10]: 8Why: The suggestion enhances readability by breaking a long sentence into shorter, more digestible sentences, which improves user experience. | 8 |
Enhancement |
Use formatted strings for displaying large numbers___ **Consider using a formatted string to handle large numbers more gracefully and ensureconsistency across different locales.** [client/src/ui/components/hints/Resources.tsx [36]](https://github.com/BibliothecaDAO/eternum/pull/1073/files#diff-d19afd508f5ca24a4c6b7aa3350cf9d813e38ea9f6dcf8a76d2fda9e3ae08d8dR36-R36) ```diff - {STOREHOUSE_CAPACITY / 1000000}M capacity per resource type + {new Intl.NumberFormat().format(STOREHOUSE_CAPACITY / 1000000)}M capacity per resource type ``` Suggestion importance[1-10]: 7Why: The suggestion improves the display of large numbers by using a formatted string, which ensures consistency and readability across different locales. | 7 |
PR Type
Enhancement, Formatting
Description
Combat.tsx
andResources.tsx
for better readability by breaking long lines into shorter ones.STOREHOUSE_CAPACITY
from SDK inResources.tsx
.Resources.tsx
to useSTOREHOUSE_CAPACITY
constant.Changes walkthrough ๐
Combat.tsx
Reformat text for better readability in Combat hints
client/src/ui/components/hints/Combat.tsx
shorter ones.
Resources.tsx
Fetch and display storehouse capacity from SDK
client/src/ui/components/hints/Resources.tsx
STOREHOUSE_CAPACITY
from SDK.STOREHOUSE_CAPACITY
constant.
shorter ones.