-
Notifications
You must be signed in to change notification settings - Fork 73
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
[DONE] Feature : Add sort videos and improve filters #811
[DONE] Feature : Add sort videos and improve filters #811
Conversation
pampletousse
commented
Apr 17, 2023
•
edited
Loading
edited
- Add sort for /videos/ and /videos/my/ on date_added, title and duration + asc or desc
- Manage refresh with filters, sort, categories and nextpage
- Add lightweight, reusable and pure css loader
- Add reset btn to filters aside
- Light rework of categories style
- Mutualized code (sort, filters) for 2 screens
- Vanilla js code
Tu as des erreurs d'accessibilité à corriger :
|
Un dernier commentaire sur le commit [86dc3c1] : Lorsque qu'on applique des filtres à la liste des videos, puis change de page, puis revient sur la liste en utilisant le bouton "Précédant" du navigateur, seule la liste des vidéos était visible sans le template. En gros la réponse json sur fond blanc, sans style et sans l'interface complète de Pod. Un paramètre relatif au cache dans la fonction fetch (asynchrone javascript) permet d'éviter cela. |
e43e6c8
to
4b78d06
Compare
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.
@AymericJak et moi avons tester en local. Tout fonctionne correctement.
Il serait intéressant d'effacer le contenu du champ Rechercher dans le filtre par utilisateur lorsque l'on appuie sur le bouton Reset.
Selon nous, il reste quelques petits changement à faire :
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.
Cette fois tout est bon pour moi.
Un grand Merci @pampletousse pour cette belle PR qui sera à n'en pas douter très utile !
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.
@AymericJak et moi validons cette PR. Tout fonctionne bien en local de notre côté.
@AymericJak @SebastienCozeDev Je viens d'ajouter le comportement que vous vouliez : un reset des champs de recherche par user au click du bouton |
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 pour moi
* Add sort managment for video list in video backend and refactor functions * Add sort form html file and inject it on videos.html screen * Add sorting direction gesture, externalize url creation for refresh, externalize getNextPage, change next_page to var nextPage, change listeners * Fix boolean nextPage, fix count refresh not working, fix outerHTML -> innerHTML inject method, delete some unused code => (filter and sort async working on /videos/) * Add (global and reusable) pure css loader to improve ux on refresh on base.html template, add and change comments in javascript file * Ajust columns to sort form fitted with Title and stats * Add sort and filter management for video list in video/my/ backend with same logic as /videos/ and mutualized functions * Make filter_aside template reusable by /videos/ and /video/my/ and import category management if needed, delete old loader * Add sort template to video/my screen * Add count vidéos h2 on my videos template * Make columns for sort input and count videos in my_videos template * Fix no video case for video/my screen and create function to enable/disable inputs on loading, clean unused function js * Fix categories : prevent buttons to reload page, clean print * Fix categories : add category to parameter url, call refresh after select category, clean video_category javascript file * Add comments on filter aside video list refresh javascript file * Add reset Filters Btn and rename vars, clean code * Invert alert info and row -> weird placement on page load * Fix auto-check inputs on my_videos screen with get parameters * Simplify code for user search and start to mutualize function shared with user search in menu aside + delete print in views * Add listener on new created inputs for user search + clean many "this" on code * Simplified and factorized code for user search (menu aside + filter aside) => same ajax call, same function, different html elements creation * Add timeout to fix 'database table is locked' on test job * Test with larger timeout * Add labels for inputs, prepare string to translation * Update traductions for sort form * Change span to label for accessibility + update translations files * Use mutualized lds-ring * Fix/simplify loader css to be reusable and accessible in main/base.html template * Delete unecessary change of block page_content in base.html = loader is now accessible via include tag * Add some translation, Repair translation files excluding custom/* * Fix return (previous page) for only giving json response without global template * Change accordion id to pod_users_list * Add pydocs for new functions in video.views file * Fix accessibility problem on label "sort_direction" * Change selector for searchCatInput querySelector -> getElementById * Add debug class on content in {% comment %} blocks * Fix loader selector on video_category javascript file * Change aria-labbelledby for category modal, improve accessibility * Add function to change title of sort_direction input : improve accessibility * Add label to loader : improve accessibility * Fix aria labelledby for manageCategoryModal * Fix redondant code for nextPage affectation * Update translations in django.po files * Update compiled file for translation django.mo * Add pydoc on get_Videos_list() * Change translated title from sort_direction to sort_direction_label * Fix translations for sort * Add translation for 'Reset' * Update compiled messages file .mo * Change var nextPage (lost commit) * Change columns size (cf Olivier Bado / badatos's comment) for /videos/ screen * Add missing translation for Descending sort * Add reset of user filter fields --------- Co-authored-by: pampletousse <sylvain.loppin@grenet.fr>