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

[feature] Sort by newest/highest votes #4

Closed
posativ opened this issue Sep 6, 2013 · 9 comments · Fixed by #1005
Closed

[feature] Sort by newest/highest votes #4

posativ opened this issue Sep 6, 2013 · 9 comments · Fixed by #1005
Labels
client (Javascript) client code and CSS feature needs-contributor Someone needs to implement this. Help wanted! server (Python) server code
Milestone

Comments

@posativ
Copy link
Collaborator

posativ commented Sep 6, 2013

No description provided.

@Schweinepriester
Copy link

push :)

@georg90
Copy link

georg90 commented Jan 10, 2016

+1!!

@lost-carrier
Copy link

+1

@blatinier
Copy link
Collaborator

#322 tried to implement it but it fails due to sorting happening on client side, and pagination retrieval on the server side. It needs a bit more work.

@angristan
Copy link

angristan commented Feb 11, 2020

@mdbaniani
Copy link

plz somebody implement this as soon as possible. because specially when you limit the default comment numbers to be shown , it is very logical that the latest ones should be shown first.

@ix5 ix5 added needs-contributor Someone needs to implement this. Help wanted! server (Python) server code labels Feb 10, 2022
@ix5 ix5 added this to the 0.13 milestone Mar 23, 2022
@ix5 ix5 changed the title sort by newest/highest votes [feature] Sort by newest/highest votes Mar 23, 2022
@ix5 ix5 modified the milestones: 0.13, 0.14 May 24, 2022
@4044ever
Copy link

4044ever commented Feb 20, 2024

A quick and dirty workaround: add 'asc': 0 here:

https://github.com/posativ/isso/blob/1633d9261ec9877358cda7acc7d78ecb9b09562c/isso/views/comments.py#L752#L757

How exactly you do that? I use docker. (it finally works, but oldest first is a dealbreaker for me) - to asnwer my own question:

Copy comments.py to current folder outside docker
docker cp isso_xyz:/isso/isso/views/comments.py .

Edit/add 'asc':0 (and remember a comma after the line before)
nano works fine

        args = {
            'uri': uri,
            'after': request.args.get('after', 0),
            'asc': 0  # Add this line for newest first sorting / line 852
        }

Copy comments.py back to docker
docker cp comments.py isso_xyz:/isso/isso/views/comments.py

docker restart <container name or ID>

That's it!

@ggtylerr
Copy link

ggtylerr commented Apr 1, 2024

+1 this. Sad to see this is still an issue after over a decade, even the workaround has problems (replies are sorted in reverse too.)

@pkvach
Copy link
Contributor

pkvach commented Apr 1, 2024

I'm currently working on this feature.
I hope to finish the PR soon. I'll link it to this issue.

pkvach added a commit to pkvach/isso that referenced this issue Apr 2, 2024
Add sorting and pagination support for comments, including new API query parameters for sort order and offset. Adjust comment fetching logic accordingly.

Closes isso-comments#4
pkvach added a commit to pkvach/isso that referenced this issue Apr 2, 2024
Add sorting and pagination support for comments, including new API query parameters for sort order and offset. Adjust comment fetching logic accordingly.

Closes isso-comments#4
pkvach added a commit to pkvach/isso that referenced this issue Apr 19, 2024
Add sorting and pagination support for comments, including new API query parameters for sort order and offset. Adjust comment fetching logic accordingly.

Closes isso-comments#4
pkvach added a commit to pkvach/isso that referenced this issue May 6, 2024
Add sorting and pagination support for comments, including new API query parameters for sort order and offset. Adjust comment fetching logic accordingly.

Closes isso-comments#4
pkvach added a commit to pkvach/isso that referenced this issue May 6, 2024
Add sorting and pagination support for comments, including new API query parameters for sort order and offset. Adjust comment fetching logic accordingly.

Closes isso-comments#4
@ix5 ix5 closed this as completed in #1005 May 6, 2024
@ix5 ix5 modified the milestones: 0.14, 0.13.1 May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client (Javascript) client code and CSS feature needs-contributor Someone needs to implement this. Help wanted! server (Python) server code
Projects
None yet
Development

Successfully merging a pull request may close this issue.