This patch updates the css for the console pin pane so that it never
exceeds 50% of the outer window.
Issue 884137 shows that when the console window height is small, the
live expression pane can overflow the console input pane making it
impossible to type into the console. This is due to the pin pane css
setting a max-height of 200px regardless of the height of the outer
window.
The fix is to update the css so that pane has a max height of 50% but
the inner container uses 200px so that it will have a height of the
smaller of the two. Allowing users to always see the input area.
See: https://imgur.com/a/GS8yA8h
Bug: 884137
Change-Id: I85337f7391a882ca107a30be2bf5c2a12f261787
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1837527
Reviewed-by: John Emau <John.Emau@microsoft.com>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: James Lissiak <jalissia@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#703449}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7df70dbd0f8d39c40d3347f592666bb3e3ab98d2
Keyboard navigation in Console presents new interactions that our
stick-to-bottom (STB) logic should care about.
Prompt
- Before, STB only cared about TextChanged events, but now cares
about focusin, since users can Tab from messages to prompt
Objects
- Expanding an object results in noticeable scroll-anchoring jumps,
STB should turn off due to expanding. Expanding a small object
that can fit in viewport should guarantee it is visible.
Bug: 865674
Change-Id: I47872110d4bf2261b4940b565f8c926333b66836
Reviewed-on: https://chromium-review.googlesource.com/c/1330350
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#613239}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cc2fb34c6c8a513781dc7d78e827f340605681e9
Fixes 2 stick to bottom cases
- Prompt has text, but is scrolled out of view. User presses 'Enter'.
Browsers usually scroll an field into view on input events, but
Console preventsDefault to avoid adding a newline. Now, we will
emulate the scroll.
- Page logs a ton of messages, Console opened for the first time.
CodeMirror asynchronously resized prompt height on load, which
broke stick to bottom. This CL changes layout so that prompt
height does not grow on editor load.
Bug: 863664
Change-Id: Ia25a71100d9a895d4c8c710b36ba1d8b76d76990
Reviewed-on: https://chromium-review.googlesource.com/c/1321575
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#605936}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 60802eced856d89133f211ef29df6124f29401bd
With keyboard navigation experiment enabled,
- Switch viewport's focus proxy from `element` > `_contentElement`
- Clicking a message will select it
- Click-selection applies "blue" highlight, except when a user
expands objects, groups, or traces
- Move focus from log > prompt when user types on 'keydown'
- Better distinguish events below prompt (geometry works with
MouseEvents, but not FocusEvents)
- Stick to bottom when prompt gains focus
Bug: 865674
Change-Id: I473bcdf714408406b0ce7a49772589daf3cbe9cb
Reviewed-on: https://chromium-review.googlesource.com/1171814
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#592669}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1d9c78149597bc68797982d9ac6294f9595fcd9f
Simplify visible index calculation and tests by
- Remove padding on viewport container
- Remove negative margin (was on error/warning logs)
Improve visible index / scrollItemIntoView() precision by
- Rebuild cumulative heights even if each message is slightly off
- No need to scroll last item into view if it is fully visible
- Perform extra scroll on scroll into view in case items above
were larger than expected
- Message height measurements now include wrapper's border
Bug: 865674
Change-Id: Id4abad0e40a971dff9accbc7b904427ea02f728c
Reviewed-on: https://chromium-review.googlesource.com/1144254
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#579175}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8ee170a089cd03e7f0b7ab6982174d15d0180f8a
- Splits out prompt styles into consolePrompt.css
- Do not show background/border on matching brackets if the
CodeMirror container is not focused
Bug: none
Change-Id: I1955e07ca3289a6781097d0c99467c51336403b9
Reviewed-on: https://chromium-review.googlesource.com/1153468
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#579136}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 60fc08c17da4f858739220886c4899ef846cc4bc
Part 1: introduce pins behind an experiment.
- Prompt has 'pin' button to add current expression to pins
- Pin pane sticks to the top of the Console, with max height
- Pins have multiline editors and a value preview that shows
"not available" when there is an error
Screenshot: https://imgur.com/a/Ahdtosa
Bug: 849875
Change-Id: Ib0b8bafd97551f823ff8b64d13c5259f42328994
Reviewed-on: https://chromium-review.googlesource.com/1087509
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#574740}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 589cdcb33ef96770a2c3e4a9c76ee439d1e2e56e
- Adds an empty 15px space directly below the Console
prompt's editor.
- Updates "isScrolledToBottom" logic in Console to account
for the new space. Without this update, typing on the
prompt's last line will not "jump + stick to bottom"
as expected.
With this CL, overlay scrollbars (e.g. on Mac), should
never cover the prompt's editor.
Bug: 725249
Change-Id: Ib0167f6919d5b9942e7f2dc4d8cf0c15fc9368df
Reviewed-on: https://chromium-review.googlesource.com/965020
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#551222}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 06e046ba940fb6dffe3bbed45b85fb840b4a9194