Commit Graph
66 Commits
Author SHA1 Message Date
Mark Banner 3cc3379c8f Bug 1881701 - Change the devtools configurations to work with the ESLint flat configuration.r=devtools-reviewers,profiler-reviewers,julienw,nchevobbe
This consolidates the jest environment definition, and the xpcshell globals into the devtools/.eslintrc.mjs file, for easier configurations.
It also changes the restart of the configurations to work with flat config.

Differential Revision: https://phabricator.services.mozilla.com/D249948
2025-05-24 17:10:59 +00:00
Mark Banner d7c7c5369b Bug 1881701 - Rename many ESLint files to use .mjs. r=frontend-codestyle-reviewers,perftest-reviewers,Gijs,sparky,webcompat-reviewers,twisniewski
This is separate to help preserve history of the files.

Differential Revision: https://phabricator.services.mozilla.com/D249945
2025-05-24 17:10:51 +00:00
Alexandre Poirot 49e23bea5b Bug 1953578 - [devtools] Migrate all usage of react-dom CommonJS module to the ES Module version and remove the CommonJS version. r=profiler-reviewers,devtools-reviewers,canaltinova,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D241280
2025-03-19 13:30:50 +00:00
Alexandre Poirot 9bea8fb282 Bug 1671400 - [devtools] Remove now unused reps stubs. r=devtools-reviewers,frontend-codestyle-reviewers,nchevobbe,mossop
Differential Revision: https://phabricator.services.mozilla.com/D241040
2025-03-11 23:52:21 +00:00
Alexandre Poirot 539c95c4f6 Bug 1929387 - [devtools] Remove object-inspector tests. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D230120
2025-03-05 17:05:57 +00:00
Alexandre Poirot ec42a98f0d Bug 1929387 - [devtools] Remove all Reps tests. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D230119
2025-03-05 17:05:56 +00:00
Nicolas Chevobbe f0790c3bc7 Bug 1950865 - [devtools] Remove "Object" title in ObjectRep. r=devtools-reviewers,ochameau.
This Reps is only displayed for JSON, where we can't have class instances,
so the curly brackets should be enough to indicate this is an object.
Also, we don't show a title for in ArrayRep, so we'll be consistent.

Differential Revision: https://phabricator.services.mozilla.com/D240021
2025-03-04 06:53:21 +00:00
Nicolas Chevobbe 7f06d3d190 Bug 1949793 - [devtools] Display length bubble in ArrayRep, like we do for GripArrayRep. r=devtools-reviewers,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D239169
2025-02-25 14:31:50 +00:00
Stanca Serban 389d4c2477 Backed out changeset fac980cc9810 (bug 1949793) for causing devtools failures in browser_net_params_sorted.js. CLOSED TREE 2025-02-25 11:17:42 +02:00
Nicolas Chevobbe 10897108aa Bug 1949793 - [devtools] Display length bubble in ArrayRep, like we do for GripArrayRep. r=devtools-reviewers,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D239169
2025-02-25 07:37:08 +00:00
Mark Banner d0718e3c69 Bug 1937739. r=frontend-codestyle-reviewers,perftest-reviewers,mossop,sparky
Differential Revision: https://phabricator.services.mozilla.com/D232598
2024-12-19 17:05:08 +00:00
Logan Rosen d24c9d9ff4 Bug 1857834 - auto-formatting with Prettier v3 r=linter-reviewers,webdriver-reviewers,perftest-reviewers,search-reviewers,devtools-reviewers,sync-reviewers,reusable-components-reviewers,profiler-reviewers,dom-storage-reviewers,android-reviewers,firefox-ai-ml-reviewers,hjones,mcheang,mstange,sparky,janv,nchevobbe,tarek,Standard8,markh
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D230598
2024-11-29 15:18:25 +00:00
Alexandre Poirot 27ee6fdd0f Bug 1906125 - [devtools] Unify VirtualizedTree and Tree CSS and move SourcesTree specifics to Tree. r=devtools-reviewers,nchevobbe
- make them both use .theme-twisty to show an arrow icon.
- move some specifics stylings of SourcesTree to the base class.
- make SourcesTree use the arrow React component provided by Tree class.
- use .theme-twisty instead of .arrow (which already implements rotation and colors on expand). But it uses "open" instead of "expanded" classname.
  (VirtualizedTree was already using theme-twisty)

