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

Make switching to and from the preview mode more convenient #22726

Merged
merged 2 commits into from Aug 16, 2022

Conversation

N-Shar-ma
Copy link
Collaborator

@N-Shar-ma N-Shar-ma commented Aug 16, 2022

When switching back to writing mode after preview mode, the composebox
would be out of focus and so the the cursor would semingly get lost.

Now on clearing the preview mode, the composebox is focused and so the
cursor is seen blinking at it's original position.

Till now, switching back to writing mode after preview mode, needed
the user to first focus on the Write (unpreview) button by tabbing
to it (if using keyboard) and then select it.

To make things easier, especially when using keyboard, now the Write
button will be automatically focused on entering preview mode, so
going back to writing mode only needs one 'Enter` keystroke.

Fixes: CZO thread

Screenshots and screen captures:

Entering and exiting preview mode using keyboard:
https://user-images.githubusercontent.com/68962290/184899009-5997e5db-1e79-411d-9d95-e5b525a43e07.mp4

Unpreview button focused immediately after entering preview mode
image

Self-review checklist

  • Self-reviewed the changes for clarity and maintainability
    (variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

  • Explains differences from previous plans (e.g., issue description).
  • Highlights technical choices and bugs encountered.
  • Calls out remaining decisions and concerns.
  • Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

  • Each commit is a coherent idea.
  • Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

  • Visual appearance of the changes.
  • Responsiveness and internationalization.
  • Strings and tooltips.
  • End-to-end functionality of buttons, interactions and flows.
  • Corner cases, error conditions, and easily imagined bugs.

When switching back to writing mode after preview mode, the composebox
would be out of focus and so the the cursor would semingly get lost.

Now on clearing the preview mode, the composebox is focused and so the
cursor is seen blinking at it's original position.
Till now, switching back to writing mode after preview mode, needed
the user to first focus on the `Write` (unpreview) button by tabbing
to it (if using keyboard) and then select it.

To make things easier, especially when using keyboard, now the `Write`
button will be automatically focused on entering preview mode, so
going back to writing mode only needs one 'Enter` keystroke.
@timabbott timabbott merged commit d6d3683 into zulip:main Aug 16, 2022
@timabbott
Copy link
Sponsor Member

Nice, merged, thanks for fixing these @N-Shar-ma! These keyboard interaction details are definitely the sort of thing that can be very meaningful for folks who prefer to use keyboard navigation.

@N-Shar-ma N-Shar-ma changed the title compose: Refocus composebox when clearing prevew mode. Make switching to and from the preview mode more convenient Sep 3, 2022
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.

None yet

3 participants