Closed
Bug 1414688
Opened 7 years ago
Closed 7 years ago
JSON viewer should not be opened automatically when opening about:telemetry in RTL locales
Categories
(Toolkit :: Telemetry, defect, P1)
Toolkit
Telemetry
Tracking
()
RESOLVED
FIXED
mozilla59
People
(Reporter: magicp.jp, Assigned: adbugger)
Details
Attachments
(3 files, 1 obsolete file)
Steps to reproduce:
1. Start Firefox in RTL locales (e.g. ar)
2. Open "about:telemetry"
Actual Results:
JSON viewer will be opened automatically.
Expected Results:
JSON viewer should not be opened automatically in RTL locales.
Updated•7 years ago
|
Updated•7 years ago
|
Priority: P2 → P1
Assignee | ||
Comment 1•7 years ago
|
||
Hi,
I would like to work on this bug. Can you tell how to start Firefox in RTL mode? For now, I am doing these two things:
1. Changing intl.uidirection = 1 in about:config
2. Going to about:telemetry and typing document.body.dir = 'rtl' in the console.
While everything is in RTL layout, I am unable to reproduce the error. I suspect it only happens when you change the locale before starting up? Could you tell me how to emulate that behaviour without changing the language, since I don't know any language that requires RTL?
Also, in general, how do I change the locale in Nightly? I worked on a similar bug recently and needed to do the same.
Flags: needinfo?(magicp.jp)
Comment 2•7 years ago
|
||
https://dxr.mozilla.org/mozilla-central/source/toolkit/content/aboutTelemetry.js#1154 is the code, and the error message is:
hgram.buckets is undefined
Tested on an Arabic mac Nightly.
Flags: needinfo?(magicp.jp)
Assignee | ||
Comment 3•7 years ago
|
||
The hgram object has no property 'buckets'. hgram.values exists and hgram.values.reverse() does not throw any errors. For now, simply commenting out the 'hgram.buckets.reverse()' line works.
I understand that the values in a histogram need to be reversed for RTL modes but I also think that the buckets is a remnant from a previous version of the code with a specific function. What is that line supposed to do? The buckets property is not mentioned anywhere else in aboutTelemetry.js.
Flags: needinfo?(gfritzsche)
Assignee | ||
Comment 4•7 years ago
|
||
Alright, so according to :Dexter from #telemetry, this is indeed a remnant from older versions when histograms had a 'bucket' field. That was refactored in bug 112480: https://bugzilla.mozilla.org/show_bug.cgi?id=1122480.
The appropriate fix for this seems to be deleting the 'hgram.buckets.reverse()' line. Uploading initial patch. Please take a look.
Flags: needinfo?(gfritzsche)
Comment 5•7 years ago
|
||
Do the histograms displayed by about:telemetry have the low-value buckets on the right with your change?
Assignee: nobody → adibhar97
Status: NEW → ASSIGNED
Flags: needinfo?(adibhar97)
Assignee | ||
Comment 6•7 years ago
|
||
Yes, it looks like the lower valued buckets are on the right with my change. Screenshot attached.
Flags: needinfo?(adibhar97) → needinfo?(chutten)
Comment 7•7 years ago
|
||
Excellent! Form this into a commit with a good message and I'll give it a review.
Flags: needinfo?(chutten)
Assignee | ||
Comment 8•7 years ago
|
||
Submitting patch for review.
Attachment #8928956 -
Attachment is obsolete: true
Attachment #8929042 -
Flags: review?(chutten)
Comment 9•7 years ago
|
||
Comment on attachment 8929042 [details] [diff] [review]
Removed call to hgram.buckets.reverse().
Review of attachment 8929042 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me!
Attachment #8929042 -
Flags: review?(chutten) → review+
Updated•7 years ago
|
Keywords: checkin-needed
Comment 10•7 years ago
|
||
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f8ea0fdcd066
Fix about:telemetry page in RTL locales opens JSON viewer. r=chutten
Keywords: checkin-needed
Comment 11•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Comment 12•7 years ago
|
||
I have reprodcued this bug with Nightly 58.0a1 (2017-11-05) - AR on Windows 10, 6 Bit!
This bug's fix is verified with Latest Latest Nightly (Arabic build)!
Build ID : 20171201100115
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
QA Whiteboard: [bugday-20171129]
Updated•7 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•