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

[GH-12018] Remove the now unnecessary show prop from PopoverBar #3602

Merged
merged 3 commits into from
Sep 16, 2019

Conversation

anu-rock
Copy link
Contributor

@anu-rock anu-rock commented Sep 6, 2019

Summary

The PopoverBar component is the bottom black bar that we see on an uploaded image's preview modal. Screenshot:

popoverbar-highlighted

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

* 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.
@hanzei hanzei requested review from hmhealey and a team September 6, 2019 09:59
@hanzei hanzei added 2: Dev Review Requires review by a core commiter 3: QA Review Requires review by a QA tester labels Sep 6, 2019
@ghost ghost requested review from matterdoc and removed request for a team September 6, 2019 09:59
@hanzei hanzei requested review from a team and removed request for matterdoc September 6, 2019 10:00
@ghost ghost requested review from imisshtml and removed request for a team September 6, 2019 10:00
@lindalumitchell lindalumitchell removed the 3: QA Review Requires review by a QA tester label Sep 6, 2019
Copy link
Member

@hmhealey hmhealey 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! Thanks for helping clean that up

@anu-rock
Copy link
Contributor Author

@hmhealey Thanks for approving. Cannot wait to see my first PR merged :)

Copy link

@imisshtml imisshtml left a 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!

@anu-rock
Copy link
Contributor Author

@imisshtml Thanks for your time. Did you get a chance to finish your review?

@imisshtml
Copy link

@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.

@hmhealey
Copy link
Member

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?

@anu-rock
Copy link
Contributor Author

@hmhealey Thanks for checking. I rebased to the latest master locally (commit f96d5fa), and:

  • did manual testing in browser
  • ran unit tests

Everything still worked as expected. So I guess we are good to go. How do I push my rebased commits here without force-pushing?

Copy link

@imisshtml imisshtml left a 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!

@anu-rock
Copy link
Contributor Author

These changes look good, thanks @hmhealey for testing this!

@imisshtml, @hmhealey - All being good, shall we merge and close this PR?

@hmhealey
Copy link
Member

@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

@hmhealey hmhealey added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter labels Sep 16, 2019
@hmhealey hmhealey modified the milestone: v5.16.0 Sep 16, 2019
@amyblais amyblais added this to the v5.16.0 milestone Sep 16, 2019
@hmhealey hmhealey merged commit 52bcb81 into mattermost:master Sep 16, 2019
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Sep 17, 2019
jwilander pushed a commit that referenced this pull request Sep 24, 2019
* 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.
@lindy65 lindy65 added Tests/Not Needed Does not require new release tests and removed 4: Reviews Complete All reviewers have approved the pull request labels Sep 27, 2019
skheria pushed a commit to uber-archive/mattermost-webapp that referenced this pull request Oct 3, 2019
…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.
skheria pushed a commit to uber-archive/mattermost-webapp that referenced this pull request Oct 3, 2019
…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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation Tests/Not Needed Does not require new release tests
Projects
None yet
7 participants