[No QA] Chore: keep consistent naming in SelectionList and SelectionListWithSections#82839
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
Ignore failing ESLint CI check — it warns to add sentry labels to a PressableWithFeedback components, but it doesn't make to add those in a PR that is focused on naming convention refactor mainly. |
| listEmptyContent, | ||
| showScrollIndicator = true, | ||
| showLoadingPlaceholder = false, | ||
| shouldShowLoadingPlaceholder = false, |
There was a problem hiding this comment.
I don't think changing it here makes sense, we'll be removing this file in a week
There was a problem hiding this comment.
@zfurtak I agree, but if since it's gonna be removed anyway, any changes to it doesn't matter that much. Reverting those changes'd be a waste of time as much as applying them.
| canSelectMultiple = false, | ||
| showLoadingPlaceholder = false, | ||
| shouldShowLoadingPlaceholder = false, | ||
| showListEmptyContent = true, |
There was a problem hiding this comment.
What about this props, I think we should change it as well
| showListEmptyContent = true, | |
| shouldShowListEmptyContent = true, |
There was a problem hiding this comment.
@zfurtak absolutely makes sense! Great catch!
b8a75ce to
75c66d9
Compare
| type ButtonOrCheckBoxRoles = 'button' | 'checkbox'; | ||
|
|
||
| type SelectionListHandle<TItem extends ListItem> = { | ||
| type SelectionListHandle<TItem extends ListItem = ListItem> = { |
There was a problem hiding this comment.
@zfurtak by mistake. It's in a commit that is from this PR.
I'll remove it in the original PR and rebase this one.
I originally didn't change SelectionListHandle to SelectionListWithSectionsHandle and added that default type. Later I used the correct type, but forgot about that change! Great catch! 🏅
2876842 to
07a37e5
Compare
57fbf11 to
08f3158
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 08f3158613
ℹ️ 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".
| onConfirm: inviteUser, | ||
| }} | ||
| showLoadingPlaceholder={!areOptionsInitialized || !didScreenTransitionEnd} | ||
| shouldShowLoadingPlaceholder={!areOptionsInitialized || !didScreenTransitionEnd} |
There was a problem hiding this comment.
Keep scroll-position maintenance disabled in add-admin list
This hunk removes disableMaintainingScrollPosition from SelectionListWithSections in DomainAddAdminPage, which changes runtime behavior beyond the naming refactor. In BaseSelectionList (src/components/SelectionList/BaseSelectionList.tsx), disableMaintainingScrollPosition defaults to false, so dropping the prop re-enables maintainVisibleContentPosition while this list is being filtered/paginated; that can cause the visible window to stay anchored to stale rows and makes newly loaded or filtered results harder to reach in the add-admin flow.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Good catch, changing back to using that property.
08f3158 to
17db11f
Compare
|
@dukenv0307 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] |
src/pages/Share/ShareTab.tsx
Outdated
|
|
||
| const offlineMessage: string = isOffline ? `${translate('common.youAppearToBeOffline')} ${translate('search.resultsAreLimited')}` : ''; | ||
| const showLoadingPlaceholder = !areOptionsInitialized || !didScreenTransitionEnd; | ||
| const shouldShowLoadingPlaceholder = areOptionsInitialized || !didScreenTransitionEnd; |
There was a problem hiding this comment.
❌ UI-1 (docs)
Critical logic bug introduced during rename. The negation operator ! before areOptionsInitialized was accidentally removed. The original expression was:
const showLoadingPlaceholder = !areOptionsInitialized || !didScreenTransitionEnd;But the PR changes it to:
const shouldShowLoadingPlaceholder = areOptionsInitialized || !didScreenTransitionEnd;This inverts the meaning: the loading placeholder will now show when options ARE initialized (the opposite of the intended behavior), and will almost always be true since areOptionsInitialized || !didScreenTransitionEnd covers nearly all states. This means the actual content will rarely display.
Fix: Restore the ! negation:
const shouldShowLoadingPlaceholder = !areOptionsInitialized || !didScreenTransitionEnd;Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 17db11f0ab
ℹ️ 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".
src/pages/Share/ShareTab.tsx
Outdated
|
|
||
| const offlineMessage: string = isOffline ? `${translate('common.youAppearToBeOffline')} ${translate('search.resultsAreLimited')}` : ''; | ||
| const showLoadingPlaceholder = !areOptionsInitialized || !didScreenTransitionEnd; | ||
| const shouldShowLoadingPlaceholder = areOptionsInitialized || !didScreenTransitionEnd; |
There was a problem hiding this comment.
Restore negation in ShareTab loading-placeholder condition
This assignment flips the original logic from !areOptionsInitialized to areOptionsInitialized, so once options are loaded the loading flag remains true. In ShareTab, when the filtered results are empty (for example, a query with no matches), SelectionListWithSections will keep rendering loading placeholders instead of empty/no-results content, making the state look perpetually loading. The condition should continue to gate placeholders on options not being initialized.
Useful? React with 👍 / 👎.
17db11f to
7bd2bcf
Compare
|
@dukenv0307 Fixed the issue. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-03-04.at.09.04.36.mov |
c03758b to
0dc1fee
Compare
…SectionList and SectionListWithSections
0dc1fee to
ea706b3
Compare
|
🚧 @grgia 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/grgia in version: 9.3.31-0 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.3.31-12 🚀
|
Explanation of Change
Use good variable nomenclature in new SelectionList and SelectionListWithSections components.
Per this contributing guide rule:
vars with boolean values should start with prefix 'should'. To be consistent with that rule a prop name was changed as well as var names, which values were passed.
Changes made:
showLoadingPlaceholder- >shouldShowLoadingPlaceholdershowEmptyContent- >shouldShowEmptyContentFixed Issues
$ #65658
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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