mattermost icon indicating copy to clipboard operation
mattermost copied to clipboard

RN: The app fails to render hashtags with a minimum length of 2 after modifying the setting in the system console

Open mattermod opened this issue 1 year ago • 2 comments

Summary

Bug report: The mobile app fails to render hashtags with a minimum length of 2 after modifying the setting in the system console.

This is due to the Markdown functionality, even if it accepts the minimum hashtag length property, is not being passed such property from the config.

Environment Information

  • Device Name: iPhone 15 Pro
  • OS Version: iOS 17.5
  • Mattermost App Version: 2.16.0
  • Mattermost Server Version: 9.8.0

Steps to reproduce

  1. Open the Mattermost system console.
  2. Navigate to the database settings.
  3. Change the minimum hashtag length to 2.
  4. Attempt to use a hashtag with a length of 2 in the app.

Expected behavior

The app should correctly render hashtags with a length of 2 after changing the minimum hashtag length setting.

Observed behavior

The app does not render hashtags with a length of 2. It still only supports hashtags with a length of 3 or more.


If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.

JIRA: https://mattermost.atlassian.net/browse/MM-58365

mattermod avatar May 31 '24 14:05 mattermod

Hello, I was wondering if this issue is still open? I'd be willing to try and work on it.

wellendorfmatthew avatar Jun 10 '24 21:06 wellendorfmatthew

@wellendorfmatthew just checking in - do you have any questions about this issue?

marianunez avatar Aug 30 '24 20:08 marianunez

Is this issue still happening? I can work on it if @wellendorfmatthew is not working on it anymore.

panoramix360 avatar Jun 03 '25 22:06 panoramix360

I was looking into this issue, is it really related to a configuration for Database? I don't think it's related

It's something related to Markdown/commonmark that we use to render the texts on Mobile.

it's interpreting the # as the beginning of a title

Is the issue not being able to show the hashtags properly?

Mobile app: Image

Web Application: Image

cc: @larkox I don't know if you have more context hehe

panoramix360 avatar Jun 10 '25 23:06 panoramix360

@panoramix360 If I understand correctly, the problem here is the following:

We have a setting in the admin console to decide how many characters do you need after a # to consider it a hashtag. If you set it to 5, #hello is a hashtag, but #sun is not a hashtag.

The markdown component should be handling all that if the value is passed. But if I remember correctly... the value is not being passed.

So... we should find a smart way to pass this value to all the relevant "Markdown" calls. The value should live in the config (which is in the database).

Does it make sense?

larkox avatar Jun 11 '25 08:06 larkox

Oh understood it now, thank you @larkox

Opened a PR fixing it :)

https://github.com/mattermost/mattermost-mobile/pull/8924

panoramix360 avatar Jun 12 '25 22:06 panoramix360