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 external 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•7 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•7 years ago
|
||
Implement Toolbar for WebSocketsPanel.
Updated•7 years ago
|
Updated•7 years ago
|
Comment 4•7 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•7 years ago
|
||
Summary of final patch:
-
New Redux support added:
- Actions:
- Added
clearFramesfunction of typeWS_CLEAR_FRAMES. Triggered when the clear button is clicked. - Added
toggleFrameFilterTypefunction 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
setFrameFilterTextfunction 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
setChannelIdfunction 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). TheframeFilterTextis 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
clearFramesfunction that removes all frames corresponding to thecurrentChannelIdin the store. Frames belonging to other channel ids would be preserved. The currentframeFilterType, andframeFilterTextare preserved as well. - Added
toggleFrameFilterTypefunction that updatesframeFilterTypeto the user-specified filter type ("All", "Received" or "Sent"). - Added
setFrameFilterTextfunction that updatesframeFilterTextto the user specified string keyed in the filter box.
- Added
- Selectors:
- Added
getDisplayedFramesfunction 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
WebSocketsPanelcomponent is the parent of the newToolBarcomponent. Inside theToolBarcomponent, it contains a new componentFrameFilterMenuwhich represents the dropdown menu used for filtering frames. - The
ToolBarcomponent holds the clear button used to clear frames, the dropdown menu, and the filter box. - The
WebSocketsPanelcomponent has access to the filter box present in theToolBarcomponent 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
WebSocketspanel toMessagesinstead. - Changing the name of the
Payloadcolumn toDatainstead. - 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•7 years ago
|
||
| bugherder | ||
| Reporter | ||
Updated•7 years ago
|
Description
•