Skip to content
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] Improve sort & menu order #1003

Merged

Conversation

AymericJak
Copy link
Contributor

@AymericJak AymericJak commented Nov 3, 2023

Tri des vidéos & amélioration du menu

Issue concernée : #950

  • Maintenant la casse des titres pour le tri des vidéos / playlists n'est plus prise en compte.
  • Changement de l'ordre des boutons dans le menu de gauche
  • Amélioration + ajout de tests unitaires des listes de lecture

@AymericJak AymericJak added the enhancement New feature or request label Nov 3, 2023
@AymericJak AymericJak self-assigned this Nov 3, 2023
@AymericJak AymericJak changed the title [WIP] Improve sort [WIP] Improve sort & menu order Nov 3, 2023
@AymericJak AymericJak marked this pull request as ready for review November 6, 2023 13:26
@Badatos Badatos self-requested a review November 6, 2023 13:27
@AymericJak AymericJak changed the title [WIP] Improve sort & menu order [DONE] Improve sort & menu order Nov 6, 2023
Copy link
Contributor

@SebastienCozeDev SebastienCozeDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, j'ai juste regardé le code

Copy link
Contributor

@ptitloup ptitloup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok pour moi niveau code

@Badatos Badatos linked an issue Nov 6, 2023 that may be closed by this pull request
Copy link
Collaborator

@Badatos Badatos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok pour moi. Juste une question pour mieux comprendre un changement ;)

@@ -201,7 +202,7 @@ def sort_videos_list(videos_list, sort_field, sort_direction=""):

Sorted by specific column name and ascending or descending direction
"""
if sort_field and sort_field in [
if sort_field and sort_field in {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pourquoi un dict plutot qu'une liste ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pour le parcours d'éléments, il est préférable d'utiliser un dictionnaire en python.

En python les dictionnaires sont implémenté avec une table de hachage.

Donc pour accéder à un élément, le temps est constant.

Pour une liste de taille n, la complexité est de O(n) --> on doit parcourir chaque éléments de celle-ci.
Alors que pour un dictionnaire, la complexité est de O(1).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merci pour l'info, c'est bon à savoir !! :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oui très bonne remarque !

@ptitloup ptitloup merged commit 9d64ae8 into EsupPortail:develop Nov 7, 2023
4 checks passed
vsabatie pushed a commit to vsabatie/Pod that referenced this pull request Nov 22, 2023
* Improve video sort

* Improve playlist sort

* Fix titles

* Reorganize menu buttons

* Fix playlist test case

* Improve playlist page tests

* Add tests for playlists and flake8
vsabatie pushed a commit to vsabatie/Pod that referenced this pull request Nov 23, 2023
* Improve video sort

* Improve playlist sort

* Fix titles

* Reorganize menu buttons

* Fix playlist test case

* Improve playlist page tests

* Add tests for playlists and flake8
vsabatie pushed a commit to vsabatie/Pod that referenced this pull request Nov 23, 2023
* Improve video sort

* Improve playlist sort

* Fix titles

* Reorganize menu buttons

* Fix playlist test case

* Improve playlist page tests

* Add tests for playlists and flake8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[IMPROVEMENT] Tri des vidéos
4 participants