Toolbar for Messages side panel
Categories
(DevTools :: Netmonitor, enhancement, P2)
Tracking
(firefox70 fixed)
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: Honza, Assigned: tanhengyeow)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Implement a Toolbar for Messages side panel. The following actions should be available:
- Clear button - removes all frames from the list
- Filter (all, sent, received) - filters content of the list
Honza
Reporter | ||
Comment 1•5 years ago
|
||
Some pointers:
-
Existing Toolbar component in the Network panel
https://searchfox.org/mozilla-central/rev/7556a400affa9eb99e522d2d17c40689fa23a729/devtools/client/netmonitor/src/components/Toolbar.js#69 -
We need proper Redux action objects for all toolbar buttons.
Honza
Assignee | ||
Comment 2•5 years ago
|
||
Implement Toolbar for WebSocketsPanel.
Updated•5 years ago
|
Updated•5 years ago
|
Comment 4•5 years ago
|
||
Backed out changeset f5d458cf80ae (Bug 1555628) for ES lint failure on WebSocketsPanel.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/21fe727a9ebaff6d7842bb45594299da66ae5efd
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=255987674&repo=autoland&lineNumber=228
[task 2019-07-11T17:34:49.146Z] copying build/lib.linux-x86_64-2.7/psutil/_psutil_posix.so -> psutil
[task 2019-07-11T17:34:49.146Z]
[task 2019-07-11T17:34:49.146Z] Error processing command. Ignoring because optional. (optional:packages.txt:comm/build/virtualenv_packages.txt)
[task 2019-07-11T17:34:51.956Z] yarn v^1.16.0 needs to be installed locally.
[task 2019-07-11T17:34:51.956Z] Installing eslint for mach using "/usr/local/bin/node /usr/local/bin/npm install --loglevel=error"...
[task 2019-07-11T17:34:51.957Z]
[task 2019-07-11T17:34:51.957Z] eslint installed successfully!
[task 2019-07-11T17:34:51.957Z]
[task 2019-07-11T17:34:51.957Z] NOTE: Your local eslint binary is at /builds/worker/checkouts/gecko/node_modules/.bin/eslint
[task 2019-07-11T17:34:51.957Z]
[task 2019-07-11T17:49:00.208Z] TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/devtools/client/netmonitor/src/components/websockets/WebSocketsPanel.js:81:12 | Replace ???????frameDetailsOpen,???????connector,???????selectedFrame,????
with ?frameDetailsOpen,?connector,?selectedFrame
(prettier/prettier)
[taskcluster 2019-07-11 17:49:00.759Z] === Task Finished ===
[taskcluster 2019-07-11 17:49:01.621Z] Unsuccessful task run with exit code: 1 completed in 1093.84 seconds
Assignee | ||
Comment 7•5 years ago
|
||
Summary of final patch:
-
New Redux support added:
- Actions:
- Added
clearFrames
function of typeWS_CLEAR_FRAMES
. Triggered when the clear button is clicked. - Added
toggleFrameFilterType
function of typeWS_TOGGLE_FRAME_FILTER_TYPE
. Triggered when users select a filter type in the dropdown menu to filter for a certain type of frame. Options are "All", "Received" and "Sent". - Added
setFrameFilterText
function of typeWS_SET_REQUEST_FILTER_TEXT
. Triggered for every keystroke that users input in the filter box.
- Added
- Store:
- Added
frameFilterText
, which represents the current filter text in the filter box. This is shared across all WebSocket (WS) requests. - Added
frameFilterType
, which represents the current filter type. This is shared across all WS requests. - Added
currentChannelId
, which represents the channel id of the selected WS request.
- Added
- Reducers:
- Added
setChannelId
function that sets the current channel id affiliated with the WS request. This reducer is triggered when a request is selected (corresponds to an action type ofSELECT_REQUEST
). TheframeFilterText
is also set to an empty string at this point because the default filter text should be an empty string for a new WS request. A common scenario that triggers this reducer is when users switch between different WS requests for inspection. - Added
clearFrames
function that removes all frames corresponding to thecurrentChannelId
in the store. Frames belonging to other channel ids would be preserved. The currentframeFilterType
, andframeFilterText
are preserved as well. - Added
toggleFrameFilterType
function that updatesframeFilterType
to the user-specified filter type ("All", "Received" or "Sent"). - Added
setFrameFilterText
function that updatesframeFilterText
to the user specified string keyed in the filter box.
- Added
- Selectors:
- Added
getDisplayedFrames
function that returns an array of frames that are visible to the user. Filter type and filter text are taken into account.
- Added
- Actions:
-
New components and updates to existing components:
- The
WebSocketsPanel
component is the parent of the newToolBar
component. Inside theToolBar
component, it contains a new componentFrameFilterMenu
which represents the dropdown menu used for filtering frames. - The
ToolBar
component holds the clear button used to clear frames, the dropdown menu, and the filter box. - The
WebSocketsPanel
component has access to the filter box present in theToolBar
component through Refs. When a different WS request is clicked, which results in a differentcurrentChannelId
, the filter box would be cleared.
- The
-
Implemented some discussion items found in this discussion thread. They are:
- Having a dropdown menu for filtering frames.
- Changing the name of the
WebSockets
panel toMessages
instead. - Changing the name of the
Payload
column toData
instead. - Using the following time format for frames, HH:mm:ss.SSS where SSS refers to microseconds.
P/S: Refer to this comment for some scenarios that might be useful for QA or testing for this patch.
Comment 8•5 years ago
|
||
bugherder |
Reporter | ||
Updated•5 years ago
|
Description
•