Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RN: in-line image via markdown is not scaling well #12970

Open
dmarkdvt opened this issue Oct 30, 2019 · 9 comments
Open

RN: in-line image via markdown is not scaling well #12970

dmarkdvt opened this issue Oct 30, 2019 · 9 comments

Comments

@dmarkdvt
Copy link

@dmarkdvt dmarkdvt commented Oct 30, 2019

Summary

In the mobile app the inline image via markdown is not scaling well; px declaration is broken and svg can not be displayed. It is related to https://mattermost.atlassian.net/browse/MM-14628, which IMHO was closed wrongly.

Steps to reproduce

Mattermost Version: 5.16.1
Android Version: 1.24.0

Enter the following commands.
1: ![status](https://talk.vtirol.gv.at/DVTImages/jira-status/inprogress_s.png)
2: ![status](https://talk.vtirol.gv.at/DVTImages/jira-status/inprogress.png)
3: ![status](https://talk.vtirol.gv.at/DVTImages/jira-status/inprogress_b.png)
4: ![status](https://api.travis-ci.org/mattermost/mattermost-server.svg)
5: ![status](https://talk.vtirol.gv.at/DVTImages/jira-status/inprogress.png =50 "foobar")
6: ![status](https://talk.vtirol.gv.at/DVTImages/jira-status/inprogress.png =50x50 "foobar")

Expected behavior

1: The picture (32x8 px) not scaling properly to the text. It should be small but it is shown with a minimum height.

2: The picture (67x17 px) not scaling properly to the text. It is displayed as it is. It is even in-line (as recommended in https://mattermost.atlassian.net/browse/MM-14628) and not between a text. But regarding to the docu https://docs.mattermost.com/help/messaging/formatting-text.html#in-line-images that is what this tag is meant for?!

3: Same as 2 but with a bigger picture (300x76 px).

4: SVG is not working. Was just a test: https://mattermost.atlassian.net/browse/MM-9746

5: Should be displayed like in 6.

6: Is ignoring the size setting.

Observed behavior (that appears unintentional)

Web app: image

Android app:
image

Possible fixes

  • allow css
  • display svg in rn
  • allow color
  • allow more via latex
@amyblais

This comment has been minimized.

Copy link
Member

@amyblais amyblais commented Oct 30, 2019

@dmarkdvt We're unable to load the inprogress_s.png images that you linked. Would you be open to providing public images so we can try to reproduce?

@dmarkdvt

This comment has been minimized.

@amyblais

This comment has been minimized.

Copy link
Member

@amyblais amyblais commented Nov 1, 2019

An update on this is that we don’t support rendering svg’s on the mobile app. One of our devs was looking into this at some point and shared that react-native-svg now has a way to accomplish it.

In the case of setting custom dimensions, we also don't seem to support that on the mobile app but we're confirming this with our devs.

@amyblais

This comment has been minimized.

Copy link
Member

@amyblais amyblais commented Nov 4, 2019

@hmhealey Do you know if we support setting custom dimensions on the mobile app?

https://community-release.mattermost.com/core/pl/ag1a7u8gwbf78bhwd3esgazmbw

@hmhealey

This comment has been minimized.

Copy link
Member

@hmhealey hmhealey commented Nov 6, 2019

No, we don't support custom dimensions on the mobile app. It's much more restrictive with what we can support for images.

@amyblais

This comment has been minimized.

Copy link
Member

@amyblais amyblais commented Nov 12, 2019

@dmarkdvt Would you be open to sharing these ideas on our feature request forum http://www.mattermost.org/feature-requests/?

@dmarkdvt

This comment has been minimized.

Copy link
Author

@dmarkdvt dmarkdvt commented Nov 12, 2019

Sure, I can do but isn't at least 4) a bug? The current mobile app should also ignore the dimension parameter =50 as it already does with =50x50px.

@amyblais

This comment has been minimized.

Copy link
Member

@amyblais amyblais commented Nov 12, 2019

I think so, posting the ticket for reference here: https://mattermost.atlassian.net/browse/MM-9746.

@dmarkdvt

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.