This impacts the Source Tree, ObjectInspector (console, debugger), Watch Expressions, memory panel (dominator view).

Differential Revision: https://phabricator.services.mozilla.com/D215637
2024-07-10 21:25:46 +00:00
Dave Townsend 2af4d349f3 Bug 1864896: Autofix unused function arguments (devtools). r=profiler-reviewers,devtools-reviewers,nchevobbe,julienw
Differential Revision: https://phabricator.services.mozilla.com/D202959
2024-03-05 14:21:15 +00:00
Nicolas Chevobbe 11771bdcb9 Bug 1867726 - [devtools] Handle cross-process iframe content window in previewers. r=devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D196289
2023-12-18 14:36:50 +00:00
Joel Maher 4072dc32c4 Bug 1869590 - Batch 19 - convert remaining mochitest ini to toml. r=aryx,necko-reviewers,devtools-reviewers,dom-storage-reviewers,asuth,valentin,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D196203
2023-12-13 15:44:04 +00:00
Nicolas Chevobbe 7ad78b458f Bug 1844088 - [devtools] Add title on Tree toggle button. r=devtools-reviewers,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D194771
2023-11-27 18:38:23 +00:00
Nicolas Chevobbe 639acf139e Bug 1847517 - [devtools] Tweak preview popup style. r=devtools-reviewers,ochameau.
Don't display the arrow on the root node, and remove the ability to collapse it.
Add a border at the bottom of the root node so it looks like a header
Add a new `HEADER` Rep mode that will be used for the root node, so we're
showing relevant information in this context (e.g. the object type/class name)
but not the preview when it would be redundant with the content of the tooltip.

For example, we don't want to show the preview for simple objects, arrays, maps, …
but we still have a "longer" description for objects where the properties in
the preview are handpicked (e.g. elements, window, document, …)

Differential Revision: https://phabricator.services.mozilla.com/D185770
2023-08-16 09:53:17 +00:00
Iulian Moraru 45c3204b14 Backed out changeset bc9a3a0b8e55 (bug 1847517) for causing Bug 1848531. 2023-08-14 18:55:39 +03:00
Nicolas Chevobbe f95f338df7 Bug 1847517 - [devtools] Tweak preview popup style. r=devtools-reviewers,ochameau.
Don't display the arrow on the root node, and remove the ability to collapse it.
Add a border at the bottom of the root node so it looks like a header
Add a new `HEADER` Rep mode that will be used for the root node, so we're
showing relevant information in this context (e.g. the object type/class name)
but not the preview when it would be redundant with the content of the tooltip.

For example, we don't want to show the preview for simple objects, arrays, maps, …
but we still have a "longer" description for objects where the properties in
the preview are handpicked (e.g. elements, window, document, …)

Differential Revision: https://phabricator.services.mozilla.com/D185770
2023-08-10 10:17:56 +00:00
Nicolas Chevobbe 42eda15d4d Bug 1835990 - [devtools] Don't release underlying object actor on ObjectInspector unmount for debugger tooltip. r=devtools-reviewers,bomsy.
The ObjectInspector releases actors on unmount to avoid
consuming memory, but this introduces unwanted behavior
in the Debugger tooltip as the tooltip can be hidden and
shown again, with the same underlying Object front.
In such case, you were not able to expand any of the
properties anymore, which is very frustrating.
To prevent this, we add a new prop to the ObjectInspector
to drive the auto release of the object actor, and we set
it to false for the tooltip ObjectInspector.
A test case is added to ensure we don't regress this.

