Nothing Special   »   [go: up one dir, main page]

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

User Profile: Navigate tabs by arrow keys when user profile opens. #28742

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

nimishmedatwal
Copy link
Collaborator

Left/right keys arrows in User Profile now navigates between tabs when the modal is first opened.
This issue was pointed out by @amanagr here

Fixes: #28615

Screenshots and screen captures:
Animation7

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.

@zulipbot zulipbot added size: XS area: keyboard UI area: popovers Popovers, including general message actions. bug labels Jan 29, 2024
web/src/user_profile.js Outdated Show resolved Hide resolved
@nimishmedatwal nimishmedatwal force-pushed the issue#28615 branch 2 times, most recently from fcad9fe to f77e545 Compare January 30, 2024 08:47
@@ -463,6 +463,9 @@ export function show_user_profile(user, default_tab_key = "profile-tab") {
const $elem = toggler.get();
$elem.addClass("large allow-overflow");
$("#tab-toggle").append($elem);
setTimeout(() => {
$(".ind-tab.first").trigger("focus");
}, 0);
Copy link
Member

Choose a reason for hiding this comment

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

So I believe with upcoming PRs, it'll be possible to have a different tab from the first one be initially selected (See #28445). Can you tweak this to focus the currently selected tab instead?

Left/right keys arrows in User Profile now navigates
between tabs when it's first opened.
Fixes zulip#28615
@nimishmedatwal
Copy link
Collaborator Author

@timabbott updated the code so that if now focuses on the current selected tab instead.

@alya
Copy link
Contributor
alya commented Mar 6, 2024

@amanagr is this ready for integration review?

@alya alya added the maintainer review PR is ready for review by Zulip maintainers. label Mar 6, 2024
@amanagr
Copy link
Member
amanagr commented Mar 7, 2024

LGTM

@amanagr amanagr added integration review Added by maintainers when a PR may be ready for integration. and removed maintainer review PR is ready for review by Zulip maintainers. labels Mar 7, 2024
@timabbott timabbott merged commit 8e0518d into zulip:main Mar 8, 2024
8 checks passed
@timabbott
Copy link
Member

Merged, thanks @nimishmedatwal and @amanagr!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: keyboard UI area: popovers Popovers, including general message actions. bug integration review Added by maintainers when a PR may be ready for integration. size: XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Arrow keys in user profile should immediately navigate between tabs
5 participants