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(standups): Autofocus the input in the discussion drawer when opened #7779

Merged
merged 4 commits into from
Feb 21, 2023

Conversation

jmtaber129
Copy link
Contributor

Description

Fixes #6873

Autofocus discussion drawer input in standup meetings.

This was previously fixed, but reverted because the autofocus was applied to all meetings (not just standups), which broke facilitator-following in other activities. This PR specifically limits the autofocus to standup meetings.

Also migrates DiscussionThreadInput to useFragment via the codeshift

Demo

https://www.loom.com/share/5cfe7f8a464f418690b32ed7e54942e1

Testing scenarios

Final checklist

  • I checked the code review guidelines
  • I have added Metrics Representative as reviewer(s) if my PR invovles metrics/data/analytics related changes
  • I have performed a self-review of my code, the same way I'd do it for any other team member
  • I have tested all cases I listed in the testing scenarios and I haven't found any issues or regressions
  • Whenever I took a non-obvious choice I added a comment explaining why I did it this way
  • I added the label One Review Required if the PR introduces only minor changes, does not contain any architectural changes or does not introduce any new patterns and I think one review is sufficient'
  • PR title is human readable and could be used in changelog

Copy link
Contributor

@BartoszJarocki BartoszJarocki left a comment

Choose a reason for hiding this comment

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

lgtm!

if (editorRef.current) {
editorRef.current.focus()
}
}, [editorRef, discussionId, autofocus])
Copy link
Contributor

Choose a reason for hiding this comment

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

+1 no need to put editorRef in deps array, it won't trigger a rerender anyway. technically it should trigger exhuastive-deps eslint warning

@jmtaber129 jmtaber129 merged commit 9c465eb into master Feb 21, 2023
@jmtaber129 jmtaber129 deleted the jmtaber129/standup-autofocus-discussion-drawer branch February 21, 2023 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Standups: Autofocus the input in the discussion drawer when opened
2 participants