-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Console ESC prompt can be annoying #16139
Comments
@pmusa if you referring to how the screen will white-out and display the "Press Enter to start editing. When you're done, press Escape to stop editing" message, then I completely agree. It appears that I formed a habit (prior to Kibana) where I use ESC to dismiss any unwanted auto-complete prompts. I get that I can just keep typing and ignore it, in the case of Kibana, but my pre-existing condition leads to me see the white-out message almost constantly. It's a bit maddening for me. |
The docs say that ESC "Close auto-complete menu." but it does not, it frozes screen and display prompt first. |
I would give this 1000 votes if I could! It's so annoying when I try to cancel some auto-complete! Please revert this back to how it was before! Luckily, I've only been using this new version in training, but we'll be upgrading to 6.x soon, so it will become a BIG nuisance! |
Sorry to everyone who's been frustrated by this! This should be fixed in the next patch release across the board. |
It still does it in 7.x. |
@hackery Which specific version are you using and can you describe the precise behavior you're seeing? Here is what I see on |
It has been working fine for me as well. |
You're right, I can't reproduce this today. Perhaps I was getting some key bounce on ESC. |
@hackery Because other people can produce the correct behavior and because you can produce the correct behavior on one environment but not another, I suspect there may be some factor in your production environment (or perhaps something machine- or browser-specific when you visit your production environment) that's causing this unexpected behavior. Could you try asking a coworker to reproduce the bug on another machine? Could you try reproducing the bug on in incognito mode and on different browsers? Thanks! |
OK - today I've seen it on our QA env as well - in the same browser session/tab that I had open yesterday and didn't see it. I see correct behaviour in both environments if I open an incognito window, or even a new regular browser tab in the same window. Exiting browser and restarting (with tabs automatically restored) it works as well. If I switch features within the Kibana plugin (Discover, Visualize, Dashboard etc) and back, the behaviour remains. If I switch to a feature from a different plugin (e.g. Monitoring) it reverts to correct behaviour. I'm presuming there's some specific user activity over time within devtools which triggers this state. I often leave a tab open for days, switching between features as needed; at the moment I'm trying to trace down a performance problem and have several tabs open on different features to speed navigation, so perhaps my devtools tab has been open longer than typical without switching plugins. So, it might still be browser-specific. Our prod environment is quite restrictive and only has Chrome, so I can't easily make comparisons there, but on my dev machine I have Chrome 76.0, FF and Vivaldi I can try. In the meantime, I'll try and watch for what I might be doing before the bug appears. |
Wow, this is some great info. Very strange indeed. Have you tried clearing your cache? I wonder if there's some weird caching problem happening.
Any info you can dig up here would go a long way towards helping us reproduce this. Thanks again for reporting this bug and looking so deeply into it! |
Well, I could do a cache clear, but that would only take effect on a page reload, which by itself gets back to the proper behaviour anyway. Possible clue: I noticed this while Chrome DevTools was up: |
This is one part from the original post that seems to have been dropped from the conversation. It would be amazing if the "Press Enter to start editing. When you’re done, press Escape to stop editing." prompt could be disabled in the settings. It wasn't clear until I read this post why it even existed. |
@mikeprince3 You're right, thank you for bringing that up again. I'm going to reopen this so we can look into ways to resolving this. For example, in this Monaco issue they suggest using an unobtrusive tooltip. |
Pinging @elastic/es-ui |
It still happens in 8.5.0 for me (Firefox 108.0.1 on macOS). I can reproduce this without entering a single character, but just using the arrow keys to move to some point where the suggestions show up*. When I press escape at that point, the editor locks and displays the "Press Enter to start editing.
|
I've been trying to reproduce this issue and on version 8.7.0 the ESC overlay can't exited by pressing the ESC button again. That means the focus is trapped inside the editor area and it breaks the keyboard navigation around the Console. I'll be looking into fixing this first. |
Why is there even a need to disable the keyboard by pressing ESC? What is the use case for that? As all it takes, with or without bug, is to press ESC one too many times and then you're stuck typing in limbo until you look at the screen again and press enter - it doesn't happen to me often, but it is SO annoying when it does. |
I am seeing this issue on the 8.7.1 Docker Images:
|
I looked more into this issue and the current behaviour is expected: When typing in the editor area, pressing the ESC button allows the user to navigate away by pressing TAB. This is important for accessibility because otherwise it's not possible to navigate away from the editor area by only using the keyboard. |
That just begs the question, what's the use case for supporting TAB in the console editor? The auto-indent works just fine, and if you wreck the indenting yourself, space-space gives you a tab stop. Most (many?) web UI interfaces tab away from input fields (even multi-line), inserting a tab is usually the hard thing to do. |
This behaviour is used in other editors in Kibana, so I'd prefer to keep it consistent. |
@yuliacech I understand the value and neccessity of supporting accessbility requirements. However, can a switch be added to disable this feature in the editor (or for all editors given the understandable preference for consistency)? Perhaps on the ESC popup screen there could be a switch to disable the feature? |
Just managed to repro this as sometimes it is a bit hit-and-miss = If I move away from the window and come back and click on something that then causes a popup, say |
## Summary Fixes #16139 This PR adds a setting in Console that allows to disable the a11y overlay. The default will be set to `enabled` so that the default behaviour should not change. A user can disable the overlay in their browser and the setting is saved in local storage. So that other users are not affected by that change. The reason to allow disabling the overlay is that it can be flaky and sometimes it's displayed when not intended. The code relies on `querySelector` (see this [file](https://github.com/elastic/kibana/blob/1b3f23829c9a41d2995e279b37b04fc457befa6e/src/plugins/es_ui_shared/__packages_do_not_import__/ace/use_ui_ace_keyboard_mode.tsx#L25)) so I think that causes the flakiness and that is very difficult to test reliably. ### Screenshot #### A11y overlay (no changes) <img width="1483" alt="Screenshot 2023-06-01 at 16 34 23" src="https://github.com/elastic/kibana/assets/6585477/d776625c-92cd-4bd9-8e5e-2f672df351a4"> #### Settings modal with the new option to disable the a11y overlay <img width="474" alt="Screenshot 2023-06-01 at 16 29 02" src="https://github.com/elastic/kibana/assets/6585477/8745c7a0-62f4-41a9-9eff-ff8bebd4f767"> #### How to test 1. Start Kibana and navigate to the Console 2. Press ESC when textarea is focused and now autocomplete popup is displayed to see the a11y overlay 3. Open the Settings modal and disable the a11y overlay 4. Press ESC in the textarea again to see that no overlay is now displayed 5. Check that the value is persisted in the local storage Flaky test runner https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2346 ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
I'm not sure what the ettiquette is around commenting on a closed ticket but thank you so much for adding this setting @yuliacech ! |
Thanks a lot everyone for commenting on this issue and providing repro steps! I was not able to reliably reproduce the issue and went with @mikeprince3's suggestion of adding a setting that disables the overlay. Thanks for the suggestion @mikeprince3 |
I have been using console version that has the ESC key prompt for the last days and it is very annoying. I understand it provides keyboard-accessibility, but it would be nice to have an option to disable it if not needed. Moreover, the current implementation prompts if you press the ESC key to escape auto-complete which makes it even worse. Maybe we can use this issue to discuss other possibilities that guarantee keyboard-accessibility without annoying other users.
The text was updated successfully, but these errors were encountered: