Closed Bug 1765748 Opened 2 years ago Closed 2 years ago

Change SplitView to be less generic and better suits the style editor

Categories

(DevTools :: Style Editor, task)

task

Tracking

(firefox101 fixed)

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

Attachments

(9 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

As the component was meant to be shared, there are options that are not relevant in the case of the styleeditor.

This allows us to remove the _mql property as well as the LANDSCAPE_MEDIA_QUERY
const.

Depends on D144263

onHide and onDestroy aren't declared from the callsite, we can remove them.

Depends on D144265

Since there's nothing asynchronous happening before the item gets added to the
list, the consumer can directly use the properties of the object returned by
'appendTemplatedItem'.

Depends on D144266

Only the detail element was needed in the callback, so we remove all the other
unnecessary parameters.
This allows us to also remove the data option.

Depends on D144267

The template nodes are retrieved and cached from the constructor so we don't have
to do it for every item we add.

Depends on D144268

The function was setting extra classes on both
the summary and the detail, running extra checks
to not remove the base classes.
It's only called from one place, and we only care
about adding classes to the summary element, which
we have access to directly.
We're switching to classList.(add|remove) , which
allows us to get rid of the SplitView method.

Depends on D144302

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5ce2401d91c6
[devtools] Remove unused SplitView#activeDetails. r=ochameau.
https://hg.mozilla.org/integration/autoland/rev/9b88df83cf78
[devtools] Remove unused SplitView#isLandscape . r=ochameau.
https://hg.mozilla.org/integration/autoland/rev/14bcdcb5e940
[devtools] Turn SplitView.getSummaryElementByOrdinal into a private method. r=ochameau.
https://hg.mozilla.org/integration/autoland/rev/866b20a6bb09
[devtools] Remove unused SplitView#appendItem options. r=ochameau.
https://hg.mozilla.org/integration/autoland/rev/87a35f35fa9a
[devtools] Remove SplitView#appendItem onCreate option. r=ochameau.
https://hg.mozilla.org/integration/autoland/rev/e2b89c9ab773
[devtools] Simplify SplitView#appendItem onShow option. r=ochameau.
https://hg.mozilla.org/integration/autoland/rev/1d349aa089bc
[devtools] Merge SplitView appendTemplateItem and appendItem. r=ochameau.
https://hg.mozilla.org/integration/autoland/rev/ae9861178cd1
[devtools] Remove SplitView active summary getter and rename setter. r=ochameau.
https://hg.mozilla.org/integration/autoland/rev/b454dd94245d
[devtools] Remove unncessary complex SplitView#setItemClassName. r=jdescottes.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: