Repository navigation
fix(mobile): stop a covered file preview from painting through the one above it - #828
Merged
Merged
Conversation
…e above it Opening a document linked from a previewed document stacks a second layer over the first, and the covered layer stays mounted on purpose so that going back returns to the same place. The layers were absolutely positioned with no background and a document's text is transparent, so the two documents drew over each other: both headers in the same row, and the covered document's lines showing through between the top document's. Paint every layer with the surface color, which is what makes later siblings painting on top actually hide what is below them. The test fails without the style (backgroundColor undefined) and passes with it.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A document linked from a previewed document opens as a second layer over the first, and the covered layer stays mounted on purpose so that going back returns to the same place. Those layers were absolutely positioned with no background, while a document's text is transparent — so the two documents drew over each other: both headers in one row and the covered document's lines showing through between the top document's.
Paint every layer with the surface color, which is what makes "later siblings paint on top" actually hide what is below:
previewLayergainsbackgroundColor: colors.surface(same colorpreviewSafealready paints).preview stacksuite asserts both layers are opaque; it fails without the style (backgroundColorisundefined) and passes with it.Checks: mobile
tsc --noEmit,eslinton the touched files, and full mobile jest (125 suites / 1923 tests) green.