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

fix: elements displayed in block body #922

Merged
merged 2 commits into from
Aug 15, 2023
Merged

Conversation

domw30
Copy link
Collaborator

@domw30 domw30 commented Aug 14, 2023

What does this do?

  • fixes a current issue where elements displayed in the message block body are forced onto new lines when links are included in the message.
  • small change that inherits the display, resulting in a correct lay out of elements in the message block body.

Why are we making this change?

  • bug found in production. messages are not being displayed as expected. See screenshots below.

How do I test this?

  • open messenger and compose messages with a number of elements including highlight and tagging, and urls etc.

Key decisions and Risk Assessment:

Things to consider:

  1. How will this affect security?
  2. How will this affect performance?
  3. Does this change any APIs?

BEFORE:

  • channels
Screenshot 2023-08-14 at 09 42 26
  • collapsed chat
Screenshot 2023-08-14 at 09 42 54
  • full screen
Screenshot 2023-08-14 at 09 43 31

AFTER:

  • channels
Screenshot 2023-08-14 at 09 44 06
  • collapsed chat
Screenshot 2023-08-14 at 09 44 54
  • full screen
Screenshot 2023-08-14 at 09 45 11

@domw30 domw30 requested a review from a team August 14, 2023 08:45
Copy link
Collaborator

@ratik21 ratik21 left a comment

Choose a reason for hiding this comment

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

CSS is magic!

Comment on lines 68 to 69
display: inherit;
flex-direction: column;
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Looks like 'block-body' contains a number of different elements. Did we verify rendering looks correct for all of the cases where other things are rendered and not just the message?
  2. Can we remove the flex-direction and gap? Those only apply if you are display: flex, I think.
  3. Can we just remove display completely here? Why does it need to inherit from the parent? I think that'd make it difficult to figure out what it's actually rendering as.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hey Dale!

  1. I went through and checked the elements and all looked okay to me. I compared with development. From what I could see the elements render okay. Is there anything that comes to mind that would potentially be broken in the UI ? I just had another quick check and appears okay.

  2. Good shout yeah I can remove those.

  3. Yeah, same as above, I should be able to just remove it here. Will make that change. Thanks!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was partly why I didn't want to merge straight away just in case I may have missed something, felt like an update that was 'too easy' to not have caused any unwanted changes in the ui 😬

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there anything that comes to mind that would potentially be broken in the UI ?

I guess mainly the gap that was there. I imagine that was probably the reason for it being flex in the first place.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for the above. Removing flex wouldn't have been a good solution here. Instead, wrapping the message content (text and links) fixes the issue without having to touch any its parent containers, so the message block positioning/element spacing won't be affected. This should be a cleaner solution. Thanks!

@domw30 domw30 merged commit 2b72a7e into main Aug 15, 2023
4 checks passed
@domw30 domw30 deleted the fix/highlight-width/zos-629 branch August 15, 2023 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants