Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

custom URL scheme upper case letters not working #2309

Merged
merged 6 commits into from
Mar 23, 2019
Merged

custom URL scheme upper case letters not working #2309

merged 6 commits into from
Mar 23, 2019

Conversation

Hobby-Student
Copy link
Contributor

@Hobby-Student Hobby-Student commented Jan 31, 2019

Summary

  1. System Console > Customization > Posts
  2. In Custom URL Schemes field enter a value like "file, DMS, dms"

I did so and the upper case one is not working. We have a software which is exporting links as

DMS:<GUID>

inserting this link into a message is not working. Manually replace DMS to

dms:<GUID>

is working as a clickable link.
I don't know if this is the only place, but I didn't find any other... If this is only rendered on client side, the windows desktop is also affected (have not tested other apps).

Webapp -> uppercase not working
windows desktop app -> uppercase not working
Android App -> uppercase partially working (DMS does, HTTP does not)

image
image

Ticket Link

none

Checklist

  • just a little regex

@jasonblais jasonblais added Setup Old Test Server Triggers the creation of a test server and removed Setup Old Test Server Triggers the creation of a test server labels Feb 1, 2019
@mattermost mattermost deleted a comment from mattermod Feb 1, 2019
@mattermost mattermost deleted a comment from mattermod Feb 1, 2019
@mattermost mattermost deleted a comment from mattermod Feb 1, 2019
@jasonblais jasonblais added the Setup Old Test Server Triggers the creation of a test server label Feb 1, 2019
Copy link
Contributor

@jasonblais jasonblais left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Hobby-Student for the pull request!

From the generated test server, it appears custom URL schemes with upper case letters don't still render a link
image

Also @hmhealey - wondering if it was intended that only lower case schemes work?

@jasonblais jasonblais added 1: PM Review Requires review by a product manager 2: Dev Review Requires review by a core commiter Awaiting Submitter Action Blocked on the author labels Feb 1, 2019
@jasonblais jasonblais self-assigned this Feb 1, 2019
@Hobby-Student
Copy link
Contributor Author

Thanks @Hobby-Student for the pull request!

no problem. I try to help... but for now, I'm stuck in searching the root of the problem. Your test servers are very helpful!
Will do my best to get things sorted soon. I hope you don't mind, that I will update the source step by step - little steps...

@jasonblais
Copy link
Contributor

Definitely not a problem! Let us know if you have any questions along the way :)

@Hobby-Student
Copy link
Contributor Author

Definitely not a problem! Let us know if you have any questions along the way :)

How often is the Test Server updated? Only if someone of the team triggers it or automated?
Unfortunately I'm not able to setup a dev/test server the next weeks...

@mattermost mattermost deleted a comment from mattermod Feb 2, 2019
@mattermost mattermost deleted a comment from mattermod Feb 2, 2019
@hanzei hanzei added Setup Old Test Server Triggers the creation of a test server and removed Setup Old Test Server Triggers the creation of a test server labels Feb 2, 2019
@hanzei
Copy link
Contributor

hanzei commented Feb 3, 2019

Hey @Hobby-Student,

The Spinmint test server is used to test a PR. For developing a feature please use a local dev environment. You can find an instruction for this on https://developers.mattermost.com/contribute/webapp/developer-setup/. If you have problems feel free as them on the Mattermost Community Server.

@Hobby-Student
Copy link
Contributor Author

@hanzei

did read the dev instructions. will try to get a dev machine asap.

@hanzei hanzei removed the Setup Old Test Server Triggers the creation of a test server label Feb 4, 2019
@mattermost mattermost deleted a comment from mattermod Feb 4, 2019
@hanzei
Copy link
Contributor

hanzei commented Feb 20, 2019

Hey @Hobby-Student,

Did you manage to set up a dev environment? Is there anything I can help you with?

@Hobby-Student
Copy link
Contributor Author

Did you manage to set up a dev environment?

I'm currently waiting for some RAM. Should arrive the day after tomorrow.
Setting up the dev machine itself seems to be easy.

@hmhealey
Copy link
Member

  1. In Custom URL Schemes field enter a value like "file, DMS, dms"

Instead of having the admin specify an uppercase custom URL scheme, would it make sense to make all of the custom URL schemes case-insensitive?

@Hobby-Student
Copy link
Contributor Author

Instead of having the admin specify an uppercase custom URL scheme, would it make sense to make all of the custom URL schemes case-insensitive?

exactly what I'm trying to do. If you could point me to the right direction, where custom schemes are parsed...?

Android app seems to work case insensitive.

@hmhealey
Copy link
Member

I think this line is the one that needs to be changed since it currently looks for the exact string in the array. Using a .findIndex would let you do a case insensitive comparison instead.

@Hobby-Student
Copy link
Contributor Author

tested. results:
image
image
URL with title is working as expected. URL with quotes is working in lowercase only.

it seems, that there are some more changes needed to get it work in all circumstances...

@jasonblais
Copy link
Contributor

Thank you @Hobby-Student!

@hmhealey apart from what's shown in the screenshot above, any additional tests that we should do? If so, I can ask our QA, but in general it appears to work as expected.

@hmhealey
Copy link
Member

hmhealey commented Mar 22, 2019

I don't think there's anything else specific to test. These changes are mostly around making it so that the URL scheme can contain uppercase letters

@jasonblais jasonblais removed the 1: PM Review Requires review by a product manager label Mar 22, 2019
@jasonblais
Copy link
Contributor

Sounds good.

Thanks @Hobby-Student for this! I requested a second dev review and then this should be ready to merge :)

@jasonblais jasonblais removed their assignment Mar 22, 2019
Copy link
Member

@saturninoabril saturninoabril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Hobby-Student, looks good to me. Please rebase and fix conflicts so we can merge it.

@saturninoabril saturninoabril added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter Setup Old Test Server Triggers the creation of a test server labels Mar 23, 2019
@Hobby-Student
Copy link
Contributor Author

Hobby-Student commented Mar 23, 2019

Please rebase and fix conflicts so we can merge it.

done.

Glad that I was able help 😃

@hanzei hanzei added this to the v5.10.0 milestone Mar 23, 2019
@hanzei hanzei merged commit ff2190a into mattermost:master Mar 23, 2019
@hanzei
Copy link
Contributor

hanzei commented Mar 23, 2019

Thank you for the contribution @Hobby-Student 👍

@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Mar 25, 2019
stevepartridge pushed a commit to stevepartridge/mattermost-webapp that referenced this pull request Mar 30, 2019
@lindy65 lindy65 added Tests/Not Needed Does not require new release tests and removed 4: Reviews Complete All reviewers have approved the pull request labels Apr 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation Tests/Not Needed Does not require new release tests
Projects
None yet
8 participants