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

Improve context descendant sorting #2579

Conversation

VyrCossont
Copy link
Contributor

@VyrCossont VyrCossont commented Jan 28, 2024

Description

Topologically sort replies, moving self-replies to top of list. The topo sort is decent at producing runs of reply chains in the output, although it's probably possible to improve on that.

Fixes #2479

Checklist

  • I/we have read the GoToSocial contribution guidelines.
  • I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat.
  • I/we have performed a self-review of added code.
  • I/we have written code that is legible and maintainable by others.
  • I/we have commented the added code, particularly in hard-to-understand areas.
  • I/we have made any necessary changes to documentation.
  • I/we have added tests that cover new code.
  • I/we have run tests and they pass locally with the changes.
  • I/we have run go fmt ./...
  • and golangci-lint run. (for some reason this is incredibly slow on my Mac, like 10 minutes at 800% CPU and it hasn't finished)

Topologically sort replies, then move self-replies to top of list
@VyrCossont VyrCossont force-pushed the context-descendant-sorting branch from 3168804 to dd0ccc5 Compare January 28, 2024 09:02
@VyrCossont VyrCossont force-pushed the context-descendant-sorting branch from 55e6622 to a951538 Compare January 29, 2024 01:19
@VyrCossont VyrCossont marked this pull request as ready for review January 29, 2024 01:24
@tsmethurst
Copy link
Contributor

Looks neat to me :) @NyaaaWhatsUpDoc do you have any comments on the sorting?

@NyaaaWhatsUpDoc NyaaaWhatsUpDoc merged commit c675d47 into superseriousbusiness:main Jan 31, 2024
2 checks passed
@VyrCossont VyrCossont deleted the context-descendant-sorting branch February 10, 2024 20:36
VyrCossont added a commit to VyrCossont/gotosocial that referenced this pull request Feb 21, 2024
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.

[feature] Better conversation thread sorting
4 participants