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, specifically for machine setup and for developer workflow.
Notes: Jira ticket
We require hashtags to be 3 characters or more right now because MySQL doesn't support searching for shorter strings by default. Postgres supports them by default and MySQL can be configured to support them, so we should add a setting that the user can change in those cases. This is particularly needed for CJK teams since 2 letter words are common for them.
This will need:
1) A MinimumHashtagLength setting added to the config.json. This will likely be part of the ServiceSettings section unless we come up with somewhere more appropriate (like a SearchSettings section once we get around to improving search)
2) An entry in the System Console to change that setting. This should be added under Advanced > Database Settings until somewhere better is added.
Minimum Hashtag Length [ 3 ]
Help Text: "Minimum number of characters in a hashtag. MySQL data bases must be configured to support searching strings shorter than three characters, see documentation.
3) The MIN_HASHTAG_LINK_LENGTH constant should be removed and this setting should be used in its place in text_formatting.jsx. No changes are required on the server to support the new setting.
Mattermost docs: https://docs.mattermost.com/install/requirements.html?highlight=ft_min_word_len#database-software
MySQL docs: https://dev.mysql.com/doc/refman/8.0/en/fulltext-fine-tuning.html
Hey @jasonblais! Would love to work on this issue if it hasn't been done yet 馃憤
Awesome! @santos22 it's available. Let us know if you have any questions.
Glad to see you around :)
Glad to be around! @sudheerDev do you know if this will require any Redux work? Also, I think the Go label can be removed if there will be no server changes 馃槃
The only thing that might be changed in redux would be if you added a helper function to get that setting from the config since it'd be used in both the web and mobile apps. The server changes required for this will just be to add the setting to model/config.go
and ensure that it's sent to the apps.
Can the setting be retrieved from the config using the following import?
import {getConfig} from 'mattermost-redux/actions/admin';
@hmhealey on the above ^
@santos22 Sorry about the delay. Since that's in actions
, it's for actually loading the config from the server which is already done by that point.
The other changes still needed for this are:
config/default.json
and model/config.go
on the server. You'll also need to add it to GenerateClientConfig
in utils/config.go
so that non-admin users can see the setting's value.Parser
as an option.If you need any help (particularly for the mobile app since it's a bit more difficult to set up a test environment for that), please let me know, and I'll try to respond quicker :)
No worries @hmhealey! I tested out the changes on the server and was able to see the value in the web app.
Does the second change replace Constants.MIN_HASHTAG_LINK_LENGTH
in the web app as mentioned in the issue?
Yes, that's the value you'll have to replace on the web app. The mobile app doesn't have a constant like that, but our fork of commonmark.js still has an option that you can pass to set that length
I don't think I'll be able to get to the other two changes in the coming days. Happy to open this issue to other contributors and help out if needed.
If this issue is free, I would like to take this.
It is! It would be great, if you would take care of this! Please take note of https://github.com/mattermost/mattermost-webapp/pull/1885. It a PR from @santos22 that is a good starting point. If you want, you can branch of his branch and use his code.
Thanks @hanzei!
And thanks @santos22, your discussion helps my understanding for this issue 馃憤
I just noticed this issue was closed automatically by Github after I merged PR on the webapp. I'm reopening so we can track the remaining PR for mobile app.
Most helpful comment
If this issue is free, I would like to take this.