-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
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 |
categorySections.push({ | ||
// "All" section when items amount less than the threshold | ||
// "Selected" section | ||
title: '', | ||
shouldShow: false, |
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.
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
if (!title && shouldShow && !hideSectionHeaders && sectionHeaderStyle) { | |
return <View style={sectionHeaderStyle} />; | |
} |
Have you found any case this is necessary?
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.
@aimane-chnaif I see that we also do the same thing in here
App/src/libs/OptionsListUtils.js
Lines 824 to 828 in 595bf40
if (numberOfCategories === 0 && selectedOptions.length > 0) { | |
categorySections.push({ | |
// "Selected" section | |
title: '', | |
shouldShow: false, |
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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