-
-
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
fix: sort the exported list (fix new line issue) #9
Conversation
@yuanLeeMidori Thank you, can you resolve the conflicts between this PR and the updated branch master with your previous PR? |
Just reloved the conflicts. They should be good to merge. Let me know if there's anything I can do, thank you! |
@yuanLeeMidori Thanks, it's almost perfect, I'm just wondering about the letters with accent. Can you improve the .sort() function to put for example, the A and À together before the next letter (B)? This is the the current state:
And it would be great if we got the following result:
Or
What do you think about it? |
@yuanLeeMidori I believe this .sort(Intl.Collator().compare) resolves my previous point. Can you try it and update the sorts in the code with it please? |
Sorry I was sleeping. I've updated all |
@yuanLeeMidori Thanks. For some reason, the last items in the list are copied on the same line, like this
where the result should be
Can you check it please? |
@yuanLeeMidori my previous point can be fixed by doing this: .then(data => {
if (data.ratingItems.length > 0) {
data.ratingItems.map(data =>
rate[thumb](data)
? list += '\n' + data.title + '\n'
: ''
)
currentPageNumber++
list = [...new Set(list.split('\n').filter(Boolean))].sort(Intl.Collator().compare).join('\n')
return thumbsListCreator(thumb, list, currentPageNumber)
}
return list
}) The "Set" is to remove duplicated names. Try it and update the code please, also it would be great to make the code more consistent if you remove the semicolons and change the double quotes to single quotes. In a near future I'll put eslint/prettier to make our life more easier about it :D |
Hi, I've updated them with the However, since I don't know the Portuguese language, it is a bit hard for me to get the Portuguese TVShow/movie names and test the functionalities. I've tried to change the language setting but couldn't get the list as you show to test. Moreover, even if there are multiple names being copied on the same line, I can't quite tell it because I can't read the language. Anyways, please let me know if there is anything I can do, thank you. |
@yuanLeeMidori No problem, thanks. But you forgot the list += '\n' + data.title + '\n' If you don't put that new line at the beginning, the result still keep that issue |
|
@yuanLeeMidori You right, the point is: to your updates works properly and resolve that issue, you have to add this new line in the beginning, otherwise it will not work. Just update list += data.title + '\n' to this list += '\n' + data.title + '\n' |
The |
@yuanLeeMidori I just typed the wrong file name, my apologies. The correct files are the thumbs-list-creator.js files |
No worries. I've tested again and updated them as you suggested. Thank you. Please let me know if there's anything I can do. |
@yuanLeeMidori Now it's perfect. Works like a charm on Chrome,Firefox and Opera. Thank you so much for your contributions. As soon as possible I'll release theses updates to the stores. |
No problem. Thank you for giving me the chance to contribute and help me improve my code. Looking forward to seeing the new version of the extension in the stores! |
Hi, since PR #6 has been closed, I create this new PR for solving issue #5 with no new line in the very beginning. Thank you again for reviewing and testing my code.