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

(bug) sort playlist not working as expected #411

Closed
compiuta opened this issue Nov 28, 2020 · 9 comments · Fixed by #415
Closed

(bug) sort playlist not working as expected #411

compiuta opened this issue Nov 28, 2020 · 9 comments · Fixed by #415
Assignees
Labels
Projects

Comments

@compiuta
Copy link
Contributor

compiuta commented Nov 28, 2020

I noticed that the sort by date option for playlists does not work as expected while a user has more than 10 playlists.

@adrienjoly I have the solution but there seems to be an issue with the dev environment right now.

Screenshot from 2020-11-28 14-07-57

After pulling all new updates from the master repository I am now getting errors and I am not able to connect to the localhost server. I also tried cloning a new copy of the master repository and I still get this error

Let me know if you are also having issues

@adrienjoly
Copy link
Member

adrienjoly commented Nov 29, 2020 via email

@adrienjoly
Copy link
Member

Otherwise, this could be caused by a caching issue coming from Docker, making it skip the "npm install" step. (As DD-trace is from the Datadog module we added recently)

Can you make sure that you use the --build flag when you start the server with ˋdocker-composeˋ. And, if it still doesn't work, prune your old docker images and retry.

@adrienjoly adrienjoly added the bug label Nov 29, 2020
@adrienjoly adrienjoly added this to 📥 Inbox / ideas in Development via automation Nov 29, 2020
@adrienjoly adrienjoly moved this from 📥 Inbox / ideas to ⚙ In progress in Development Nov 29, 2020
@compiuta
Copy link
Contributor Author

Alright I got it working 🎉

I did the following:

1 - Install node v12.19.1 listed in the .nvmrc file
2 - Ran docker system prune listed here https://docs.docker.com/engine/reference/commandline/system_prune/
3 - I started the server using the build flag docker-compose up --build

I will work on the solution for this and do a pull request later today.

@adrienjoly
Copy link
Member

Awesome, thank you for sharing how you proceeded, Compiuta! 🤘

@adrienjoly
Copy link
Member

For reference, here's what my playlists page looks like today:

image

I don't know if this is related to the fix you want to make, but as you can see, there are some holes (or blanks) in the list.

@compiuta
Copy link
Contributor Author

@adrienjoly Is this happening after you use the sort functionality?

I am not seeing the broken layout

@adrienjoly
Copy link
Member

adrienjoly commented Nov 29, 2020

Nope, without using the sort functionality.

I'm getting this issue on Brave and Firefox.

EDIT: Actually, as soon as I pick a sort, the blanks disappear! 😯

@compiuta
Copy link
Contributor Author

I tested in firefox and chrome but I still do not get the broken layout.

Do you also get this bug while browsing other users playlists or when you are logged out ?

Development automation moved this from ⚙ In progress to ✔️ Done / pending QA Nov 30, 2020
adrienjoly pushed a commit that referenced this issue Nov 30, 2020
Closes #411

## What does this PR do / solve?

Currently the sort playlist feature is using the index and paylistname data attributes to sort by date and alphabet. The issue is that I did not realize that the array sort function takes into consideration lower and upper case when sorting.

Also the index is being sorted as a string rather than a number which causes the playlist to be in the incorrect order when sorting by date.

## Overview of changes

The sort function will now lower case all playlist titles and convert index strings into numbers before sorting to prevent these bugs.
adrienjoly pushed a commit that referenced this issue Nov 30, 2020
## [1.44.2](v1.44.1...v1.44.2) (2020-11-30)

### Bug Fixes

* **ui:** Sort playlist feature bug ([#415](#415)) ([aec724d](aec724d)), closes [#411](#411)
@adrienjoly adrienjoly moved this from ✔️ Done / pending QA to 🌲 In production in Development Nov 30, 2020
@adrienjoly
Copy link
Member

@compiuta your PR #415 is now running in production!

thanks again for your contribution! 🤘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development
  
🌲 In production
Development

Successfully merging a pull request may close this issue.

2 participants