-
Notifications
You must be signed in to change notification settings - Fork 5
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
Refactor works mobile filter #326
Conversation
…folder. Modified labels retrieval for checkboxes. Rewritten copyright filter in author browse page using checkbox_group partial. Added filter/languages partial for languages filter
08bddd4
to
0ad5884
Compare
e660f6b
to
a930694
Compare
…ilter and moved this partial to shared/filters folder.
a930694
to
f9066f1
Compare
.by-card-v02.text-sorting#sort_filter_panel{style: 'display:show'} | ||
= render partial: 'browse_filters' | ||
.col-12.col-lg-8 | ||
.by-card-v02.text-sorting#sort_filter_panel{ style: 'display:none' } |
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.
shouldn't this be conditional upon filters.empty? too?
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, @abartov a good catch!
But we cannot decide if element should be shown or not on server side, as we need to know if this is a mobile view or desktop.
So I've added JS code to handle this.
Also added couple of other adjustements:
- browse_intro snippet should not be shown on mobile at all (to copy old behaviour)
- added scrolling to the top of the list when mobile filter is applied.
And modified authors browse page accordingly.
…thors and mobile pages: they should not be shown on mobile at all. Added scrolling to the top of the list when mobile filter is applied.
Refactored works/browse page to use same html form for desktop and mobile views.
Refactored several partials to share more code between authors and works browse pages.