Skip to content

Conversation

@danxuliu
Copy link
Member

@danxuliu danxuliu commented Sep 5, 2018

This pull request ensures that the user name is shown in bold (as the default font weight for strong elements changes between browsers) and that mentions to the current user are highlighted.

It also fixes some minor markup issues and reformats the embedded HTML code to better resemble HTML code.

Before:
comment-mentions-before

After:
comment-mentions-after

Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

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

Looking nice!!! 🌮

Copy link
Member

@blizzz blizzz left a comment

Choose a reason for hiding this comment

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

looks good and works on FF

@blizzz blizzz added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Sep 5, 2018
@danxuliu
Copy link
Member Author

danxuliu commented Sep 5, 2018

I have added a few more fixes; the most relevant one to keep the avatar and the user name together.

Before:
comment-mentions-wrap-before

After:
comment-mentions-wrap-after

@danxuliu
Copy link
Member Author

danxuliu commented Sep 5, 2018

Oops, the JS unit tests fail due to the change from div to span; I will fix that.

Visually it makes no difference, but as the ".avatar" element is inside
a "span" element it can not be a block element to be compliant with the
HTML specification.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
The avatar should be shown immediately after the avatar to be able to
accurately define the space between them using only CSS rules.

Note that in the case of the "atwho" menu it is not really needed, as a
whitespace removal seems to be done automatically by the plugin, but it
was modified for its displayed elements too for consistency.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Different browsers use different font weights for strong elements
(Chromium uses "bold", but Firefox uses "bolder", which is relative to
the font weight of the parent), so now the user name in mentions is
explicitly shown with a bold weight.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Like done in Talk, mentions to the current user are now shown with the
primary colors to make them more prominent.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
When the cursor is on an avatar wrapper the cursor is shown as a pointer
to inform the user that it can be clicked (which will either show the
contacts menu or insert a mention, depending on the case); the cursor
must be explicitly defined for the "img" element that shows the avatar
too, or otherwise the default cursor would be shown.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Most of the properties of the rule are not needed for mentions, so the
rule is no longer applied to them; the only needed property was moved to
the main rule for mentions.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Otherwise a line break could be added between the avatar and the user
name when the wrapper is close to the right border of the message.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
@danxuliu danxuliu force-pushed the fix-markup-and-style-of-mentions-in-comments branch from 7bffac4 to bd75366 Compare September 5, 2018 16:36
@rullzer rullzer merged commit 0899f2c into master Sep 5, 2018
@rullzer rullzer deleted the fix-markup-and-style-of-mentions-in-comments branch September 5, 2018 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish design Design, UI, UX, etc. feature: comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants