-
-
Notifications
You must be signed in to change notification settings - Fork 62
ADFA-5487: Make the editor's memory chart a carousel of metric displays #1784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
davidschachterADFA
wants to merge
10
commits into
stage
Choose a base branch
from
feature/ADFA-5487-metrics-carousel
base: stage
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
34bd629
style: spotless reformat, no functional change
davidschachterADFA 20b0c46
fix: stop SwipeRevealLayout's right drag helper capturing every child
davidschachterADFA 9cd2750
refactor: extract MemoryUsageChartRenderer, render from watcher history
davidschachterADFA fc4bc26
feat: make the editor's memory chart a carousel of metric displays
davidschachterADFA f4f678a
feat: let the metrics carousel own horizontal swipes in its own strip
davidschachterADFA ddee12e
feat: replace the carousel's dot indicator with a page title
davidschachterADFA 33d3b4a
Merge branch 'stage' into feature/ADFA-5487-metrics-carousel
davidschachterADFA 5d00a79
fix(metrics): correctness findings from review on the carousel (ADFA-…
davidschachterADFA 092b633
refactor: delete SwipeRevealLayout's two dead horizontal drag helpers
davidschachterADFA 68d7529
ADFA-5487: drop the emptied init block, and put the KDoc back on its …
davidschachterADFA File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidschachterADFA MEDIUM —
translationYhere is not equivalent to thetopMarginit replaced.The comment above says "The visual result is identical for a pure vertical offset", but the two views are constrained differently:
chartwas0dphigh withbottom_toBottomOf="parent", so a top margin shrank it from the top and its bottom edge stayed put;0dpwithbottom_toTopOf="@id/metrics_title", so a translation moves the whole view down.With the reveal open (
progress == 1), the bottominsetsToppx — status-bar height, ~40dp on a Pixel 6 Pro — slides under themetrics_titleTextView, which is drawn after the pager and so paints over it, and past the fixed-heightMetricsCarouselLayout, whereclipChildrencuts it off. Concretely: open the memory panel and the chart's x-axis labels sit behind the page title or are clipped away.If the per-frame
requestLayoutis the concern, offsetting with padding, or reapplying the margin only at drag end, gets the cheap drag without changing the resting geometry.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed, and the geometry argument is exactly right: the pager is
top_toTopOf="parent"/bottom_toTopOf="@id/metrics_title", so its bottom edge is the title's top edge, and any positivetranslationYputs that much of the chart — the x-axis band — under a TextView declared after it and therefore drawn over it. "The visual result is identical for a pure vertical offset" is only true for a view whose bottom is free, which the oldchartwas and the pager is not. My comment asserted equivalence it had not earned.One thing to know before you spend more time on it: this is already reverted one PR up.
567667773on ADFA-5486 (#1785) puts the margin back —— which is the second of the two remedies you suggested. So the top of the stack is correct and only this PR's own diff carries the
translationY.That leaves a merge-order dependency I should state plainly rather than leave implicit: if #1784 lands on
stagebefore #1785,stagecarries this for that window. Say the word and I'll drop thetranslationYchange from this PR instead, so it is sound on its own — it costs a rebase of the ten branches above it, which is why I am asking rather than doing.