Commit Graph
39 Commits
Author SHA1 Message Date
Nicolas Chevobbe db0b64398f Bug 1554877 - Make JsTerm editor resizable. r=Honza.
We add a GridElementWidthResizer to handle the editor width.
The width is then persisted in a pref.
A test is added to ensure this works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D37687
2019-07-18 05:51:44 +00:00
Panos Astithas f3ad8a7772 Bug 1233891 - Use DOM promises instead of deprecated sync promises in devtools/. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D37138
2019-07-09 17:26:32 +00:00
Victor Porof b7732ae890 Bug 1561435 - Format devtools/client/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35884
2019-07-05 11:24:38 +02:00
Nicolas Chevobbe 0582dd5cf9 Bug 1519105 - Add a keyboard shortcut to switch between inline and editor mode. r=Honza.
We use Cmd/Ctrl + B to switch between inline and editor mode. This
should be familiar for VSCode users as it toggles the file sidebar.
When changing the layout, we persist the choice into the editor pref
so the user keeps the same layout the next time they open the console.

Differential Revision: https://phabricator.services.mozilla.com/D34718
2019-06-28 09:25:59 +00:00
Nicolas Chevobbe b9a7800b67 Bug 1523864 - Move filter bar layout change to the App level. r=Honza.
This makes the console code more consistent, and adds the
nice benefit of being able to check if the layout should
be modified when performing non-window-resize events that
might still impact the layout (sidebar toggle, sidebar
resizing, ...).

