fix: remove ViewStyle contamination from MenuItem subtitle Text#91582
Draft
MelvinBot wants to merge 1 commit into
Draft
fix: remove ViewStyle contamination from MenuItem subtitle Text#91582MelvinBot wants to merge 1 commit into
MelvinBot wants to merge 1 commit into
Conversation
The subtitle Text in MenuItem was receiving combinedStyle which includes styles.popoverMenuItem (flexDirection, paddingHorizontal: 20, paddingVertical: 12, justifyContent, width: 100%). These ViewStyle properties on a Text element cause Android-specific layout shifts when the subtitle content changes width (e.g., member count going from single to double digits). Co-authored-by: Issa Nimaga <inimaga@users.noreply.github.com>
7 tasks
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.
Explanation of Change
The subtitle
Textelement inMenuItemwas receivingcombinedStylewhich includesstyles.popoverMenuItem— a style containing ViewStyle properties (flexDirection: 'row',paddingHorizontal: 20,paddingVertical: 12,justifyContent: 'space-between',width: '100%'). These properties should never be applied to aTextelement. On Android, they cause layout shifts when the subtitle content changes width (e.g., the Members row member count going from single digit to double digit at 10+ members).This PR removes
combinedStylefrom the subtitleTextstyle.combinedStyleis already correctly applied to the outerPressablecontainer, andtextLabelSupportingprovides the appropriate text styling (font family, size, color).PR #88920 previously moved
subtitleStylefrom the Text to a parent View, but left thecombinedStylecontamination on the Text element, which is why the bug persisted.Fixed Issues
$ #89098
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.
Offline tests
N/A — this is a style-only change with no network dependency.
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do they need to test for regressions.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)Avataris modified, I verified thatAvataris working as expected in all cases)AI Tests
npm run typechecknpm run lint-changednpm test -- MenuItemnpm run react-compiler-compliance-check check-changedorigin/mainref)Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari