Commit Graph
40 Commits
Author SHA1 Message Date
Mark Banner 0666077666 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Alexandre Poirot 59fe57c052 Bug 1793396 - [devtools] Use absolute URLs in all usages of loader.lazyRequireGetter. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D158489
2022-10-03 18:57:13 +00:00
Alexandre Poirot 465fac9684 Bug 1792847 - [devtools] Use absolute URLs to import modules in devtools/client/webconsole. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D158380
2022-09-30 15:17:40 +00:00
Hubert Boma Manilla d310c72aff Bug 1775058 - [devtools] Functionality to disable webconsole messages r=nchevobbe
This introduces functionality to support disabling weconsole messages.
Also introduces code to disable all network messages, which would be
used by the netmonitor.

You'll probably need the fullstack of patches to test easily

Will add mochitest in a followup

Differential Revision: https://phabricator.services.mozilla.com/D149753
2022-07-04 17:18:50 +00:00
Nicolas Chevobbe b28876d944 Bug 1776262 - [devtools] Fix stuck to bottom console output. r=jdescottes.
When the last visible message was an evaluation result
but the last message in the store was something else,
the console would trigger the pin-to-bottom behavior.
This is fixed by checking if the last message in the
store (and not the last visible message) is a result.
A test case is added to make sure we don't regress.

Differential Revision: https://phabricator.services.mozilla.com/D150225
2022-06-24 14:38:53 +00:00
Nicolas Chevobbe b2aa9bbb4f Bug 1432343 - [devtools] Mutate messagesById in console redux state. r=ochameau.
The property is renamed, prefixed with `mutable` to better highlight that it is
special; the associated selector is renamed as well.
The only change necessary was adding a `messageCount` prop to the `ConsoleOutput`
component so its lifecycle method could check if the number of messages changed.

Differential Revision: https://phabricator.services.mozilla.com/D138293
2022-02-16 09:03:16 +00:00
Nicolas Chevobbe a1e7221a2f Bug 1754697 - [devtools] Refactor webconsole state management of CSS Warnings matching elements. r=ochameau.
In order to store the matching elements of a CSS warnings, we were having a quite
generic `MESSAGE_UPDATE_PAYLOAD` action and `messagesPayloadById` property in the store.
This was used at some point to also store console.table data (which was retrieved
asynchronously), but is no longer true.
In this patch, we rename the action, property, selector, props and variable that
were using this to make it more specific to the CSS warning matching elements.

We also, directly pass message to messageGetMatchingElements as the component
calling the action already had access to it.

Tests that were using the action are updated so they're about CSS warnings (and
not console.table).

Differential Revision: https://phabricator.services.mozilla.com/D138412
2022-02-16 09:03:15 +00:00
Ricky Stewart 31b8ca9716 Bug 1654103: Standardize on Black for Python code in mozilla-central.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara 612312a64c Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart 065d2eb893 Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 95b44c982f Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 43baed3c18 Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Julian Descottes 104a567eab Bug 1656825 - Fix duplicate calls to lazyRequireGetter r=nchevobbe
Depends on D85288

Differential Revision: https://phabricator.services.mozilla.com/D85720
2020-08-03 07:53:50 +00:00
Nicolas Chevobbe d098714dcc Bug 1616897 - Remove WebReplay-related functions/variables/css rules in devtools. r=jlast.
Differential Revision: https://phabricator.services.mozilla.com/D68514
2020-03-27 15:10:53 +00:00
Brian Hackett 46d73b286c Bug 1602489 - Basic eager evaluation support, r=nchevobbe.
Differential Revision: https://phabricator.services.mozilla.com/D56393
2019-12-12 21:48:03 +00:00
Armando Ferreira ab0447079c Bug 1523868 - Add a doorhanger options menu in console toolbar - Part 1.
Differential Revision: https://phabricator.services.mozilla.com/D47979
2019-10-15 17:04:30 +00:00
Dorel Luca b9570dcb8c Backed out changeset 03643a08fe82 (bug 1523868) for Node failure in Unexpected token y in JSON at position 0. CLOSED TREE 2019-10-15 18:42:20 +03:00
Armando Ferreira 736a79a179 Bug 1523868 - Add a doorhanger options menu in console toolbar - Part 1.
Differential Revision: https://phabricator.services.mozilla.com/D47979
2019-10-15 15:31:32 +00:00
Nicolas Chevobbe 290ba5cb21 Bug 1568779 - Remove editors settings comments in devtools files. r=pbro.
Differential Revision: https://phabricator.services.mozilla.com/D42300
2019-08-19 12:48:16 +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 476067b92d Bug 1559329 - Set "group similar messages" to true by default. r=Honza.
This was making browser_webconsole_scroll.js fail.
After some investigation, I found that the `isInWarningGroup`
prop, a function defined in `mapStateToProp` was causing a
re-rendering (because we were creating a new function each
time), impacting the shouldScrollToBottom behaviour.

To fix this, we no longer create a `isInWarningGroup` prop,
but directly use the `isMessageInWarningGroup` selector, which
was modified to take an array of visible messages instead of
the whole state.

Differential Revision: https://phabricator.services.mozilla.com/D35016
2019-06-27 11:42:15 +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
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
Nicolas Chevobbe 737400a866 Bug 1524276 - Group content blocking messages. r=bgrins,Honza.
If there's at least 2 content blocking messages displayed
for a given page navigation, we display a warning group
containing the messages, collapsed by default.
This means we need to move or insert those warning messages
at the right position in visibleMessages, either when they're
added, or when we expand a group.
Two mochitest are added to make sure this works as expected,
one for generic warningGroup features (expanding, group per
navigation session, …), and another one specifically for
content blocking warning group, where we check that every
type of content blocking message can be grouped.

The grouping won't occur unless the groupWarnings preferences
is on.

Differential Revision: https://phabricator.services.mozilla.com/D23552
2019-03-30 11:09:21 +00:00
Daniel Varga fc6b4f5345 Backed out 4 changesets (bug 1524276) for mochitest-devtools at devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_check_stubs_console_api.js. On a CLOSED TREE
Backed out changeset 78fb95dc20e3 (bug 1524276)
Backed out changeset 30570673a894 (bug 1524276)
Backed out changeset 9476f9253c9c (bug 1524276)
Backed out changeset 6f1c417146be (bug 1524276)
2019-03-29 17:48:19 +02:00
Nicolas Chevobbe d568dc3c1c Bug 1524276 - Group content blocking messages. r=bgrins,Honza.
If there's at least 2 content blocking messages displayed
for a given page navigation, we display a warning group
containing the messages, collapsed by default.
This means we need to move or insert those warning messages
at the right position in visibleMessages, either when they're
added, or when we expand a group.
Two mochitest are added to make sure this works as expected,
one for generic warningGroup features (expanding, group per
navigation session, …), and another one specifically for
content blocking warning group, where we check that every
type of content blocking message can be grouped.

The grouping won't occur unless the groupWarnings preferences
is on.

Differential Revision: https://phabricator.services.mozilla.com/D23552
2019-03-29 14:19:50 +00:00
Daniel Varga dc805f349c Backed out 4 changesets (bug 1524276) for mochitest-devtools failure at devtools/client/webconsole/test/fixtures/stub-generators/browser_webconsole_check_stubs_console_api.js. On a CLOSED TREE
Backed out changeset 47363a80ef6d (bug 1524276)
Backed out changeset 1fee0c357772 (bug 1524276)
Backed out changeset 8bbe3e4f5a54 (bug 1524276)
Backed out changeset d21159afd969 (bug 1524276)
2019-03-29 13:47:46 +02:00
Nicolas Chevobbe b9767a6f31 Bug 1524276 - Group content blocking messages. r=bgrins,Honza.
If there's at least 2 content blocking messages displayed
for a given page navigation, we display a warning group
containing the messages, collapsed by default.
This means we need to move or insert those warning messages
at the right position in visibleMessages, either when they're
added, or when we expand a group.
Two mochitest are added to make sure this works as expected,
one for generic warningGroup features (expanding, group per
navigation session, …), and another one specifically for
content blocking warning group, where we check that every
type of content blocking message can be grouped.

The grouping won't occur unless the groupWarnings preferences
is on.

Differential Revision: https://phabricator.services.mozilla.com/D23552
2019-03-29 08:04:24 +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
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
Jan Odvarko ebaaa2b8b3 Bug 1462390 - Extract history from JSTerm component; r=nchevobbe
MozReview-Commit-ID: DTlW1h2ACoI
2018-05-31 12:41:29 +02: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