Fix/29901: Selected category should be in the list #32902
Conversation
|
@aimane-chnaif 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] |
|
@DylanDylann please resolve conflict |
|
@aimane-chnaif Updated, please check again |
|
@aimane-chnaif bump, could you help to review this PR? |
|
There's small margin difference when selected category is enabled vs disabled Screen.Recording.2023-12-25.at.1.55.22.AM.mov |
|
@aimane-chnaif I updated. Please help to check again |
| // "All" section when items amount less than the threshold | ||
| // "Selected" section | ||
| title: '', | ||
| shouldShow: false, |
There was a problem hiding this comment.
ok so true > false change is fine but curious why this empty section header is needed when title is empty.
App/src/components/OptionsList/BaseOptionsList.js
Lines 236 to 238 in 595bf40
Have you found any case this is necessary?
There was a problem hiding this comment.
@aimane-chnaif I see that we also do the same thing in here
App/src/libs/OptionsListUtils.js
Lines 824 to 828 in 595bf40
so that I update shouldshow : true > false to make it consistency
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemchrome.moviOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
|
Please add missing author checklist |
|
@yuwenmemon Could you help to take a look at this PR? |
|
✋ 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/yuwenmemon in version: 1.4.22-0 🚀
|
|
🚀 Deployed to staging by https://github.com/yuwenmemon in version: 1.4.22-0 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.4.22-6 🚀
|
| if (!_.isEmpty(selectedOptions)) { | ||
| const selectedOptionNames = _.map(selectedOptions, (selectedOption) => selectedOption.name); | ||
| const filteredCategories = _.filter(enabledCategories, (category) => !_.includes(selectedOptionNames, category.name)); | ||
| const numberOfVisibleCategories = selectedOptions.length + filteredCategories.length; |
There was a problem hiding this comment.
We should have checked if the selectedOptions were enabled or not. This later caused #37766
Details
Selected category should be in the list when it is disabled and there is <8 categories
Fixed Issues
$ #29901
PROPOSAL: #29901 (comment)
Tests
Precondition: There must be less than 8 enable categories in the workspace.
Offline tests
Same above
QA Steps
Same above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so 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
Screencast.from.15-12-2023.18_05_43.webm
Android: mWeb Chrome
chr.mp4
iOS: Native
ios2.mp4
iOS: mWeb Safari
sa.mp4
MacOS: Chrome / Safari
des.mp4
MacOS: Desktop
web.mp4