Since we don't properly unmount the Console React app,
FilterBar's componentWillUnmount is never called.
This was where we planned to disconnect the resize observer,
but it was in fact never called.
So what we do in this patch instead is in the resize observer
callback, check if the observed node is connected, and if
it's not, we disconnect the resize observer.
This prevent the console from dispatching an action, that
may slow down closing the console.
Differential Revision: https://phabricator.services.mozilla.com/D45006
--HG--
extra : moz-landing-system : lando
We are now showing the "Show content messages" checkbox, as well
as removing the "Persist logs" one.
Differential Revision: https://phabricator.services.mozilla.com/D44637
--HG--
extra : moz-landing-system : lando
If the user triggered a force autocomplete (with Ctrl + Space)
that would result in having only the completion text, writing another
letter wouldn't update the completion text, that could then lead
into having an erroneous expression in the input.
This patch fixes this issue and add a test case to make sure we
don't regress this.
Differential Revision: https://phabricator.services.mozilla.com/D44976
--HG--
extra : moz-landing-system : lando
Line numbers in self-hosted frames are not controlled by the test.
Depends on D44610
Differential Revision: https://phabricator.services.mozilla.com/D44611
--HG--
extra : moz-landing-system : lando
We want the Browser Console and WebConsole to have
distinct preferences, so you might have one in
editor mode, and the other one in inline mode if
you want.
This is as simple as adding the preference, and
stripping the devtools.webconsole. prefix in
the constant we use for retrieving the preference
value.
Differential Revision: https://phabricator.services.mozilla.com/D44631
--HG--
extra : moz-landing-system : lando
We're re-using the test we already have for invoking getters
in the webconsole as it is checking a lot of different cases.
Differential Revision: https://phabricator.services.mozilla.com/D44628
--HG--
rename : devtools/client/webconsole/test/browser/browser_webconsole_object_inspector_getters.js => devtools/client/webconsole/test/browser/browser_console_content_getters.js
extra : moz-landing-system : lando
When we wanted to insert a string in the webconsole input,
we were setting the input value, and setting the cursor
manually. But since the editor setCursor function is calling
alignLine, there could be cases where the editor scroll position
would jump, feeling awkward for the user.
It turns out we can simplify this code a lot since codeMirror
provides a replaceRange function, which is a perfect replacement
for what we were using, without having to manage the cursor position.
The only downside to that is that inserting characters this
way *does* fire a `changes` event, that we are listening to
in the JsTerm to request autocompletion (which we don't need
as we only insert characters when accepting a completion or
adding a tab).
To mitigate that, we pass a specific jsterm origin string to
replaceRange, which let's us discriminate in the changes event
listener if those changes originate from jsterm only actions.
A test is added to ensure this works as expected (the test was
failing without the fix).
Differential Revision: https://phabricator.services.mozilla.com/D44466
--HG--
extra : moz-landing-system : lando
Fix 2 proptype errors: one in App.js, and the
other one in the renderStacktrace function,
that is called by Error rep.
Differential Revision: https://phabricator.services.mozilla.com/D44467
--HG--
extra : moz-landing-system : lando
The failures were about pending requests to highlighters,
because we were logging node elements. Since we don't
really need to do that, we simply change the command
to not lod elements.
Differential Revision: https://phabricator.services.mozilla.com/D44367
--HG--
extra : moz-landing-system : lando
We also add a few console API calls, as well as pass a second
object parameter for the methods that support it, so we can
check that the content object are well displayed in the
Browser Console.
As we add a new check for console.table, I realized that
hiding and showing a consoleTable component would trigger a
new request to the server, even if we already have the table
data at hand.
I fixed this by only trying to get data from the server if
we don't have them already.
Differential Revision: https://phabricator.services.mozilla.com/D44159
--HG--
extra : moz-landing-system : lando
We add an extra "input" property that is filled with
either "inline" or "multiline" depending if the expression
was evaluated in regular webconsole layout or in editor mode.
The test that was checking the execute_js telemetry event is
modify to only check what it was created for (hitting enter
on incomplete expression adds new line), and a new test is
added to specifically check that the execute_js telemetry event
is recorded as we expect.
Differential Revision: https://phabricator.services.mozilla.com/D43738
--HG--
rename : devtools/client/webconsole/test/browser/browser_jsterm_multiline.js => devtools/client/webconsole/test/browser/browser_webconsole_telemetry_execute_js.js
extra : moz-landing-system : lando
There was a warning message displayed to indicate that
the stylesheets where parsed again for checking errors,
and that in order to see errors for CSS modified in
Javascript, the tab should be reloaded.
The jargon used there was confusing, and also this was
more a notice than an actual warning message.
In order to remove confusion, we don't emit this message
anymore, but add a title to the CSS filter button when
it's disabled. The sentence is reworded to be simpler
to understand.
Differential Revision: https://phabricator.services.mozilla.com/D44118
--HG--
extra : moz-landing-system : lando
This is done by modifying the evaluateExpression action,
where we retrieve the selection of the full input.
Differential Revision: https://phabricator.services.mozilla.com/D43750
--HG--
extra : moz-landing-system : lando
We store the created DebuggerClient when opening the Browser Console
so we can close it when closing the Browser Console window.
The Browser Console window `unload` event listener is moved out of
the BrowserConsole class to the BrowserConsoleManager, so we can close
the DebuggerClient when the window is closed (plus it makes more sense
to have it here since that's where we create the window).
Finally, functions that were inlined in toggleBrowserConsole are moved
as method of the BrowserConsoleManager for clarity.
Differential Revision: https://phabricator.services.mozilla.com/D43930
--HG--
extra : moz-landing-system : lando
The onboarding UI is displayed on top of the Editor.
A dismiss button hides it forever (this is handled via
a pref that is set to false when clicking the button).
We take this as an opportunity to polish the Editor UI/wording
a bit.
Differential Revision: https://phabricator.services.mozilla.com/D43621
--HG--
rename : devtools/client/debugger/images/resume.svg => devtools/client/themes/images/webconsole/run.svg
extra : moz-landing-system : lando
The onboarding UI is displayed on top of the Editor.
A dismiss button hides it forever (this is handled via
a pref that is set to false when clicking the button).
We take this as an opportunity to polish the Editor UI/wording
a bit.
Differential Revision: https://phabricator.services.mozilla.com/D43621
--HG--
rename : devtools/client/debugger/images/resume.svg => devtools/client/themes/images/webconsole/run.svg
extra : moz-landing-system : lando
We remove the multiple this.fissionSupport properties to only check
the permission in the couple place we need it.
Differential Revision: https://phabricator.services.mozilla.com/D43585
--HG--
extra : moz-landing-system : lando
This is something Scratchpad allowed and that people
told me they were relying on. With Scratchpad being
deprecated, it makes sense to implement it in the
WebConsole as it's quite easy to do so.
A test is added to ensure this works as expected.
Differential Revision: https://phabricator.services.mozilla.com/D43394
--HG--
extra : moz-landing-system : lando
With top-level await, we can now have multiple
evaluation results next to each others. Which
means that if they had the same repeatId, we
would only print the first result.
We fix that by not allowing evaluation results to
be repeated.
A mochitest is added to ensure the patch properly
fixes the issue.
Differential Revision: https://phabricator.services.mozilla.com/D43253
--HG--
extra : moz-landing-system : lando