Differential Revision: https://phabricator.services.mozilla.com/D179703
2023-06-02 12:16:21 +00:00
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
Mark Banner 91fde42f7b Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Mark Banner 0fadbc1ec4 Bug 1829618 - Enable Prettier on json files (automatic fixes). r=perftest-reviewers,webcompat-reviewers,extension-reviewers,andi,desktop-theme-reviewers,pip-reviewers,devtools-reviewers,sync-reviewers,mossop,denschub,dao,sparky,robwu,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D176336
2023-05-09 16:14:51 +00:00
Nicolas Chevobbe 484e6f8a71 Bug 1777608 - [devtools] Change how we render cropped URLs in String rep. r=bomsy.
Instead of rendering the cropped URL, we split the URL in 3 parts, so the full
URL text will be in the DOM, but we visually hide the middle part and replace
it with an ellipsis.
This way copying the message will still put the full URL in the clipboard.
A test case is added to ensure this works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D165805
2023-02-13 16:01:21 +00:00
Alexandre Poirot 27a1221161 Bug 1812646 - [devtools] Convert base-loader JSM to ESM. r=devtools-reviewers,jdescottes
Having it be a JSM make it so that part of the loader is still using the
shared loader global, which can cause various troubles in the browser toolbox.

Differential Revision: https://phabricator.services.mozilla.com/D167962
2023-01-31 13:46:48 +00:00
Oriol Brufau e3d9727886 Bug 1375328 - Allow single quotes and backticks to quote strings in reps. r=nchevobbe
This will benefit strings coming from outerHTML or JSON.stringify(), which tend
to contain lots of double quotes that had to be escaped.

That's the same approach as Chromium, except that it prioritizes double quotes
over single ones to reduce the change.

Differential Revision: https://phabricator.services.mozilla.com/D165809
2023-01-03 13:09:08 +00:00
Alexandre Poirot a85b82697f Bug 1792847 - [devtools] Use absolute URLs to import modules in devtools/client/shared. r=jdescottes,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D158379
2022-09-30 15:17:39 +00:00
Nicolas Chevobbe 185364abb2 Bug 1787514 - [devtools] Fix failing Reps jest tests. r=ochameau.
A couple test were failing because we're now using :is() in CSS,
which wasn't supported by the older version of jsdom we had.
Updating jsdom seems to fix the issue. It required to mock
TextEncoder and TextDecoder for jest tests.

Differential Revision: https://phabricator.services.mozilla.com/D155813
2022-08-30 16:08:57 +00:00
Nicolas Chevobbe d169f65582 Bug 1787113 - [devtools] Move createGripMapEntry to reps test helper. r=ochameau.
The function is only used in tests, there's no
need for it to be in the Rep.

Differential Revision: https://phabricator.services.mozilla.com/D155562
2022-08-29 09:11:21 +00:00
Nicolas Chevobbe c6b555088c Bug 1786738 - [devtools] Rename grip-map-entry.js to grip-entry.js. r=ochameau.
The file now handles entries for other object types (Header, FormData, URLSearchParams)

Differential Revision: https://phabricator.services.mozilla.com/D155549
2022-08-26 14:51:56 +00:00
Mark Banner 3387a89bc7 Bug 1786197 - Turn on ESLint rule for prefer-boolean-length-check for devtools. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D155167
2022-08-26 13:39:34 +00:00
Mark Banner 6d03c63e2d Bug 1330099 - Enable object-shorthand eslint rule. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D153567
2022-08-03 14:57:05 +00:00
Tooru Fujisawa 2d982760f8 Bug 1773882 - Show getter/setter in array element. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D149042
2022-06-15 05:36:10 +00:00
Nicolas Chevobbe 3e25956f38 Bug 1764764 - [devtools] Automatically generate StyleSheet reps stub. r=bomsy.
generateStubs is modified to accept having an async expression.

Differential Revision: https://phabricator.services.mozilla.com/D143717
2022-04-15 07:23:23 +00:00
Nicolas Chevobbe 86c04c2932 Bug 1763327 - [devtools] Automatically generate Symbol rep stubs. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D143445
2022-04-12 13:32:22 +00:00
Nicolas Chevobbe ba85db5c12 Bug 1763309 - [devtools] Automatically generate text-node stubs. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D143013
2022-04-11 12:17:42 +00:00
Nicolas Chevobbe d7a905ae3d Bug 1762849 - [devtools] Automatically generate DateTime rep stubs. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D142788
2022-04-05 07:47:48 +00:00
Nicolas Chevobbe d8f1d86f05 Bug 1761500 - [devtools] Automatically generate CommentNode rep stub. r=bomsy.
Depends on D140641

