flarum / framework

Simple forum software for building great communities.
http://flarum.org/
6.39k stars 834 forks source link

feat: add option for filtering read stickied on all discussions page #3995

Closed adrianmccay closed 1 month ago

adrianmccay commented 6 months ago

Changes proposed in this pull request: This is an updated PR from the previous one that was pointing to 1.x. I've set up 2.x (as much as I could) locally and have tested this one - I have a bit less test data this time as I was unable to get the fake-data extension to install on 2.x.

As per discussion on Flarum Discuss - https://discuss.flarum.org/d/34607-flarum-do-perform-some-automated-update For some, the stickied posts dropping down the order on "All Discusisons" like a non-stickied post when the discussion has been read is not an expected behaviour. I have added a simple on/off option which defaults to the existing behaviour. With the switch on, the read discussions on "All Discussions" are not treated as stickied. With the switch off, all stickied posts remain stickied on "All Discussions" regardless of their read status.

Reviewers should focus on: n/a

Screenshot Settings Settings page

Default/turned on Settings page

Turned off Settings page

QA

  1. On a forum with a heap of discussions, sticky a few random ones
  2. Mark some at the top as "read" - refresh "All Discussions" page to see those discussions drop down the list
  3. Switch the option Filter read from stickied on All Discussions page off
  4. See all stickied discussions at the top of "All Discussions" page

Necessity

Confirmed

Required changes:

adrianmccay commented 5 months ago

@SychO9 I've made changes to the PR based on feedback - I also updated the help text so hopefully that isn't too horrible!

SychO9 commented 2 months ago

Thanks for the PR!

sorry for the delayed response @adrianmccay, could you please check the box to allow maintainers to make edits? it should be on the right sidebar of this page. So that I may fix the conflicts.

adrianmccay commented 1 month ago

@SychO9 no worries - I couldnt find the option so tried closing this one to create a new one but still cant see the option. Maybe I set my fork up wrong.

SychO9 commented 1 month ago

@adrianmccay this is what it looks like:

image

If you still can't find it it's ok I can pull your commits into another branch and fix things there. Let me know.

SychO9 commented 1 month ago

https://github.com/flarum/framework/pull/4073