Skip to content

Fix sorting by date - #64

Merged
magicoflolis merged 1 commit into
magicoflolis:masterfrom
stelles:master
Mar 1, 2025
Merged

Fix sorting by date#64
magicoflolis merged 1 commit into
magicoflolis:masterfrom
stelles:master

Conversation

@stelles

@stelles stelles commented Feb 21, 2025

Copy link
Copy Markdown

This should fix the date sorting issue: #50

The issue is American date format is dumb as fuck and cannot be sorted in string form. I've added a data attribute to the cell and reference it with priority over text.

@neoOpus

neoOpus commented Feb 24, 2025

Copy link
Copy Markdown

Oh! I see that that you did some work, here I just submitted a PR with a fix too.

@magicoflolis

Copy link
Copy Markdown
Owner

This should fix the date sorting issue: #50

The issue is American date format is dumb as fuck and cannot be sorted in string form. I've added a data attribute to the cell and reference it with priority over text.

I will test this and can merge it in the next update, however I may change the way the rows are sorted as I have switched to sorting the data directly rather then sorting by rows. https://github.com/magicoflolis/Userscript-Plus/blob/master/src/UserJS/main.js#L3224

You can see what I mean by opening the console log and looking for Building list { hostCache ... }, if it's empty open the settings tab and click back into the tab for it to refresh.

@neoOpus

neoOpus commented Feb 26, 2025

Copy link
Copy Markdown

This should fix the date sorting issue: #50
The issue is American date format is dumb as fuck and cannot be sorted in string form. I've added a data attribute to the cell and reference it with priority over text.

I will test this and can merge it in the next update, however I may change the way the rows are sorted as I have switched to sorting the data directly rather then sorting by rows. master/src/UserJS/main.js#L3224

You can see what I mean by opening the console log and looking for Building list { hostCache ... }, if it's empty open the settings tab and click back into the tab for it to refresh.

I tested his version as well and it works...

Mine works fine too but I did a mistake to not use main.js... and submitted the final version with different indentation...

@magicoflolis
magicoflolis merged commit 1800918 into magicoflolis:master Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants