List of columns is not properly persistent
Categories
(DevTools :: Netmonitor, defect, P3)
Tracking
(Not tracked)
People
(Reporter: Honza, Unassigned, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug)
STR:
- Open DevTools and select the Network panel
- Load http://janodvarko.cz/test/websockets/
- Click connect and send a few messages
- Select the 101 request and open the Messages panel
- Right click on the column header and customize columns e.g. show g.
opCode
- Clear all messages and send another mesasages -> the
opCode
column is gone
ER: The list of columns should stay the same.
Honza
Reporter | ||
Comment 1•5 years ago
|
||
@Harald, how the persistence should work in this case?
Should we store the columns list in prefs?
Honza
Reporter | ||
Comment 2•5 years ago
|
||
Ah, so the list of columns is actually persistent in prefs
https://searchfox.org/mozilla-central/rev/c80fa7258c935223fe319c5345b58eae85d4c6ae/devtools/client/netmonitor/src/middleware/prefs.js#103
So, this bug is only about solving the bug described in comment #0
Honza
Reporter | ||
Comment 3•5 years ago
|
||
Some instructions:
-
So, here is where we persist list of columns in prefs
https://searchfox.org/mozilla-central/rev/c80fa7258c935223fe319c5345b58eae85d4c6ae/devtools/client/netmonitor/src/middleware/prefs.js#103 -
Here is the default state of columns
https://searchfox.org/mozilla-central/rev/c80fa7258c935223fe319c5345b58eae85d4c6ae/devtools/client/netmonitor/src/reducers/web-sockets.js#23 -
Here is the handler for
clearFrames
https://searchfox.org/mozilla-central/rev/c80fa7258c935223fe319c5345b58eae85d4c6ae/devtools/client/netmonitor/src/reducers/web-sockets.js#112
Looks like calling the WebSocket
ctor is reseting the columns and using the default state instead of the one from prefs
https://searchfox.org/mozilla-central/rev/c80fa7258c935223fe319c5345b58eae85d4c6ae/devtools/client/netmonitor/src/reducers/web-sockets.js#54
Honza
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Description
•