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

TreeView: Refactor loading focus management #2868

Merged
merged 10 commits into from
Feb 15, 2023
Merged

TreeView: Refactor loading focus management #2868

merged 10 commits into from
Feb 15, 2023

Conversation

colebemis
Copy link
Contributor

@colebemis colebemis commented Feb 6, 2023

Problem

Focus wasn't reliably moving from the loading item to asynchronously loaded items due to a setTimeout call.

Solution

@joshblack and I figured out how to implement the focus behavior without a setTimeout call.

Before

Notice that focus disappears after items are loaded:

CleanShot.2023-02-08.at.23.21.14.mp4

After

CleanShot.2023-02-08.at.23.20.10.mp4

Co-authored-by: Josh Black joshblack@users.noreply.github.com

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
@changeset-bot
Copy link

changeset-bot bot commented Feb 6, 2023

🦋 Changeset detected

Latest commit: 8b910d9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2023

size-limit report 📦

Path Size
dist/browser.esm.js 89.74 KB (0%)
dist/browser.umd.js 90.28 KB (0%)

@github-actions github-actions bot temporarily deployed to storybook-preview-2868 February 6, 2023 21:33 Inactive
@colebemis colebemis temporarily deployed to github-pages February 6, 2023 21:34 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-2868 February 6, 2023 21:34 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-2868 February 6, 2023 21:34 Inactive
src/TreeView/TreeView.tsx Outdated Show resolved Hide resolved
src/TreeView/TreeView.tsx Outdated Show resolved Hide resolved
@github-actions github-actions bot temporarily deployed to storybook-preview-2868 February 6, 2023 22:39 Inactive
@colebemis colebemis temporarily deployed to github-pages February 6, 2023 22:43 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-2868 February 6, 2023 22:44 Inactive
@colebemis colebemis temporarily deployed to github-pages February 9, 2023 06:15 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-2868 February 9, 2023 06:16 Inactive
@colebemis colebemis temporarily deployed to github-pages February 9, 2023 06:29 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-2868 February 9, 2023 06:29 Inactive
@colebemis colebemis marked this pull request as ready for review February 9, 2023 06:30
@colebemis colebemis requested a review from a team February 9, 2023 06:30
@colebemis colebemis temporarily deployed to github-pages February 13, 2023 20:06 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-2868 February 13, 2023 20:07 Inactive
@colebemis colebemis temporarily deployed to github-pages February 15, 2023 22:27 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-2868 February 15, 2023 22:28 Inactive
@colebemis colebemis temporarily deployed to github-pages February 15, 2023 22:37 — with GitHub Actions Inactive
@colebemis colebemis added this pull request to the merge queue Feb 15, 2023
Merged via the queue into main with commit 03ebf41 Feb 15, 2023
@colebemis colebemis deleted the fix-loading-focus branch February 15, 2023 22:56
@primer-css primer-css mentioned this pull request Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants