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

Mentions don't respect alternate text when rendered in mobile view #6795

Closed
cmrd-senya opened this issue Apr 15, 2016 · 2 comments · Fixed by #6805
Closed

Mentions don't respect alternate text when rendered in mobile view #6795

cmrd-senya opened this issue Apr 15, 2016 · 2 comments · Fixed by #6805

Comments

@cmrd-senya
Copy link
Member

cmrd-senya commented Apr 15, 2016

Our mention syntax is @{name; id} and name is supposed to be substituted as a link text for the mention. In usual view it is done so with the javascript code from markdown-it-diaspora-mention. In some cases, for example, for mobile view of /stream posts are rendered with the MessageRenderer (e.g., markdownify method) which renders mentions with Diaspora::Mentionable.format method. So when mentions are rendered with this method, the name attribute of the mention is completely ignored and person.name value is put as the link text instead. However, name is rendered if corresponding person was not supplied to the method, so it works as a fallback, rather than the visible name as it works in markdown-it-diaspora-mention.

@cmrd-senya
Copy link
Member Author

cmrd-senya commented Apr 15, 2016

So from the code and from the tests I can make conclusion, that it was thought by some devs that the name attribute is some kind of fallback name, when the original username is not available. For example, this test assumes the actual user name substitution instead of the name attribute. So the problem that this attribute is treated differently by the backend and the frontend code. Someone said the feature has never been advertised, so the @{; } syntax is more like an internal thing, but we have to decide what does it mean exactly. Also I wouldn't mind to officialy "advertise" it as a feature.

@cmrd-senya
Copy link
Member Author

blocks #6793

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants