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] Post Titles :) #35

Draft
wants to merge 5 commits into
base: dev
Choose a base branch
from
Draft

Conversation

sneakers-the-rat
Copy link
Collaborator

i will write a longer description later but rn jonny is very hungy.

anyway it's this:

post_titles_blur.mp4

Motivation:

One step towards:

https://wiki.neuromatch.social/Sticky_Posts

To have a better way of communicating in-medium about proposals and instance governance stuff since announcements are effectively invisible and you can't discuss things underneath them anyway. It would be lovely to have sticky posts in home and local feeds. To make that not horrible we need to be able to collapse them down really tiny so they aren't obtrusive. To make that work we need to have something to show when they're collapsed, and a title sounds like a good idea.

Additionally, if posts have titles and you can shrink them down very tiny, then we can also get something like a forum where the post title serves as a "thread" within the "category" of the title.

Additionally Additionally we can make another tab drawer on someone's account that serves more as a longform blog, with all their titled posts

Summary:

  • New input field based on content warning for titles
  • Slugs derived from titles on status creation
  • Deduplicating slugs within an account
  • Generating urls for titles posts and using them throughout
  • Serializing title as HTML in plaintext, markdown, and HTML mode
    • slug and title are separate fields from text in the REST serialization,
    • content is the rendered HTML, as masto usually does.
  • New /accounts/:username/slugs/:slug endpoint to get a single status by slug
  • HAML templates use titles in page titles and use the slugified url in the head metadata

TODO:

  • Tests, obvi
  • How does it federate?
  • Title input more visually distinct from CWs

Another PR

  • Do the minimization thing at top
  • Actually work on the CSS a bit for once
  • Make slugs API endpoint an index so we can use it to make a separate page

- Added title field to status
- Redux actions for setting title, piggybacking off spoilers
- Dont allow titles in replies
- Add messages to i18n
- Validation of title length
…and the main external url pattern recognizes the slugs, but there's some kind of problem where after the page is initially loaded the react uses the ID from the URL to make context/etc. requests rather than ID from like the correctly returned API request
…just so we have some place to return.

Added slugs_controller.rb because we'll need it eventually anyway. Tried to make it so all the slug and ID confusion gets resolved on one request pass through the thing, and then afterwards slugs work the same as post ids. (assuming the same slug isn't in the same thread which would probably be a problem)
Copy link

This pull request has merge conflicts that must be resolved before it can be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant