-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[GH-12018] Remove the now unnecessary show prop from PopoverBar #3602
Conversation
* Remove show prop and related logic from PopoverBar component * Remove reference to this prop from ViewImageModal component * Update PopoverBar's Jest snapshots As noted in issue mattermost#12018, this prop was required earlier to conditionally show/hide the component on mouse enter/leave on modal. But now the component set to permanently show directly via CSS, which makes the prop unnecessary and obsolete.
* Rename the prop as `showCloseBtn` * Update its references in unit tests * Update Jest snapshops for ViewImageModal Now that the PopoverBar's `show` prop has been removed, the showFooter state needs to be renamed as `showCloseBtn` to better reflect its renewed purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks for helping clean that up
@hmhealey Thanks for approving. Cannot wait to see my first PR merged :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code changes look great! I'm setting it up to fully test (some issues on my end), but wanted to update that I'm in review of this!
@imisshtml Thanks for your time. Did you get a chance to finish your review? |
@anuragbhd Sorry, I've been having some issues on testing this (my environment, not your code!) so I'm working with the team now to have a test performed. |
Just tested this locally, and it looks good to me. @anuragbhd Would you be able to update this branch off the latest master so we can double check everything before it gets merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good, thanks @hmhealey for testing this!
@imisshtml, @hmhealey - All being good, shall we merge and close this PR? |
@anuragbhd Instead of rebasing and force-pushing, you can pull the latest version of master and merge it into your branch. We've got a bit of a guide for that here. I merged it in though so assuming the build passes, we should be good to merge this |
* Remove `show` prop from PopoverBar component * Remove show prop and related logic from PopoverBar component * Remove reference to this prop from ViewImageModal component * Update PopoverBar's Jest snapshots As noted in issue #12018, this prop was required earlier to conditionally show/hide the component on mouse enter/leave on modal. But now the component set to permanently show directly via CSS, which makes the prop unnecessary and obsolete. * Rename `showFooter` state in ViewImageModal * Rename the prop as `showCloseBtn` * Update its references in unit tests * Update Jest snapshops for ViewImageModal Now that the PopoverBar's `show` prop has been removed, the showFooter state needs to be renamed as `showCloseBtn` to better reflect its renewed purpose.
…rBar (mattermost#3602) * Remove `show` prop from PopoverBar component * Remove show prop and related logic from PopoverBar component * Remove reference to this prop from ViewImageModal component * Update PopoverBar's Jest snapshots As noted in issue mattermost#12018, this prop was required earlier to conditionally show/hide the component on mouse enter/leave on modal. But now the component set to permanently show directly via CSS, which makes the prop unnecessary and obsolete. * Rename `showFooter` state in ViewImageModal * Rename the prop as `showCloseBtn` * Update its references in unit tests * Update Jest snapshops for ViewImageModal Now that the PopoverBar's `show` prop has been removed, the showFooter state needs to be renamed as `showCloseBtn` to better reflect its renewed purpose.
…rBar (mattermost#3602) * Remove `show` prop from PopoverBar component * Remove show prop and related logic from PopoverBar component * Remove reference to this prop from ViewImageModal component * Update PopoverBar's Jest snapshots As noted in issue mattermost#12018, this prop was required earlier to conditionally show/hide the component on mouse enter/leave on modal. But now the component set to permanently show directly via CSS, which makes the prop unnecessary and obsolete. * Rename `showFooter` state in ViewImageModal * Rename the prop as `showCloseBtn` * Update its references in unit tests * Update Jest snapshops for ViewImageModal Now that the PopoverBar's `show` prop has been removed, the showFooter state needs to be renamed as `showCloseBtn` to better reflect its renewed purpose.
Summary
The PopoverBar component is the bottom black bar that we see on an uploaded image's preview modal. Screenshot:
Previously, its
show
prop was used to conditionally show/hide the component on mouse enter/leave on modal. But now the component is set to permanently show directly via CSS, which makes the prop unnecessary and obsolete.This PR:
removes the show prop from PopoverBar and its references from the component's parent ViewImageModal
updates unit tests and Jest snapshots accordingly
Ticket Link
Fixes mattermost/mattermost#12018