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
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
- 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
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
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
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
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
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
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
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
`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
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
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
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
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