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

feat(editor): additional focus handler for tab nav #2925

Merged
merged 3 commits into from
Sep 28, 2023

Conversation

elbotho
Copy link
Member

@elbotho elbotho commented Sep 25, 2023

(for serlo/backlog#111)

another go to fix focus + tab navigation 🤞

tested a bit in chrome, FF and safari and did not find new bugs so far.

Happy to get some help testing 😊

@vercel
Copy link

vercel bot commented Sep 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
frontend ✅ Ready (Inspect) Visit Preview Sep 26, 2023 9:48am

@github-actions
Copy link
Contributor

github-actions bot commented Sep 25, 2023

📦 Next.js Bundle Analysis for @serlo/frontend

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 97.79 KB (🟡 +14 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Six Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/entity/create/[type]/[taxonomyId] 461.92 KB (🟡 +108 B) 559.71 KB
/entity/repository/add-revision/[...id] 461.61 KB (🟡 +108 B) 559.4 KB
/page/create 461.63 KB (🟡 +108 B) 559.42 KB
/taxonomy/term/create/[parent_id]/[id] 461.32 KB (🟡 +108 B) 559.11 KB
/taxonomy/term/update/[id] 461.24 KB (🟡 +108 B) 559.03 KB
/user/settings 459.99 KB (🟡 +108 B) 557.78 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

Copy link
Contributor

@hejtful hejtful left a comment

Choose a reason for hiding this comment

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

Looks good, the tabbing is much nicer now.

It won't work when the selection is inside a list. I guess it's our decision if we want the list indentation or focus change in this case.

There is also this tiny issue with the plus button outline, but it's definitely not a blocker 😄
Screenshot 2023-09-26 at 10 48 54

src/serlo-editor/core/sub-document/editor.tsx Outdated Show resolved Hide resolved
src/serlo-editor/core/sub-document/editor.tsx Outdated Show resolved Hide resolved
@elbotho
Copy link
Member Author

elbotho commented Sep 26, 2023

It won't work when the selection is inside a list. I guess it's our decision if we want the list indentation or focus change in this case.

you mean that changing focus via tab does not work within a list?
That would be okay for the scope of this PR :)

Copy link
Member

@Entkenntnis Entkenntnis left a comment

Choose a reason for hiding this comment

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

Congrats! This actually works reasonable well! I haven't found bugs with it.

@elbotho elbotho merged commit 41effa7 into staging Sep 28, 2023
@elbotho elbotho deleted the another-tab-focus-approach branch September 28, 2023 07:53
@elbotho elbotho mentioned this pull request Sep 28, 2023
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.

3 participants