Add button is displayed for storage types which don't support adding items
Categories
(DevTools :: Storage Inspector, task, P3)
Tracking
(firefox84 fixed)
Tracking | Status | |
---|---|---|
firefox84 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
Details
Attachments
(3 files, 1 obsolete file)
We store the supportsXXX flags directly on the UI module instance, whereas the values differ for each type.
this.actorSupportsAddItem = await target.actorHasMethod(
type,
"addItem"
);
this.actorSupportsRemoveItem = await target.actorHasMethod(
type,
"removeItem"
);
this.actorSupportsRemoveAll = await target.actorHasMethod(
type,
"removeAll"
);
this.actorSupportsRemoveAllSessionCookies = await target.actorHasMethod(
type,
"removeAllSessionCookies"
);
It more or less works because the values are recomputed every time we select a category, but it fails in several edge cases:
- trying to right click on a category while another category is selected
- toolbar is not updated correctly, meaning the addItem icon is always displayed even when it is not possible
We are migrating the actorHasMethod calls to traits in Bug 1654762, this is a followup to fix the various bugs related to the way those "supports" traits are handled.
Assignee | ||
Comment 1•4 years ago
|
||
Depends on D84689
This is optional but the current implementation barely works.
We store the supportsXXX flags directly on the UI module instance, whereas the values differ for each type.
It more or less works because the values are recomputed every time we select a category, but it fails in several edge cases:
- trying to right click on a category while another category is selected
- toolbar is not updated correctly, meaning the addItem icon is always displayed even when it is not possible
I can perfectly move that to another bug if that's preferable.
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
Traits support was added to the storage actor in FF80.
Firefox release is now FF81 so we can cleanup the related backward compatibility code.
Assignee | ||
Comment 4•4 years ago
|
||
Depends on D93081
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
Depends on D93082
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/69d93b75a629 [devtools] Remove backward compatibility code from storage-ui::_readSupportsTraits r=ladybenko https://hg.mozilla.org/integration/autoland/rev/1ffeab42bb1e [devtools] Check supports traits directly on individual storage fronts r=ladybenko https://hg.mozilla.org/integration/autoland/rev/0f1a4d0bad71 [devtools] Add a test to check the Add button is hidden for indexedDB r=ladybenko
Comment 7•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/69d93b75a629
https://hg.mozilla.org/mozilla-central/rev/1ffeab42bb1e
https://hg.mozilla.org/mozilla-central/rev/0f1a4d0bad71
Description
•