The PR fulfills these requirements: (check all the apply)
[x] It's submitted to the main branch.
[x] When resolving a specific issue, it's referenced in the PR's title (e.g. feat: Add a button #xxx, where "xxx" is the issue number).
[x] When resolving a specific issue, the PR description includes Closes #xxx, where "xxx" is the issue number.
[x] If changes were made to ui folder, unit tests (make test) still pass.
[x] New/updated tests are included
As explained in the issue, the table progress cell currently rounds values to whole numbers when diplaying them as a percentage. With this change, the percentage will now render with up to 2 decimal places. This is accomplished by using toFixed(2) and parseFloat() together to ensure data is rounded properly and then trailing zeros are removed. The code change in ui/src/progress_table_cell_type.tsx looks like this:
Here is a partial screen shot of the Table example where you can see the progress data now being displayed with up to 2 decimal places:
There is a new test case in progress_table_cell_type.test.tsx. The test rerenders the XProgressTableCellType component in a loop to make sure that the component is rendering the following input decimal values correctly:
Closes #824
The PR fulfills these requirements: (check all the apply)
main
branch.feat: Add a button #xxx
, where "xxx" is the issue number).Closes #xxx
, where "xxx" is the issue number.ui
folder, unit tests (make test
) still pass.As explained in the issue, the table progress cell currently rounds values to whole numbers when diplaying them as a percentage. With this change, the percentage will now render with up to 2 decimal places. This is accomplished by using toFixed(2) and parseFloat() together to ensure data is rounded properly and then trailing zeros are removed. The code change in
ui/src/progress_table_cell_type.tsx
looks like this:Here is a partial screen shot of the Table example where you can see the progress data now being displayed with up to 2 decimal places:
There is a new test case in
progress_table_cell_type.test.tsx
. The test rerenders theXProgressTableCellType
component in a loop to make sure that the component is rendering the following input decimal values correctly:I ran all the ui tests and confirmed they passed. Here is a screen shot for that: