-
Notifications
You must be signed in to change notification settings - Fork 733
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
Added another condition for TOPICS_TOPIC_SEARCH redirection #12019
Conversation
Also added every condition instead of some as I think this it is easier to read.
Build Artifacts
|
Thansk @Wck-iipi, we will have a look |
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.
Hi @Wck-iipi, thank you for your contribution. While manually testing I noticed that you have only fixed the issue with the expanded filter but the issue with the expanded folders list is still extant and should be fixed as well. Once I select a folder, then I should first see the contents of the folder and then decide whether to further explore the contents of another folder:
2024-04-18_13-37-17.mp4
Signed-off-by: wck-iipi <21dcs006@nith.ac.in> Fixed linting
@pcenov I have fixed it. Please check if it is working correctly now. |
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.
Thanks a lot @Wck-iipi - confirm that the filters are functioning correctly now!
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.
params: { ...route.params, id }, | ||
query: route.query, | ||
}); | ||
if (children.every(c => c.title == '')) { |
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.
Could you explain the nested if
statements here? I understand the first part as the refactor, and I agree that it keeps the condition and makes it easier to read, so thank you. The second one, I'm hoping you could explain why you made this change. Is it to account for empty folders that you mention in the description? If so, I do think having a condition to manage this is a good idea, but I wonder if there might be something a bit easier to logic through than checking by the c.title
. Were there other solutions or ideas that you had when thinking through this?
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.
@marcellamaki It does account for the empty folder. I don't exactly remember what I was thinking when I was writing this code(it was long time ago, so I kinda have forgotten it :( ) but, I do remember that I was searching for some difference in router or props that could have made it easier to do. However, they were identical for both the nested and non-nested cases. Therefore, I only found this out so that it automatically redirects whenever all folders are empty. Sorry I wasn't much of help.
Still outstanding questions on the code review, so dismissing this until they are resolved.
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.
Thank you @Wck-iipi !
We are preparing for our upcoming 0.17 release, so we would actually like to retarget this PR to develop
so that it goes into our next release 🎉 . Would you like to do that? Otherwise, I can retarget it. Thank you! After this we will merge.
Thanks again for your contribution and apologies for the slow pace on review here.
@marcellamaki No worries! I have retargeted this to develop. Is there anything else I have to do? |
Thank you @Wck-iipi 🎉 |
Summary
User can now see content instead of search bar. Also, I changed the not some not condition logic to every condition logic(they are equivalent to each other) because it is easier to read.
References
Fixes #11842
Reviewer guidance
I have tested this with nested empty folders as well and this works on them too. However, I haven't tested them on completely empty folders with no content as I couldn't find such channel(or make one).
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)