Repository navigation
Fix label gaps in LineChart and BarChart components - #81833
Conversation
|
@eVoloshchak Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@DylanDylann Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@shawnborton let me know if the current gaps between the labels and the plot area look good |
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Good for product as long as @Expensify/design is cool with this
|
DesignBoyz™️, do you want to maybe slip in the reduction to an 8px dot pointer here on |
|
@trjExpensify that works for me - @mateuuszzzzz we had discussed making the dots on the line a bit smaller, 8px as Tom says. As for the gaps, it still doesn't feel even between left side and bottom side: What is the gap value of the left vs the bottom? Ideally they are the same, and ideally they are both either 12px or both 16px? |
|
I did some digging and found a place in custom X axis label where it diverged. Now hopefully it is fixed. Setting this to I also found one interesting implementation detail. Fonts define 3 values: ascent, descent and fontSize. Ascent is the distance from the text baseline up to the top of the tallest characters (like "M", "d"), descent is the distance from the baseline down to the bottom of characters with tails (like "g", "p"), and fontSize ≈ ascent + descent. Our custom X label axis ( |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
Wow, good find! 12px sounds good to me though, do you have a quick screenshot I can review? |
|
Cool, let's see what @Expensify/design thinks - I think that looks good. |
|
Looks good to me too 👍 |
Reviewer Checklist
Screenshots/Videos |
eVoloshchak
left a comment
There was a problem hiding this comment.
LGTM!
@mateuuszzzzz, could you include these test steps, please?
- Have a workspace with some expenses
- Go to Reports
- Enter
Type: expense view: barinto the search bar- Verify that X-axis labels have 8px spacing
- Verify that Y-axis labels have 8px spacing
- Enter
Type: expense view: lineinto the search bar- Verify that X-axis labels have 8px spacing
- Verify that Y-axis labels have 8px spacing
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #81834 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
Good point! Done @eVoloshchak |
|
🚧 @arosiclair has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/arosiclair in version: 9.3.18-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.18-8 🚀
|













Explanation of Change
This is a follow up PR that fixes spacing between labels and plot axes in both
LineChartandBarChartFixed Issues
$ #81834
PROPOSAL:
Tests
BarChart:
LineChart:
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari