Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pleroma pleroma
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 593
    • Issues 593
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 96
    • Merge requests 96
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Pleroma
  • pleromapleroma
  • Merge requests
  • !3620

ForceMentionsInContent: wrap mentions in a span, fix the formatting

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Alex Gleason requested to merge recipients-inline into develop Jan 25, 2022
  • Overview 1
  • Commits 5
  • Pipelines 2
  • Changes 3

I am going to allow users to use ForceMentionsInContent MRF with Soapbox and then strip the mentions client-side. I wrapped the inlined mentions with a <span class="recipients-inline"> tag.

However, I noticed the formatting was quite off:

Screenshot_from_2022-01-24_20-09-54

I properly formatted the mentions.

I also noticed it didn't work with local posts. The tag array was empty, even though to had recipients. The to array was also in the correct order. So I rewrote/simplified the code around the to field instead of tag. I think it will be higher performance, even if it excludes some users in rare cases.

Afterwards it works pretty well:

Screenshot_from_2022-01-24_20-18-09

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: recipients-inline