Differential Revision: https://phabricator.services.mozilla.com/D142089
2022-03-29 16:05:17 +00:00
Nicolas Chevobbe de5e0645eb Bug 1758666 - [devtools] Automatically generate Window rep stub. r=bomsy
`ownPropertyLength` is different from platform to platform, so we reassign it
the existing value to avoid making the test failing.

Depends on D140354

Differential Revision: https://phabricator.services.mozilla.com/D140641
2022-03-25 15:54:18 +00:00
Butkovits Atila 28ab75e206 Backed out changeset 8be44ea054ca (bug 1758666) for causing dt failures at browser_reps_stubs.js. CLOSED TREE 2022-03-11 11:54:21 +02:00
Nicolas Chevobbe 0f479cefc8 Bug 1758666 - [devtools] Automatically generate Window rep stub. r=bomsy
Depends on D140354

Differential Revision: https://phabricator.services.mozilla.com/D140641
2022-03-11 08:50:46 +00:00
Nicolas Chevobbe a505785c1f Bug 1758140 - [devtools] Automatically generate Attribute rep stub. r=bomsy.
The other auto-generated stubs were generated again, this time without the autolint-fix
so they will stay in the same shape.

Differential Revision: https://phabricator.services.mozilla.com/D140354
2022-03-09 06:01:14 +00:00
Nicolas Chevobbe 3e5481e60b Bug 1757552 - [devtools] Generate actor-less reps stubs.r=bomsy.
This patch is introducing the machinery to automatically generate/check some
stubs used by Reps.
We're focusing on stubs that shouldn't be represented by a front as it's easier
to deal with; we should then have follow up and incremental patches for each
stubs.

Some data can't be retrieved after being serialized/deserialized (`-0`, unsafe int, …),
and in such case the associated test was modified to directly pass the object.

Differential Revision: https://phabricator.services.mozilla.com/D139933
2022-03-03 16:16:50 +00:00
Narcis Beleuzu c349bda855 Backed out 1 changesets (bug 1757552) for lint failure on browser_dummy.js . CLOSED TREE
Backed out changeset 652aee2a723c (bug 1757552)
2022-03-03 17:19:56 +02:00
Nicolas Chevobbe 3afdb55557 Bug 1757552 - [devtools] Generate actor-less reps stubs.r=bomsy.
This patch is introducing the machinery to automatically generate/check some
stubs used by Reps.
We're focusing on stubs that shouldn't be represented by a front as it's easier
to deal with; we should then have follow up and incremental patches for each
stubs.

Some data can't be retrieved after being serialized/deserialized (`-0`, unsafe int, …),
and in such case the associated test was modified to directly pass the object.

Differential Revision: https://phabricator.services.mozilla.com/D139933
2022-03-03 14:47:41 +00:00
Riya 98b768ee4a Bug 1730126 - Enable ESLint rule no-loss-of-precision. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D129336
2021-10-29 08:29:26 +00:00
Oriol Brufau 33cbe88a54 Bug 1695152 - Use StringRep for text node contents. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D127847
2021-10-13 09:56:23 +00:00
Nicolas Chevobbe 9e0f65d27c Bug 1734427 - [devtools] Fix CSSStyleSheet Rep title. r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D127803
2021-10-08 11:40:10 +00:00
nchevobbe a13e7cacbb Bug 1499679 - [devtools] Display private properties in ObjectInspector. r=bomsy,devtools-backward-compat-reviewers.
This patch surface the private properties in Reps and in the ObjectInspector.
Tests cases are added to cover the basic behaviors we want to have in the
same version private fields are shipped in (90).

Differential Revision: https://phabricator.services.mozilla.com/D115685
2021-05-26 12:44:01 +00:00