Closed
Bug 1350233
Opened 8 years ago
Closed 8 years ago
Add [learn more] MDN link for statistics panel
Categories
(DevTools :: Netmonitor, enhancement, P1)
DevTools
Netmonitor
Tracking
(firefox55 verified)
| Tracking | Status | |
|---|---|---|
| firefox55 | --- | verified |
People
(Reporter: gasolin, Assigned: brennan.brisad, Mentored)
References
Details
(Keywords: dev-doc-needed, good-first-bug, Whiteboard: [netmonitor-reserve])
Attachments
(6 files, 4 obsolete files)
We'd like to have a [Learn More] link to MDN on statistics panel, check
https://developer.mozilla.org/docs/Tools/Network_Monitor#Performance_analysis
Refer Bug 1323454 - Network panel: integrate HTTP Status code with MDN and Bug 1339686 - Convert MDN [learn more] link as a react component
| Reporter | ||
Comment 1•8 years ago
|
||
You need Patch statistics-panel.js
http://searchfox.org/mozilla-central/source/devtools/client/netmonitor/components/statistics-panel.js
and add an MDNLink component at the end of
http://searchfox.org/mozilla-central/source/devtools/client/netmonitor/shared/components/mdn-link.js
Before set it as a good-first-bug, we need find a good place to put the Learn More link in statistics panel...
Blake, any suggestion?
Flags: needinfo?(bwinton)
Priority: -- → P3
Whiteboard: [netmonitor]
Updated•8 years ago
|
Flags: qe-verify?
Priority: P3 → P2
Comment 2•8 years ago
|
||
(In reply to Fred Lin [:gasolin] from comment #0)
> We'd like to have a [Learn More] link to MDN on statistics panel, check
> https://developer.mozilla.org/docs/Tools/Network_Monitor#Performance_analysis
I'm not sure we do. Which MDN url would it lead to?
Flags: needinfo?(bwinton) → needinfo?(gasolin)
| Reporter | ||
Comment 3•8 years ago
|
||
The UI has been discussed between developers (Honza, me, and Ricky) last week, the rational is to help user understand what statistics panel does. So we try to do some simple thing to help user know more about the statistics view.
The link would lead to
https://developer.mozilla.org/docs/Tools/Network_Monitor#Performance_analysis
There seems no obvious place in the statistics panel, maybe add the link in the empty list view?
```
• Click on the O button to start performance analysis. [Learn More]
```
Flags: needinfo?(gasolin) → needinfo?(bwinton)
Comment 4•8 years ago
|
||
So, with no better place to put it, we might as well stick it at the bottom center until the panel gets redesigned…
Flags: needinfo?(bwinton)
Updated•8 years ago
|
Flags: qe-verify? → qe-verify+
QA Contact: ciprian.georgiu
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → brennan.brisad
Updated•8 years ago
|
Status: NEW → ASSIGNED
Priority: P2 → P3
Whiteboard: [netmonitor] → [netmonitor-reserve]
| Assignee | ||
Comment 5•8 years ago
|
||
Should the link be placed in the empty request list view or in the statistics panel? Or perhaps in both?
If a link is placed in the statistics panel at the bottom center it will be right below the vertical splitter, which does not look so nice as the splitter cannot extend all the way to the bottom anymore. I'm attaching a screenshot. Perhaps some clever styling could make that look less bad.
What about putting it on the lower right corner instead, stealing some area from the empty cache chart? And probably lower left for RTL locales.
Flags: needinfo?(gasolin)
| Assignee | ||
Comment 6•8 years ago
|
||
This screenshot suffers from the overflow problem described in Bug 1339558
| Assignee | ||
Comment 7•8 years ago
|
||
Comment 8•8 years ago
|
||
(In reply to Michael Brennan from comment #5)
> Should the link be placed in the empty request list view or in the
> statistics panel? Or perhaps in both?
Both seem reasonable. People often like to know what they're going to get before they click on it.
> What about putting it on the lower right corner instead, stealing some area
> from the empty cache chart? And probably lower left for RTL locales.
WFM.
| Reporter | ||
Comment 9•8 years ago
|
||
Thanks Michael, as Blake said, we can put [Learn More] in both place, and I also prefer put the [Learn More] link on the lower right corner in Statistics View.
Please also check if it shows correctly when we put the whole devtools panel in the right-side of the browser.
Flags: needinfo?(gasolin)
| Reporter | ||
Comment 10•8 years ago
|
||
While deal with URL in `utils/mdn-utils`, it will be nice to distill all `https://developer.mozilla.org/docs/` as `MDN_URL` and construct links as `${MDN_URL}Tools/Network_Monitor#Performance_analysis${GA_PARAMS}`
| Reporter | ||
Updated•8 years ago
|
Mentor: gasolin
Keywords: good-first-bug
| Assignee | ||
Comment 11•8 years ago
|
||
Attaching a patch for feedback.
To keep things simple I've just placed the link in the statistics panel with `position: absolute`. This can make the link overlap with other text if the panels are resized to be too small, but I'm thinking it might not be a problem. What do you think?
The reason for changing `.notice-perf-message` to use `display: flex` is to make the link appear to the left of the text in RTL locales. Don't know if that's the best way to achieve that, but it did make it work.
Attachment #8855496 -
Flags: feedback?(gasolin)
| Reporter | ||
Comment 12•8 years ago
|
||
Comment on attachment 8855496 [details] [diff] [review]
bug1350233.patch
Thanks for the patch!
I've talked with Honza and he suggest put the [Learn More] link near the title of each pie chart(after `Primed cache` & `Empty cache`). Then we don't have change pie chart css to find the room for [Learn More]. We can change [Learn More] to different links later when we have better document for each chart.
```
function getNetMonitorTimingsURL() {
return NETWORK_MONITOR_TIMINGS_MDN_URL;
}
```
We can remove `NETWORK_MONITOR_TIMINGS_MDN_URL` and use the similar pattern to construct the URL.
Attachment #8855496 -
Flags: feedback?(gasolin)
| Assignee | ||
Comment 13•8 years ago
|
||
Thanks for the feedback!
(In reply to Fred Lin [:gasolin] from comment #12)
> I've talked with Honza and he suggest put the [Learn More] link near the
> title of each pie chart(after `Primed cache` & `Empty cache`). Then we don't
> have change pie chart css to find the room for [Learn More]. We can change
> [Learn More] to different links later when we have better document for each
> chart.
Yes, sounds like a good idea. I've implemented it in the patch I'm about to attach. It wasn't that straightforward as Chart isn't a React component. We'll see if my solution is good enough.
>
> ```
> function getNetMonitorTimingsURL() {
> return NETWORK_MONITOR_TIMINGS_MDN_URL;
> }
> ```
>
> We can remove `NETWORK_MONITOR_TIMINGS_MDN_URL` and use the similar pattern
> to construct the URL.
Thanks! That one appeared after I did a rebase so I missed it.
| Assignee | ||
Comment 14•8 years ago
|
||
This also fixes the problem mentioned in https://bugzilla.mozilla.org/show_bug.cgi?id=1324533#c36
Attachment #8855496 -
Attachment is obsolete: true
Attachment #8855770 -
Flags: feedback?(gasolin)
| Assignee | ||
Comment 15•8 years ago
|
||
I forgot to remove the link in statistics-panel.js:295: https://bugzilla.mozilla.org/attachment.cgi?id=8855770&action=diff#a/devtools/client/netmonitor/src/components/statistics-panel.js_sec6
It should of course be removed.
| Reporter | ||
Comment 16•8 years ago
|
||
Comment on attachment 8855770 [details] [diff] [review]
bug1350233.patch
Review of attachment 8855770 [details] [diff] [review]:
-----------------------------------------------------------------
::: devtools/client/netmonitor/src/assets/styles/netmonitor.css
@@ +155,5 @@
>
> .notice-perf-message {
> margin-top: 2px;
> + display: flex;
> + align-items: center;
Look Nice!
@@ +1161,5 @@
> + font-weight: 400;
> +}
> +
> +.statistics-panel .table-chart-title {
> + display: flex;
It seems works fine without this style, do we really need this?
::: devtools/client/netmonitor/src/components/request-list-empty-notice.js
@@ +14,5 @@
> const Actions = require("../actions/index");
> const { ACTIVITY_TYPE } = require("../constants");
> const { L10N } = require("../utils/l10n");
> +const { getPerformanceAnalysisURL } = require("../utils/mdn-utils");
> +const MDNLink = createFactory(require("./mdn-link"));
To keep consistency of declaration (ex network-details-panel.js), we can put related declaration like:
```
const { getPerformanceAnalysisURL } = require("../utils/mdn-utils");
// Components
const MDNLink = createFactory(require("./mdn-link"));
const { button, div, span } = DOM;
```
::: devtools/client/netmonitor/src/components/statistics-panel.js
@@ +25,5 @@
> const { button, div } = DOM;
> const MediaQueryList = window.matchMedia("(min-width: 700px)");
>
> +const { getPerformanceAnalysisURL } = require("../utils/mdn-utils");
> +const MDNLink = createFactory(require("./mdn-link"));
same here,
```
const { L10N } = require("../utils/l10n");
const { getPerformanceAnalysisURL } = require("../utils/mdn-utils");
// Components
const MDNLink = createFactory(require("./mdn-link"));
const { button, div } = DOM;
```
Attachment #8855770 -
Flags: feedback?(gasolin) → feedback+
Comment 17•8 years ago
|
||
(In reply to Michael Brennan from comment #14)
> Created attachment 8855770 [details] [diff] [review]
> bug1350233.patch
Since this is user-facing code, you'll also going to need a ui-review from me. Please add that flag to the patch when you feel it's ready for review.
Thanks! :)
| Assignee | ||
Comment 18•8 years ago
|
||
(In reply to Fred Lin [:gasolin] from comment #16)
> @@ +1161,5 @@
> > + font-weight: 400;
> > +}
> > +
> > +.statistics-panel .table-chart-title {
> > + display: flex;
>
> It seems works fine without this style, do we really need this?
>
It makes the link appear to the left of the title in RTL-locales, at least when I try with force RTL. Please let me know if this is the wrong way to accomplish this.
| Assignee | ||
Comment 19•8 years ago
|
||
Attachment #8855770 -
Attachment is obsolete: true
Attachment #8856734 -
Flags: ui-review?(bwinton)
Attachment #8856734 -
Flags: review?(gasolin)
| Reporter | ||
Comment 20•8 years ago
|
||
Attachment #8856734 -
Flags: review?(gasolin) → review+
Comment 21•8 years ago
|
||
Comment on attachment 8856734 [details] [diff] [review]
bug1350233.patch
It's a little weird to have two links pointing to the same place, but hopefully that'll be resolved sometime soon. :) ui-r=me.
Attachment #8856734 -
Flags: ui-review?(bwinton) → ui-review+
| Comment hidden (mozreview-request) |
| Reporter | ||
Comment 23•8 years ago
|
||
Comment on attachment 8857340 [details]
Bug 1350233 - Add [learn more] MDN link for statistics panel
test green
Attachment #8857340 -
Attachment is obsolete: true
| Reporter | ||
Comment 26•8 years ago
|
||
Michael, could you help rebase the patch with the latest branch?
Flags: needinfo?(brennan.brisad)
| Assignee | ||
Comment 27•8 years ago
|
||
Of course!
Attachment #8856734 -
Attachment is obsolete: true
Flags: needinfo?(brennan.brisad)
| Reporter | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 28•8 years ago
|
||
Pushed by ihsiao@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f20490ec8afe
Add MDN links for netmonitor performance analysis. r=gasolin ui-r=bwinton
Keywords: checkin-needed
Comment 29•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Updated•8 years ago
|
Iteration: --- → 55.3 - Apr 17
Priority: P3 → P1
Comment 30•8 years ago
|
||
Reproduced the issue with Nightly from 2017-04-10.
This is verified fixed on latest Nightly 55.0a1 (2017-04-18) across platforms: Windows 10 x64, Mac OS X 10.11.6 and Ubuntu 16.04 x64 LTS. The [Learn More] link is now displayed on statistics panel.
Comment 31•8 years ago
|
||
Screenshots of the change:
https://screenshots.mattn.ca/compare/?oldProject=mozilla-central&oldRev=3148ecea537e093ec6c8d51527cb4045df8ee275&newProject=mozilla-central&newRev=05c212a94183838f12feebb2c3fd483a6eec18c2&filter=netmon
Note that the learn more link in the list view shifted the baseline of the existing text.
Comment 32•8 years ago
|
||
@Michael: please see comment #31. Maybe it's simple to fix this?
Honza
Flags: needinfo?(brennan.brisad)
| Assignee | ||
Comment 33•8 years ago
|
||
(In reply to Jan Honza Odvarko [:Honza] from comment #32)
> @Michael: please see comment #31. Maybe it's simple to fix this?
>
> Honza
Hi,
I tried with `align-items: baseline` which moved the line a small amount, but it is still different from its original position. I'm not too good with CSS and I don't know how to ensure that the original position is kept while using `display: flex`. Not changing to flex solves this issue, but then the link will still appear to the right of the text with Force RTL.
So I don't know what the best way to solve this is. Is there perhaps a better way to make the link appear correctly in RTL locales without using flexbox?
Flags: needinfo?(brennan.brisad) → needinfo?(odvarko)
Comment 34•8 years ago
|
||
@Tim, any tips? (read from comment #31)
Honza
Flags: needinfo?(odvarko) → needinfo?(ntim.bugs)
Comment 35•8 years ago
|
||
I don't think it's a major issue IMO. The alignment actually looks improved to me.
Flags: needinfo?(ntim.bugs)
Comment 36•8 years ago
|
||
(In reply to Tim Nguyen :ntim from comment #35)
> I don't think it's a major issue IMO. The alignment actually looks improved
> to me.
okay, works for me.
Honza
| Assignee | ||
Comment 37•8 years ago
|
||
This is how it currently looks when the Toolbox is docked to the right
| Assignee | ||
Comment 38•8 years ago
|
||
This is how it probably should look when the Toolbox is docked to the right
| Assignee | ||
Comment 39•8 years ago
|
||
By chance I just noticed that when the Toolbox is docked to the right, things does not look so good. Please see the attached screenshots above. This is because of Flexbox and it's probably best to just get rid of it. Then it will look like in the second screenshot.
As for RTL, I don't know how to solve it. I tried to conditionally put the link either before or after the line with javascript, but I still couldn't get it to work as there is some magic happening automatically with the full stop and the bullet point when I use Force RTL. I don't speak any RTL languages and perhaps I'm overthinking this.
Should I attach a patch that makes this look fine for English, and then leave the RTL-problem for a new bug where someone who knows this can investigate? If it even is a problem, that is.
Flags: needinfo?(odvarko)
Comment 40•8 years ago
|
||
(In reply to Michael Brennan from comment #39)
> By chance I just noticed that when the Toolbox is docked to the right,
> things does not look so good. Please see the attached screenshots above.
> This is because of Flexbox and it's probably best to just get rid of it.
> Then it will look like in the second screenshot.
I can't see this issue on my machine (Win10), see the attached screenshot (btw. the side bar can't be thinner).
In any case, please file a new bug report and we can discuss how to fix the problem. This bug is already closed.
Thanks!
Honza
Flags: needinfo?(odvarko)
| Assignee | ||
Comment 41•8 years ago
|
||
(In reply to Jan Honza Odvarko [:Honza] from comment #40)
> In any case, please file a new bug report and we can discuss how to fix the
> problem. This bug is already closed.
Sure! I've filed Bug 1358814
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•