IndexedDB DevTools does not load more than 50 items
Categories
(DevTools :: Storage Inspector, defect, P2)
Tracking
(firefox103 fixed)
Tracking | Status | |
---|---|---|
firefox103 | --- | fixed |
People
(Reporter: manuforcen, Assigned: miker)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0
Steps to reproduce:
Working with IndexedDB DevTools in a big screen.
Actual results:
When working in a big screen with DevTools on the left (the display shows more than 50 items), scroll event does not trigger, so Firefox won't load more items. The only way to make this work is to make the window smaller in order to start scrolling
Expected results:
There should be a button to load more values, or start loading more values.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Storage: IndexedDB' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 3•2 years ago
|
||
Honza to reproduce and investigate.
Updated•2 years ago
|
Comment 4•2 years ago
|
||
The issue is easily reproducible using the following Test case + STRs
- Load http://odvarko.com/tests/fission/case2/odvarko.com.html
- Open DevTools docked to a side and select the Storage panel
- Maximize the browser window to get maximum vertical space in the Storage panel
- Select "Session Storage -> http://odvarko.com" entry in the left panel
- Use "Add to Session Storage" button to create > 60 items
- Reopen DevTools and again select "Session Storage -> http://odvarko.com"
- You should see just 50 items (suprisingly 52 sometimes)
You can reproduce the same with other data type (e.g. Cookies as well)
-
The storage data table is automatically populated when a host is selected in the left panel:
https://searchfox.org/mozilla-central/rev/3a1b5e963e92d478b2b4c0f0ddbbefd23aacc05e/devtools/client/storage/ui.js#1188 -
Fetching data is done in fetchStorageObjects (with the
reason
set to REASON.POPULATE)
https://searchfox.org/mozilla-central/rev/3a1b5e963e92d478b2b4c0f0ddbbefd23aacc05e/devtools/client/storage/ui.js#865 -
A packet is sent to the server side to fetch the data here
https://searchfox.org/mozilla-central/rev/3a1b5e963e92d478b2b4c0f0ddbbefd23aacc05e/devtools/shared/protocol/Front/FrontClassWithSpec.js#46 -
The packet is handed on the server side here:
https://searchfox.org/mozilla-central/rev/3a1b5e963e92d478b2b4c0f0ddbbefd23aacc05e/devtools/server/actors/storage.js#388
Since nooptions.size
is provided (when populating the table with data) the default is 50 (no matter how big is the table widget on the screen)
https://searchfox.org/mozilla-central/rev/3a1b5e963e92d478b2b4c0f0ddbbefd23aacc05e/devtools/server/actors/storage.js#72 -
When the user scrolls to the bottom of the table the logic handles the scroll event and fetches 50 more items (fetching them using reason
REASON.NEXT_50_ITEMS
)
https://searchfox.org/mozilla-central/rev/3a1b5e963e92d478b2b4c0f0ddbbefd23aacc05e/devtools/client/storage/ui.js#1395
https://searchfox.org/mozilla-central/rev/3a1b5e963e92d478b2b4c0f0ddbbefd23aacc05e/devtools/client/storage/ui.js#1400
Since there is no scrollbar (in the scenario described above), the user can't trigger the scrollevent and there is no way to fetch the rest of the data. The workaround is to make the table widget smaller to force the scrollbar to appear.
Possible solutions
-
Quick and dirty: We can increase the default from 50 to 100
-
Proper solution: When populating the table with data (reason REASON.POPULATE) we can provide
options.size
dynamically calculated based on the current height of the table widget. We should also handle "onresize" event on the data table and fetch more data if there is more visible vertical space.
Honza
Comment 5•2 years ago
|
||
Mike, could this be a good first bug? Or perhaps good-second-bug?
Assignee | ||
Comment 6•2 years ago
|
||
I'll add this to my queue because there are a lot of edge cases where this could get hairy.
Comment 7•2 years ago
|
||
Interestingly we fixed two similar bugs a few years ago (and we have mochitests for both):
- https://bugzilla.mozilla.org/show_bug.cgi?id=1476647
- https://bugzilla.mozilla.org/show_bug.cgi?id=1434579
One fixes a server issue which prevented to return more than 50 items, the other fixes scrolling when toolbox height is too big.
Updated•2 years ago
|
Comment 8•2 years ago
|
||
Oh ok it's really the edge case where we don't have a scrollbar for 50 items. I can't even get that on my screen unless I zoom out DevTools :) But I only have 1080 pixels to work with. The proposed solutions in comment #4 sound good!
Assignee | ||
Comment 9•2 years ago
|
||
There is also option 3: If there is no overflow just grab batches of 50 items until we have overflow... this way we don't care about the size.
I'll have a play.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 10•2 years ago
|
||
Comment 11•2 years ago
|
||
Assignee | ||
Updated•2 years ago
|
Comment 12•2 years ago
|
||
bugherder |
Description
•