Differential Revision: https://phabricator.services.mozilla.com/D27668
2019-06-07 14:23:35 +00:00
Razvan Caliman 56ecf30a5f Bug 1548833 - Replace message table data with generalized message payload. r=nchevobbe
Follow-up to [Bug 1093953](https://bugzilla.mozilla.org/show_bug.cgi?id=1093953) which introduced a generalized `payload` object for messages to be populated asynchronously with additional  data associated with the message after it is initially received.

The reasoning is: messages can have arbitrary data payload associated with them. The rendering component for the message type will consume and validate that payload data.

Here, we replace the specialized messageTableDataByID with the generalized messagePayloadByID, update corresponding Redux actions, reducers, selectors and tests.

The only place where `tableData` is used is in the `ConsoleApiCall` message type, in the `ConsoleTable` component. We replace it with `payload` which is sent down to all message types anyway.

Differential Revision: https://phabricator.services.mozilla.com/D33975
2019-06-06 15:25:20 +00:00
Nicolas Chevobbe 1ddd423224 Bug 1525618 - Add an option in the settings panel to toggle warning groups. r=Honza.
We also listen for the warningGroup preference change to
toggle warningGroups in the console output.
If warningGroups were disabled, we need to loop through
the state messages to create warningGroups when needed.
A test is added to ensure this works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D32716
2019-06-03 15:10:45 +00:00
Razvan Caliman 4c1405c671 Bug 1093953 - (Part 1) Make CSS warnings expandable to show affected DOM elements. r=Honza
This patch builds on [Bug 1537876](https://bugzilla.mozilla.org/show_bug.cgi?id=1537876) which associates CSS selectors with error messages where applicable.

This patch introduces a new React component, `CSSWarning`, for messages of type CSS. It forks the`PageError` component which was shared for `LOG` messages of type `JAVASCRIPT` and type `CSS`.

The `CSSWarning` component is expandable when the message has an associated CSS selector. When expanded, it runs a `document.querySelectorAll()` command to list all elements matching the selector. Clicking on any of the elements in the result jumps to the Inspector and select the corresponding node in the markup view.

Not all errors have associated CSS selectors. Not all selectors match elements. The errors/warnings are a result of the CSS Parser; there is no guarantee that the CSS rule is used anywhere on the document. The query may return an empty `NodeList`.

Differential Revision: https://phabricator.services.mozilla.com/D28457
2019-05-03 13:01:27 +00:00
Brian Hackett 08eb9946a6 Bug 1538781 - Use the right thread for console evaluations when paused in a worker thread's frame, r=nchevobbe.
Differential Revision: https://phabricator.services.mozilla.com/D27625
2019-04-15 13:27:53 -10:00
Nicolas Chevobbe b4d4f3592b Bug 1260877 - Display a Show content messages checkbox in Browser Console. r=bgrins.
A preference is added to enable this feature, another one
to store the last value of the checkbox.
When unchecked, the console hides all the messages that
don't originate from a chrome contect, via the `chromeContext`
property on the message.

Since we already have a test to check that content messages are
displayed in the console output, we use it to assert the
effects of the "Show content messages" checkbox.

Differential Revision: https://phabricator.services.mozilla.com/D26337
2019-04-16 09:09:01 +00:00
Razvan Maries d16edcade6 Backed out 3 changesets (bug 1260877) for perma dt fails on devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_check_stubs_page_error.js. CLOSED TREE
Backed out changeset 10fd2d1f0fa2 (bug 1260877)
Backed out changeset e4f28c656165 (bug 1260877)
Backed out changeset 17059c813d40 (bug 1260877)
2019-04-16 10:09:37 +03:00
Nicolas Chevobbe cc148bf0fe Bug 1260877 - Display a Show content messages checkbox in Browser Console. r=bgrins.
A preference is added to enable this feature, another one
to store the last value of the checkbox.
When unchecked, the console hides all the messages that
don't originate from a chrome contect, via the `chromeContext`
property on the message.

Since we already have a test to check that content messages are
displayed in the console output, we use it to assert the
effects of the "Show content messages" checkbox.

Differential Revision: https://phabricator.services.mozilla.com/D26337
2019-04-16 05:32:49 +00:00
Brian Hackett 1ac9b8ac92 Bug 1530133 Part 2 - Allow clearing console messages by their logpoint ID, r=nchevobbe. 2019-02-23 16:19:17 -10:00
Martin Koroknay f4bdfd8c88 Bug 1523861 - Remove toggle filter button and always show the filter buttons toolbar. r=nchevobbe
Removes the toggle filter button and makes the filter buttons toolbar permanently shown. At the same time removes relevant entries from actions/reducers. Also updates some tests which relied on showing and hiding the filter buttons toolbar. Also amends an unrelated test which relied on the non-presence of the filter buttons toolbar.

Differential Revision: https://phabricator.services.mozilla.com/D18504
2019-02-04 13:22:36 +00:00
Jared Wein 775f9ac08e Bug 1521170 - Add a rule that prevents calling some Array and String accessor methods without using the return value. r=Standard8,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D17020
2019-01-23 17:03:32 +00:00
shindli 9cd800c1c9 Backed out changeset c9f087ff5a52 (bug 1521170) for X2 / TV failures CLOSED TREE 2019-01-23 02:29:37 +02:00
Jared Wein c5336ab653 Bug 1521170 - Add a rule that prevents calling some Array and String accessor methods without using the return value. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D17020
2019-01-22 23:02:24 +00:00
Nicolas Chevobbe 2c070dbd75 Bug 1489491 - Populate reverse search with input text selection; r=bgrins.
If the user selected some text in the console input
and opens the reverse search UI, we populate the
reverse search input with the selected text and do
a reverse search with this text.
A test is added to ensure this works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D16843
2019-01-18 13:20:44 +00:00
Nicolas Chevobbe 713ac4cdc2 Bug 1499289 - Allow to invoke getters from webconsole autocomplete function; r=bgrins,flod.
This patch introduces a new component, ConfirmDialog, that will
be rendered on screen when the autocomplete service indicates
that there's an unsafe getter in the completion path.
The component is rendered in the toolbox document, like the
autocomplete popup. In order to still write it in React, it uses
a React portal, which allow to render an element outside of the
React component tree.

Tests are added to make sure the dialog works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D12943
2019-01-07 17:53:55 +00:00
Nicolas Chevobbe eedf1c8f96 Bug 1513244 - Extract fetchAutocompleteProperties from JsTerm into a Redux action; r=Honza.
The functions needed to build the autocomplete request are moved
to the serviceContainer so it can be called from everywhere in
the code, and not only from the JsTerm.

Differential Revision: https://phabricator.services.mozilla.com/D12939
2018-12-13 17:38:06 +00:00
shindli 7a353f19fc Backed out changeset 3fa4474f947c (bug 1499289) as requested by nchevobbe 2018-12-13 18:30:11 +02:00
Nicolas Chevobbe 9ede15bd8b Bug 1499289 - Bug 1513244 - Extract fetchAutocompleteProperties from JsTerm into a Redux action; r=Honza.
The functions needed to build the autocomplete request are moved
to the serviceContainer so it can be called from everywhere in
the code, and not only from the JsTerm.

Differential Revision: https://phabricator.services.mozilla.com/D12939
2018-12-13 14:37:20 +00:00
Nicolas Chevobbe 79147a9c34 Bug 1216632 - Make autocompletion work on $_ and $0; r=bgrins.
To make $0 autocompletion work, we need to pass the current
selectedNode actor from the frontend, so we can retrieve the
object reference later.
For $_, we need the webconsole actor reference to be able
to retrieve the last input result.
Since the list of parameters of JsPropertyProviders was
getting a bit long, we transform them in an object so it's
more legible on the consumer side.
Mochitests are added for both helpers to ensure this work
as expected.

Differential Revision: https://phabricator.services.mozilla.com/D11866
2018-11-15 09:49:14 +00:00
Nicolas Chevobbe 1216204781 Bug 1462394 - Handle autocompletion data fetching and caching in Redux; r=Honza.
This patch moves all the logic we currently have
baked-in JsTerm to handle the autocompletion data:
- deciding to fetch from the server or the cache
- handling concurrent requests
- managing the cache.

This is now done through dedicated Redux actions and reducers.
In the JsTerm, where the autocompletePopup still lives, we
handle those data changes in componentWillReceiveProps.

Some tests were modified in order to pass with these changes.

Differential Revision: https://phabricator.services.mozilla.com/D11454
2018-11-12 16:07:37 +00:00
Mark Banner 3d6aaad3f5 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389
2018-10-19 12:55:39 +00:00
Jason Laster e283e89e72 Bug 1496468 - Add a console pause indicator. r=loganfsmyth
Differential Revision: https://phabricator.services.mozilla.com/D7741
2018-10-04 20:14:53 +00:00
Jason Laster 7d999d369f Bug 1491471 - Move the OI store to the console. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D5911
2018-09-27 20:09:51 +00:00
Nicolas Chevobbe cd01f072ab Bug 1024913 - Enable reverse search in jsterm; r=bgrins,flod.
Differential Revision: https://phabricator.services.mozilla.com/D3114
2018-09-10 10:24:40 +00:00
Margareta Eliza Balazs 932d871487 Backed out 5 changesets (bug 1024913) for causing perma damp failures. CLOSED TREE
Backed out changeset 1c18e0422ffa (bug 1024913)
Backed out changeset c4e5a7ff8e53 (bug 1024913)
Backed out changeset 7f269add6e54 (bug 1024913)
Backed out changeset ccd6afc2a739 (bug 1024913)
Backed out changeset 1613377c1b43 (bug 1024913)
2018-09-10 10:25:32 +03:00
Nicolas Chevobbe f03d9b555b Bug 1024913 - Enable reverse search in jsterm; r=bgrins,flod.
Differential Revision: https://phabricator.services.mozilla.com/D3114
2018-09-10 05:16:00 +00:00
Jan Odvarko 01ca5dc6e2 Bug 1465352 - Clean up history reducer state; r=nchevobbe
MozReview-Commit-ID: LgWQ5fe7WXJ
2018-07-19 14:26:34 +02:00
Nicolas Chevobbe 95f755531f Bug 1419081 - Cmd/Ctrl + click should put object in the sidebar; r=Honza.
In order to do that, we pass an onCmdCtrlClick to the ObjectInspector.
We also extract the dispatching of the SHOW_OBJECT_IN_SIDEBAR action to
its own function so it can be called directly with a grip.
browser_webconsole_object_in_sidebar is renamed and repurposed to test
this specific behavior, since there's already a test checking the context
menu way (browser_webconsole_context_menu_object_in_sidebar.js).

MozReview-Commit-ID: GCF1wFPWTH
2018-04-19 10:54:36 +02:00
Julian Descottes 82711b9a8f Bug 1454696 - Run eslint --fix for prefer-const;r=yulia
MozReview-Commit-ID: F6xUXCgdRE4
2018-06-01 12:36:09 +02:00
Jan Odvarko ebaaa2b8b3 Bug 1462390 - Extract history from JSTerm component; r=nchevobbe
MozReview-Commit-ID: DTlW1h2ACoI
2018-05-31 12:41:29 +02:00
Mantaroh Yoshinaga 8d21860363 Bug 1444302 - Part 1. Add the close button into the split console. r=nchevobbe
This patch will display the button of closing split console. The FilterBar
should display this close button if target is split console.

MozReview-Commit-ID: 29VjaqHdh2S
2018-04-02 16:10:53 +09:00
Jan Odvarko f550f61eb4 Bug 1425538 - Use NotificationBox as regular React element; r=nchevobbe
MozReview-Commit-ID: AHvRWfRd1XY
2018-05-16 17:38:06 +02:00
Andreea Pavel fd5c74a55a Backed out changeset 8d0caf759080 (bug 1425538) for failing devtools/client/webconsole/test/mochitest/browser_jsterm_selfxss.js on a CLOSED TREE 2018-05-16 09:49:32 +03:00
Jan Odvarko 64e674c770 Bug 1425538 - Use NotificationBox as regular React element; r=nchevobbe
MozReview-Commit-ID: DRbxfnqMMvV
2018-05-16 07:12:40 +02:00
Nicolas Chevobbe e1aae8e4ed Bug 1451821 - Move new-console-output content one folder up; r=jdescottes.
Now that the old frontend is in a dedicated folder, we can
remove the new-console-output folder and move its content
to devtools/client/webconsole, which will prevent confusion
while the old frontend is still around.

MozReview-Commit-ID: 57yM7IZhmAK
2018-04-06 15:03:20 +02:00