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

[MM-18156] Change around RHS search bar such that it's tabbable when RHS is open #4107

Merged
merged 3 commits into from
Nov 11, 2019

Conversation

devinbinnie
Copy link
Member

Summary

When tabbing through the Channel Header when the RHS is open, if you tab past the Pinned Post button, the tab focus would go down to the center channel. This PR makes the RHS search bar container invisible and uses the one normally used by the channel header.

Ticket Link

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

@devinbinnie devinbinnie added 2: Dev Review Requires review by a core commiter 3: QA Review Requires review by a QA tester labels Oct 31, 2019
@devinbinnie devinbinnie added this to the v5.18.0 milestone Oct 31, 2019
@devinbinnie
Copy link
Member Author

@hmhealey @asaadmahmood Just wanted to verify my approach makes sense before putting it up as a proper PR.

@asaadmahmood asaadmahmood added the Setup Cloud Test Server Setup a test server using Mattermost Cloud label Nov 1, 2019
Copy link
Contributor

@asaadmahmood asaadmahmood 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 to me, one issue I see is (disconnect from this PR), when I focus search, type something, and press enter, it loses focus, I would prefer it kept its focus and when I typed something, it populated the search bar, right now, it jumps to the center channel.

Copy link
Contributor

@stevemudie stevemudie left a comment

Choose a reason for hiding this comment

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

LGTM
QA will test again once merged.

@stevemudie stevemudie added QA Review Done and removed 3: QA Review Requires review by a QA tester labels Nov 1, 2019
@@ -116,12 +114,17 @@ export default class ChannelHeader extends React.PureComponent {
if (header !== prevHeader) {
this.props.actions.getCustomEmojisInText(header);
}
if (this.props.rhsOpen !== prevProps.rhsOpen) {
this.handleResize();
Copy link
Member

Choose a reason for hiding this comment

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

This should be done using getDerivedStateFromProps since it updates the state of the component. Either that or we can leave this.state.showSearchBar as it was before where it only depends on the size of the window and check this.state.showSearchBar || this.props.rhsOpen in the render method

@devinbinnie devinbinnie marked this pull request as ready for review November 11, 2019 16:26
@devinbinnie devinbinnie added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter labels Nov 11, 2019
@mattermod
Copy link
Contributor

Mattermost test server updated with git commit db89abb02ea1635974af29853a701d56f9d00da2.

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

@devinbinnie devinbinnie merged commit 15866e5 into mattermost:master Nov 11, 2019
@devinbinnie devinbinnie deleted the MM-18156 branch November 11, 2019 16:59
@mattermod
Copy link
Contributor

Test server destroyed

@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Nov 11, 2019
@hanzei hanzei removed the Setup Cloud Test Server Setup a test server using Mattermost Cloud label Nov 18, 2019
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 Docs/Not Needed Does not require documentation QA Review Done
Projects
None yet
7 participants