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

[MM-23517] - Fix channel header popover #5159

Merged
merged 5 commits into from
Mar 26, 2020

Conversation

nevyangelova
Copy link
Contributor

Summary

This fixes the line breaks that were removed in the markdown formatting. Checked the messages everywhere that use the 'marked' function and nothing looks broken. The style change is needed because on the new side bar the popover needs a different left offset.

Ticket Link

https://mattermost.atlassian.net/browse/MM-23517

@nevyangelova nevyangelova added 2: Dev Review Requires review by a core commiter 3: QA Review Requires review by a QA tester CherryPick/Approved Meant for the quality or patch release tracked in the milestone labels Mar 25, 2020
@nevyangelova nevyangelova added this to the v5.22.0 milestone Mar 25, 2020
@esethna esethna added the Setup Cloud Test Server Setup a test server using Mattermost Cloud label Mar 25, 2020
@nevyangelova
Copy link
Contributor Author

/update-branch

Copy link
Contributor

@esethna esethna left a comment

Choose a reason for hiding this comment

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

Thanks Nevy! Nice find on the sidebar left offset, although I'm still seeing a slight shift:

c186ca1d3762a23b84267555d73c6345

Copy link
Member

@devinbinnie devinbinnie left a comment

Choose a reason for hiding this comment

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

There's actually a way you can do this without using JavaScript.
You can define a CSS selector that checks to see if #SidebarContainer is a sibling, then select .channel__wrap and you can go down the CSS tree from there.

Should look something like:
#SidebarContainer + .channel__wrap .channel-header__popover

@nevyangelova
Copy link
Contributor Author

@devinbinnie I see the point of doing it without Javascript but I feel in this case is more clear to drive it from the state, because the reason for adding the class is clearer and its grouped together with the other variable.

@jgilliam17
Copy link
Contributor

@nevyangelova Looks good
Only one issue
there is a shift to the left in the popover on DM channels, due to status below name. See gif.
Popover shift

@nevyangelova
Copy link
Contributor Author

nevyangelova commented Mar 26, 2020

@hmhealey @devinbinnie I am not super happy with the hacky CSS of the popover and would like to open a follow up ticket to investigate re-doing it and fixing the positioning in a more elegant and consistent way, similar to the dot menu exploration.

Edit: ticket here https://mattermost.atlassian.net/browse/MM-23621

@mattermod
Copy link
Contributor

Mattermost test server updated with git commit c8f9e3773442c744fe7941e9fcb4d3555931eddc.

Access here: https://mattermost-webapp-pr-5159.test.mattermost.cloud

@devinbinnie
Copy link
Member

@devinbinnie I see the point of doing it without Javascript but I feel in this case is more clear to drive it from the state, because the reason for adding the class is clearer and its grouped together with the other variable.

@nevyangelova I look at it as a separation of concerns issue, where the styling and component logic should be kept separate. I would only use a custom class driven by component logic when CSS breaks down.

I'm only about 2/5 on this, not sure what other people think but I won't hold up the PR.

@devinbinnie devinbinnie self-requested a review March 26, 2020 12:35
@devinbinnie devinbinnie removed the 2: Dev Review Requires review by a core commiter label Mar 26, 2020
@nevyangelova
Copy link
Contributor Author

I agree with that and I am not happy with the final solution with adding classes, lets explore redesigning the component and styles in the ticket I mentioned above.

Copy link
Contributor

@jgilliam17 jgilliam17 left a comment

Choose a reason for hiding this comment

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

Thank you @nevyangelova

Tested, looks good to merge.

  • Verified line breaks, new lines, fixed first line of channel description and popover not shifting on hover.
  • Popover text formatting matches edit channel header modal.

@jgilliam17 jgilliam17 removed 3: QA Review Requires review by a QA tester Setup Cloud Test Server Setup a test server using Mattermost Cloud labels Mar 26, 2020
@mattermod
Copy link
Contributor

Test server destroyed

@devinbinnie devinbinnie added the 4: Reviews Complete All reviewers have approved the pull request label Mar 26, 2020
@nevyangelova nevyangelova merged commit dd12f81 into master Mar 26, 2020
@nevyangelova nevyangelova deleted the MM-23517-final-fix-popover branch March 26, 2020 14:28
@mattermod mattermod added CherryPick/Done Successfully cherry-picked to the quality or patch release tracked in the milestone and removed CherryPick/Approved Meant for the quality or patch release tracked in the milestone labels Mar 26, 2020
mattermod pushed a commit that referenced this pull request Mar 26, 2020
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Mar 26, 2020
@jgilliam17 jgilliam17 added the Tests/Done Release tests have been written label Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4: Reviews Complete All reviewers have approved the pull request Changelog/Not Needed Does not require a changelog entry CherryPick/Done Successfully cherry-picked to the quality or patch release tracked in the milestone Docs/Not Needed Does not require documentation QA Review Done Tests/Done Release tests have been written
Projects
None yet
7 participants