Repository navigation
feat: Escape hotkey enters 'navigation mode' - #37167
raisedadead merged 2 commits into
Conversation
Previously only 'escape'ing from the editor prevented auto focus on the editor, now you can 'escape' from anywhere that listens to Hotkeys. Also the outline for HotKeys is hidden as it is not used by tab navigation.
|
@RandellDawson @thecodingaviator would you mind taking a look at this and let me know if it behaves how you expect? |
|
I don't really think this is actually fixing the issue at hand at all. To reproduce the problem, just wait till the editor has loaded fully, after that, you'll encounter the same issue as we've discussed. |
thecodingaviator
left a comment
There was a problem hiding this comment.
See comment above
|
@thecodingaviator I had a chat with @RandellDawson and thought that it would be more intuitive if the navigation is disabled until you press escape, regardless of what's currently in focus. So, the new behaviour would be: Normal behaviour:
To trigger navigation mode:
The idea being accidentally navigating is frustrating, particularly if you can't immediately navigate back. Does that seem reasonable? |
|
@ojeytonwilliams That sounds good to me |
|
I like the new way we're doing things but I think it'll be good if clicking on the instructions panel also enters nav mode. What do you think @RandellDawson ? |
|
I think it's better if we make navigation mode something you have to purposefully activate. If clicking on the instructions triggered it, that could easily happen by accident. |
The problem I saw with clicking on the instructions activating navigation mode, is if you were working on a challenge in the editor and wanted to copy/paste something from the instructions or just accidentally clicked on the instructions (for whatever reason), then all the sudden you are in navigation mode and would not expect it. You could inadvertently end up navigating away from the challenge you were working on. @ojeytonwilliams and I discussed it for a while yesterday and concluded that navigation mode should be a very deliberate action taken by the user. |
|
That sounds reasonable |
|
@freeCodeCamp/dev-team Just need someone from the dev team to review now. |
Update index.md)masterbranch of freeCodeCamp.Previously only 'escape'ing from the editor prevented auto focus on the editor, now you can 'escape' from anywhere that listens to Hotkeys. Now,
nandpcan only be used to navigate after pressingescape, to prevent accidental navigation.Also the outline for HotKeys is hidden as it is not used by tab navigation.
Closes #37146