Skip to content

Collapse stickies by default — posts and comments #28

@PortableProgrammer

Description

@PortableProgrammer

Problem

Stickied posts in the feed and stickied comments in threads dominate the view. AutoModerator comments already have a "collapse by default" preference (src/mixins/comment.pug:51) — mirror that for stickies.

Scope

  • Sticky posts: in card view, set details[open] to false for p.stickied === true (currently always open for media/link posts in card view per src/mixins/post.pug:57). In compact view, the existing toggle behavior already collapses by default — no change needed.
  • Sticky comments: in src/mixins/comment.pug:51, the open= expression currently considers only AutoMod + the collapseAutoMod pref. Extend with && !(data.stickied && prefs.collapseStickies).

Tasks

  • Add pref_collapseStickies column to users table (mirror pref_collapseAutoMod)
  • DB migration in src/db.js
  • Entry in prefToColumn map in src/routes/index.js
  • get_user_prefs helper updated
  • Dashboard checkbox in src/views/dashboard.pug alongside the existing AutoMod toggle
  • Sticky-post collapse logic in src/mixins/post.pug
  • Sticky-comment collapse logic in src/mixins/comment.pug

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions