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

compose: Show focus ring on buttons only when using keyboard navigation. #30494

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

N-Shar-ma
Copy link
Collaborator

For the compose control buttons, the compose close button, and the send later vdots button, we show the focus ring only on focus-visible and not on focus.

Fixes part of: #27117.

css: Redefine --color-outline-focus for dark theme.

The css variable --color-outline-focus, which affects focus rings throughout the app, now has a different value defined for the dark theme but this should have no visible effect, and help clean up the code.

This is a prep commit for the next, which shows focus rings only on focus-visible and not on focus for composer buttons.

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.

@N-Shar-ma N-Shar-ma force-pushed the focus-ring-compose branch 2 times, most recently from 198fe91 to c81e403 Compare June 19, 2024 20:25
@timabbott
Copy link
Sponsor Member

timabbott commented Jun 20, 2024

This version seems so still show focus rings when clicking compose box buttons with the mouse, for me using Chrome on Linux.

The css variable `--color-outline-focus`, which affects focus rings
throughout the app, now has a different value defined for the dark theme
but this should have no visible effect, and help clean up the code.

This is a prep commit for the next, which shows focus rings only on
`focus-visible` and not on `focus` for composer buttons.
For the compose control buttons, the compose close button, and the send
later vdots button, we show the focus ring only on `focus-visible` and
not on `focus`.

Fixes part of: zulip#27117.
@N-Shar-ma
Copy link
Collaborator Author

@timabbott Sorry about that, the default dark theme styling was overriding the new styles, which had been tweaked to make the CSS slightly simpler (and so inadvertently buggy). Have reverted to the 1st draft which has been thoroughly tested, details here

@timabbott timabbott merged commit b852b5f into zulip:main Jun 20, 2024
7 checks passed
@timabbott
Copy link
Sponsor Member

That version seems to work, merged, thanks @N-Shar-ma!

We may still be able to find a better refinement, but I think this is a good checkpoint at which to check off the feature.

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

4 participants