Network left side bar should have a toggle button
Categories
(DevTools :: Netmonitor, defect, P3)
Tracking
(firefox75 verified)
Tracking | Status | |
---|---|---|
firefox75 | --- | verified |
People
(Reporter: Honza, Assigned: pranavpandey1998official)
References
(Blocks 2 open bugs)
Details
(Keywords: good-first-bug)
Attachments
(1 file)
We introduced a new left aligned side bar in the Network panel in bug 1580530
This side bar is already used for:
- Search
- Request Blocking
It should have a toggle button just like the Network details (right aligned) bar has.
Consequently we can remove the close button from the Search panel
Some pointers:
- Toggle button for the Details panel is specified here:
https://searchfox.org/mozilla-central/rev/7ed8e2d3d1d7a1464ba42763a33fd2e60efcaedc/devtools/client/netmonitor/src/components/TabboxPanel.js#115-122
We need to do similar thing for NetworkActionBar
component (introduced in bug 1580530)
-
The state of the
NetworkActionBar
should be stored inui
reducer - along side the flag for the Details panel
https://searchfox.org/mozilla-central/rev/7ed8e2d3d1d7a1464ba42763a33fd2e60efcaedc/devtools/client/netmonitor/src/reducers/ui.js#75 -
We also need an action
toggleActionBar
andopenActionBar
implemented along side the existingtoggleNetworkDetails
.
toggleNetworkDetails
- The alignment of the toggle button should be on the right side (not on the left, like in the Details panel)
This requires a new flag passed in the sidebarToggleButton
object:
https://searchfox.org/mozilla-central/rev/7ed8e2d3d1d7a1464ba42763a33fd2e60efcaedc/devtools/client/netmonitor/src/components/TabboxPanel.js#115-122
Could be e.g.: alignRight
set to false by default.
The position can be easily changed by changing the order in which components are rendered here
The All Tabs Menu
will probably overlap the button, so we need to either move it to the left or change right-padding of the toggle buttong
Here is an example of how to change the order of components
return dom.nav(
{ className: "tabs-navigation" },
sidebarToggle,
dom.ul({ className: "tabs-menu", role: "tablist" }, tabs),
allTabsMenu,
);
- The icon of the toggle button should be transformed to point the other direction. We can use CSS
.network-monitor .sidebar-toggle.alignRight {
transform: scaleX(-1);
}
- Must be tested in both RTL/LTR modes
useintl.uidirection
pref to switch between those modes.
Honza
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
Harald, what do you think about the button? We are currently opening/closing Search and Blocking side panels from the Toolbar so, there is a way for the user to go there. But, having the button would be consistent with the Details side bar (on the right side of the Network panel).
What do you think?
Honza
Comment 2•4 years ago
|
||
Makes sense to follow the same tab/toggle button that the right panel has as it doesn't take much space and is consistent.
Reporter | ||
Comment 3•4 years ago
|
||
I am marking this as good-first-bug
but, it might rather be good-second-bug
.
Honza
Assignee | ||
Comment 4•4 years ago
|
||
hi can I work on this issue
Reporter | ||
Comment 5•4 years ago
|
||
Assigned to you, thanks for the help.
Honza
Assignee | ||
Comment 6•4 years ago
|
||
Hi honza right now the logic of opening and closing the action bar is handled mainly in search actions and its state is also stored and handled via search reducer https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/src/reducers/search.js#35 do you want me to remove that logic as you mention to manage its state via UI reduces. I think removing it would be a good idea as toggleRequestBlockingPanel is dispatching OPEN_SEARCH and then changing action bar tab to panel blocking is kind of confusing .https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/src/actions/request-blocking.js#22
Pranav
Assignee | ||
Comment 7•4 years ago
|
||
Pushed by jodvarko@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d20ce0c23b7b - added toggle button to network details. r=Honza
Comment 9•4 years ago
|
||
bugherder |
Comment 10•4 years ago
|
||
Verified with 75.0a1 (2020-02-24) on Windows 10, macOS 10.13, Kubuntu19.
Description
•