I thought it would be nice to include a system to mention tags, certainly similar to how you can mention channels in Discord, I think it would be great for a lot of situations, also it would avoid dead links with old or no longer existing tag names and redirect to the new name correctly, actually this idea is nothing new as far as I see there was already a discussion about it a while ago (https://discuss.flarum.org/d/5519-tag-mentioning/4). You could see something like this, reusing the icon and colour of the tag in question:

I think it wouldn't add too much burden to the development of core, moreover you could reuse most of the current system of mentions, instead of using the @ use the # I think it would make more sense... to take advantage of the search that is already built-in.

    That wouldn't really solve the problem of links to deleted tags, the mention would still be in the post. The only difference would be that we can style a deleted tag differently.

    One problem specific to the # character is that it's already used in mentions to indicate the resource ID after its friendly name. If we use slugs only for tags, then it will break anytime you rename a tag slug, and if you append the ID, now you would have #"name"#slug which might cause some parsing issues.

      The current format for mentions is:

      User: @"DisplayName"#ID example @"Darkle"#35146
      Post: @"AuthorDisplayName"#pID example @"Darkle"#p203370

      So a tag mention should be formatted as: @"Slug"#tID
      a group mention should be formatted as: @"NameSingular"#gID

      clarkwinkelmann Oh I see what you mean, good catch, so the best formatting would be what @SychO says? good idea also to be able to use it to mention groups, in that case if the @ is used, what would you think about something like this?

      I think it could also be intuitive because when a user tries to mention someone, he will probably easily discover that there is also the possibility to do it with tags/groups, so I don't see it as a bad idea.

      I see limited usefulness for this feature since unlike mentions of posts/users/groups there wouldn't be any kind of notification associated with the feature.

      To increase its benefits I'd say it should come with a hover card that gives statistics about the tag, and maybe includes a button to immediately start a discussion in the tag?

      From a purely aesthetical standpoint, this seems more akin to rich link previews, in the same way that it would be nice if links to discussions or profiles were automatically turned into previews as well. This is kind of what my Rich Embeds extension does, although the results are cached so it doesn't show up to date information, and tag links are pretty boring since they would just have the tag name and the icon of the website, but no sign of the tag color. That's something I could add through the Flarum integration already available for discussions and profiles.

        6 days later

        I love this feature, but I think the first step should be the ability to mention groups. Going to create a proposal for that right now.

        Can we define the requirements for this task in the meantime?

        • permission who can mention tags?
        • ❓️ what will it render? A card as Clark mentioned?
        • it links to the tag page
        • it renders icon and color, it re-uses the component for tag selection from the text editor

          clarkwinkelmann Maybe it's not for all use cases, although at the same time we could say the same about the channel mention in Discord, sometimes it's useful and other people will never have used it, I definitely think that if hypothetically this would be in the core it should be something optional in flarum/mentions, so that the admin decides if the mentions are limited to users or also include tags and groups.

          luceos Yeah cool! the hover idea seems interesting to me, I'm going to try to work on some ideas that have crossed my mind, I'll share them here to see what you think.

            Darkle On Discord it is more important, because there is no other convenient way to reference different channel. On web forum like Flarum you can just post link to specific tag.

              rob006 like Flarum you can just post link to specific tag.

              I have made tons of references to tags all the time. Currently I am relying on mostly writing down the link manually, for instance [Proposals](/t/proposals), but even so there's always the risk of plural or singular mistakes and the fact you need to be very, very careful whether no mistakes are slipping in. Even for my personal use (as a power user), being able to mention tags would be bliss 😀

              clarkwinkelmann Another few benefits to smart linking like this:

              • If we use the ID under the surface, links won't break when slugs do
              • It provides us more structured data and analytics about how tags / discussions interrelate
              • We could hijack this to support event posts for changing tags; this would fix the incorrect display of "Deleted" when a discussion is moved out of a secondary tag
              • It would probably be a good excuse to move the core implementation behind our typeahead system for emojis / user mentions into a framework-like system in Core
                23 days later

                What are we hoping the outcome will be:

                The ability for users with permission to mention tags.

                The requirements:

                • new permission "Search tags" underneath "Search users"
                • api search endpoint for tags that adheres to permission checking
                • search source in the forum frontend for integration into mentions that checks for the permission before the source is added
                • add tagmentioning formatting in frontend and backend, the design should be similar to a tag with icon, background and plural name with some metric information

                Open questions:

                • Which extension does this belong to? Tags or Mentions, or a new one that has a dependency on both?

                Let's clarify the requirements so that we can open a bounty (I secretly want to be the first)!

                  Woohoo I can't wait to see the new pledged event post!

                  luceos Which extension does this belong to? Tags or Mentions, or a new one that has a dependency on both?

                  That's a good question, initially I thought that unlike groups the tags could be a separate extension, but with the things that askvortsov commented I think it has opened a new and interesting possibilities about this proposal... and it seems a good idea to introduce it through some core extension especially to exploit in the future some possibilities that he comments, as the great idea to fix the famous "Deleted" thing.

                  So it would be great to know the core team's opinion about it, although on the other hand if we don't want to get ahead of ourselves or for now it's more convenient/easier to do it as a third party extension it would also be a reasonable option, also (I don't know if in this case I'm ignoring some technical details) it could be added later to the core as it has happened recently with blomstra/notification-deleter(?).

                  Should be part of the tags extension, where it first checks that mentions extension is installed.
                  other way around..

                  What are we hoping the outcome will be:

                  The ability for users with permission to mention tags.

                  The requirements:

                  • implement searching in the API list end point for tags.
                  • search source in the forum frontend for integration into mentions that checks for the permission before the source is added
                  • add tag mentioning formatting in frontend and backend, the design should be similar to a tag with icon, background and plural name with some metric information
                  • make sure to check whether mentions is installed wherever required
                  • integration tests similar to user mentions tests
                  • PR against https://github.com/flarum/framework for merging into flarum/mentions

                    Okay pledging is broken if you already pledged before, fixing.

                    Fixed, this was an issue with custom code on discuss to assign the Devotee badge.

                    luceos added a bounty of 18.75.

                    luceos new permission "Search tags" underneath "Search users"

                    I don't think that's necessary, it would add confusion considering you can sort of search tags in the tag selection modal. A mention tags permission on the other hand makes sense.

                    6 days later
                    GreXXL added a bounty of 11.25.

                    I think it would be nice if a level-2 hierarchy tag gets linked that you also see (in the rendering) the primary tag (like if you Share "Services" Tag you actually see "Resources > Services"). I also pledged to get this implemented - would be very useful in Forums like discuss 🙂