Repository navigation
[Payment due @situchan] Remove victory-native tickCount patch - #104659
Conversation
|
|
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.
|
|
@MelvinBot Please review. I think I'm missing some logic in computing the axisSize can you spot that one out |
|
The x-axis formula has the const maxLines = Math.max(...labels.map((label) => String(label).split(/\r\n|\r|\n/).length));
return maxLines * font.getSize() + 2 * (labelOffset ?? 0);
Two padding bugs outside
Other notes
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@Beamanator 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] |
Left padding now shrinks on vertical charts too
Expected: Same as main. The plot starts 96px from the left edge, as the backend set it Suggested Fix: only shrink the left padding for the horizontal chart's category axis, as |
|
Confirmed. The left clamp should run only for horizontal charts. At resolvePadding.ts:32-34, With the
Suggested fix: pass if (isHorizontal && leftAxisSize && resolvedPadding.left) {
resolvedPadding.left = Math.min(resolvedPadding.left, leftAxisSize + LEFT_AXIS_LABEL_PADDING);
}You don't need a separate flag. In a horizontal chart, the dependent axis always goes to the top or bottom, so the only left axis is the category axis from the I can't push this change because I'm not an assignee on this PR. |
|
@codex review |
|
The latest changes fix the earlier blockers. One small inconsistency is left. Remaining issue: dynamic height adds axis sizes that the padding never subtracted. The parser now stores This affects a horizontal chart whose dependent axis has Suggested fix: pass only the sizes that Nits
|
|
I found one new regression: vertical charts with text categories lose all x-axis labels. This happens when the independent axis has no
Victory web also shows every category in this case. No current fixture uses this shape, and I couldn't confirm whether Concierge sends it. I traced this in code but couldn't render it here. Suggested fix: after the series data is merged in Other differences from main
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d3b4793bec
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@situchan Please give this another review / test |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 roryabraham 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.24-1 🚀
|
|
No help site update needed. This PR removes a |
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.5.24-8 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Payment issue created: #105312 |
Explanation of Change
Removed the
tickCountpatch. When tickCount is > 0 then the drawn labels consume same allocated window size that the chart would be displayed in, this makes the chart looks smaller. I'm not sure if that's the intended behavior but that was the case even before the 42.0.1 upgrade, back then we just used to pass tickCount=0 so this logic was not hit.I found this prop
leftAxisLabelPaddingthat we are using and it follows similar pattern (altering padding) so I guess we can move forward with that solution. Just worth noting that if that "shared allocation" is bug upstream then we can easily just remove that padding altering logic.The logic is pretty straightforward:
Fixed Issues
#91883
PROPOSAL:
Tests
(Not for QA)
Follow the QA tests then test follow both tests in #90253 and #91659
Offline tests
n/a
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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.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