Closed
Bug 1559398
Opened 6 years ago
Closed 6 years ago
Implement table and preview sections in WebSocket side panel
Categories
(DevTools :: Netmonitor, enhancement, P2)
DevTools
Netmonitor
Tracking
(firefox69 fixed)
RESOLVED
FIXED
Firefox 69
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: Honza, Assigned: tanhengyeow)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
This is a follow up for bug 1555625 introducing a new side panel for WebSockets frames.
This bug should:
- Introduce a table for list of frames (list of columns spec is in PRD)
- Introduce a preview section for payload
- Use Splitter component to separate table and preview sections
https://searchfox.org/mozilla-central/source/devtools/client/shared/components/splitter/SplitBox.js
Honza
Reporter | ||
Updated•6 years ago
|
Assignee: nobody → E0032242
Blocks: network-websocket-inspector
Status: NEW → ASSIGNED
Type: defect → enhancement
Depends on: 1555625
Priority: -- → P2
Assignee | ||
Comment 1•6 years ago
|
||
Implement table and preview sections in WebSocket side panel.
Reporter | ||
Updated•6 years ago
|
Whiteboard: [ws]
Reporter | ||
Updated•6 years ago
|
Whiteboard: [ws]
Pushed by jodvarko@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/42fa48dca988
Implement table and preview sections in WebSocket side panel. r=Honza
Comment 3•6 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox69:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
Assignee | ||
Comment 4•6 years ago
|
||
Summary of final patch:
-
New Redux support added:
- Actions:
- Added
selectFrame
function of typeWS_SELECT_FRAME
. Triggered when a WebSocket frame is selected. - Added
openFrameDetails
function of typeWS_OPEN_FRAME_DETAILS
. Triggered based on context (explained later).
- Added
- Store: Added field
selectedFrame
(represents a WebSocket frame) andframeDetailsOpen
(represents the view status ofFramePayload
component). - Reducers:
- Added
selectFrame
function that adds theselectedFrame
(object) andframeDetailsOpen
(boolean) to the store. - Added
openFrameDetails
function that adds theframeDetailsOpen
(boolean) to the store.
- Added
- Selectors:
- Added
isSelectedFrameVisible
function that checks if theselectedFrame
is visible in the viewport. - Added
getSelectedFrame
function to fetch the current selected frame.
- Added
- Actions:
-
Updated the
WebSocketsPanel
component. The component is organized into the following structure:SplitBox
component demarcates two distinct components through a splitter between two panels. ThestartPanel
is theFrameListContent
component and theendPanel
is theFramePayload
component.- The
FrameListContent
component shows the table of WebSocket frames. - The
FramePayload
component shows the full payload of a WebSocket frame when it is being selected. - If the selected frame is not visible in the viewport (checked through
isSelectedFrameVisible
), theFramePayload
component would not be shown (decided by theframeDetailsOpen
boolean).
-
New
FrameListContent
component in detail- Contains the new
FrameListHeader
component, representing the table headers. - Contains an array of
FrameListItem
components, which makes up the table body. EachFrameListItem
represents a table row, and each table cell is rendered in different columns based on the fields present in a WebSocket frame. The list ofColumnComponent
can be found indevtools/client/netmonitor/src/components/websockets
. - When a
FrameListItem
component is clicked, theonMouseDown
event is triggered, which dispatches theselectFrame
action.
- Contains the new
-
New
FramePayload
component in detail- Shows the full payload of a WebSocket frame.
- The payload is unwrapped from the
LongStringActor
object through a new helper methodgetFramePayload
(inrequest-utils.js
). The helper method executesconnector.getLongString(payload)
, an async function. - Before the async function resolves, the
FramePayload
component renders an emptypayload
, which is set as a state. The component rerenders again with the help ofsetState({ payload })
when the result is resolved.
Reporter | ||
Updated•6 years ago
|
Blocks: network-websocket-inspector-m1
You need to log in
before you can comment on or make changes to this bug.
Description
•