Remote browsing filters#10986
Conversation
Move topic listing to separate component. Remove duplication of <section> and search components.
Change category selection to be cumulative.
Build Artifacts
|
|
Hi @rtibbles,
2023-07-18_19-08-33.mp42 Observed a minor issue where the selected descendant categories are not being highlighted: 1.Subcategory.selection.mp4
|
|
For 1) as I mentioned above:
So, this should be functioning correctly now for everything except Studio, and we can port the fix for that to Studio as well. 2 is what I was meant to be implementing here, so I'll fix that within the scope of this PR. I've self assigned 3, but we can deal with it separately. |
This was never intended behaviour, it just hadn't manifested previously because a) we didn't have multiple learning activities for individual resources, and b) category selection before this PR cleared previous category selections. I think maintaining consistent 'exclusion' filtering - so a resource needs every applied filter to appear seems like the right way to go for now. We can potentially add interactions to allow more advanced OR filtering in the future. This is how it should be functioning for local filtering and filtering on a peer running this code now, just remains for the port to Studio to have this happen universally. |
…led or highlighted.
Align styling closer to original spec.
|
OK, the bug should be fixed, and in collaboration with @jtamiace I have attempted to update the category modal interface closer to the original spec - removing sub category indentation and using bolding instead: |
| import NotificationsRoot from 'kolibri.coreVue.components.NotificationsRoot'; | ||
| import { PageNames } from '../constants'; | ||
| import plugin_data from 'plugin_data'; | ||
| import { PageNames } from '../constants'; |
There was a problem hiding this comment.
is this just from linting?
There was a problem hiding this comment.
Yes, for reasons I couldn't discern, linting changed its mind while I was making this PR and decided to move things around.
pcenov
left a comment
There was a problem hiding this comment.
Implemented as specified and looks great! No new issues observed.
radinamatic
left a comment
There was a problem hiding this comment.
Filtering now looks much better, good to go! 🎉 💯 ![]()
marcellamaki
left a comment
There was a problem hiding this comment.
I think this is good to merge! I added one comment re: button styling but it's for the designers. Thanks for all the cleanup here.
|
|
||
| <section | ||
| <component | ||
| :is="windowIsLarge ? 'section' : 'SidePanelModal'" |
There was a problem hiding this comment.
I like this. It is probably something we (or at least I )can make use of more often
There was a problem hiding this comment.
Yeah, the alternative pattern that was being used was for the main body of the component to be in a child component and then use a v-if on the different potential parent components.
This method is a little more concise, but does mean that for the section tag it has a bunch of random meaningless attributes that should only be passed to the SidePanelModal component.
| borderStyle: 'solid', | ||
| borderRadius: '4px', | ||
| }; | ||
| const appearanceOverrides = { |
There was a problem hiding this comment.
This is a more general thought, but there are quite a few places in the hybrid learning work where we are doing a pretty "unique" variation on our KButton that requires a lot of overrides. Might be worth considering if we want a core button style in the KButton upgrades to cover this when we do the updates for that component, or if we want to just continue this way as needed and essenitally swap the colors @jtamiace @tomiwaoLE
There was a problem hiding this comment.
I think it might be worth revisiting the API of KButton at a minimum to see if there's a more natural way to apply this kind of styling.
| // navigates the main page to the search view | ||
| if (this.topic) { | ||
| const query = { ...this.$route.query }; | ||
| delete query.dropdown; |
There was a problem hiding this comment.
I have no recollection as to why I even added this in the first place!
There was a problem hiding this comment.
It was because we used to have a query parameter that determined whether the side panel state was toggled open, I think? Then we refactored it to rely on component JS state, but this was never cleaned up.
marcellamaki
left a comment
There was a problem hiding this comment.
I think this is good to merge! I added one comment re: button styling but it's for the designers. Thanks for all the cleanup here.

Summary
sectiontagfixedposition div, which seems to have been the reason it was previously embedded outside of the SidePanelModal component.References
Fixes #10975


Fixes #10976
Implements this design:
Reviewer guidance
Removing the aria-label now means that the SidePanelModal doesn't have an aria-label in other places where it is used, but as the previous label was incorrect, this doesn't seem like a regression. We should open a follow up issue for this.
I am very sure that none of the code moves I did moved any strings around, but a double check would never hurt.
I may not have implemented the above design precisely to spec, as the highlight is the same width as the text, not the overall block - so that may need an update? Could also be filed as a follow up issue.
For manual testing, this needs to be tested for searching and filtering on the Library page (both local and remote for peers) and within channels (both for local and remote peers).
I am very sure that the bug that is the root cause of the OR behaviour noted in #10975 is present in Studio, even if it is not manifesting (probably because of differences in Library content).
Testing checklist
PR process
Reviewer checklist
yarnandpip)