Closed Bug 961599 Opened 7 years ago Closed 7 years ago

[Clock] Sound selection list laylout offset when select a long list

Categories

(Firefox OS Graveyard :: Gaia::Clock, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(tracking-b2g:backlog)

VERIFIED FIXED
1.4 S1 (14feb)
tracking-b2g backlog

People

(Reporter: juwei, Assigned: mcav)

Details

(Whiteboard: [priority][p=3])

Attachments

(2 files)

When select sound in creating new alarm, "Classic Pulse Progressive" will jump into two lines when selected.
My expectation would be a "Classic Pulse Progres..." with a check icon rather than move the rest of the characters into second line.
blocking-b2g: --- → backlog
Whiteboard: [priority][p=3]
It turns out this menu is system-provided, so I can't style it without changing the style for all apps. We might be able to convince them to change it so that if it needs 2 lines, it always takes up 2 lines even when unchecked, rather than just moving when the check gets there. I don't think they would want to use ellipsis system-wide, because it could hide important parts of the text depending on how they use that menu in other apps.

We could rename the sound, but that might not work for all locales. Thoughts?
Flags: needinfo?(jhuang)
Yes you're right. 
I've talked to Harly about it since it might not only happen in clock app but also a building block question. The overall principle for the selection menu is not to change the layout whatever users taps on.
I suggest we rename the sound as "Pulse Progressive"
And consider about the possibility of customise alarm sound in the near future, we should keep the sound name in only 1 line and make a "..." in the end for the rest of it.
The reason I don't recommend multiple lines to fill in all the name is because it probably a very long sentence, especially for track name in music app. People should recognise the music at the beginning of the name I suppose. And of course for all the default sounds we have right now, we could at least make sure each name all fits in 1 line so that people could read it.
Flags: needinfo?(jhuang)
Assignee: nobody → m
Status: NEW → ASSIGNED
Attachment #8371870 - Flags: review?(mmedeiros)
Target Milestone: --- → 1.4 S1 (14feb)
Comment on attachment 8371870 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/16058

the patch fixes the text overflowing to 2 lines but now the "Pulse Progressive" won't display properly after the selection - it probably still uses the old logic, since other sounds still work just fine.

Maybe it would be good to abstract the conversion into a separate module (reusing in both places) and write a test for it. - to avoid getting out of sync.

PS: I would also create a another bug on systems to change the style for options that spans 2 lines (line height is too tall and it should never change amount of lines after selection)
So, I may have inadvertently jumped the gun on having you review that -- I think what you're describing is what I initially realized after I marked you for review. Did you look at it when there were two commits in the patch (as there are now)?
Oh, I see your github comment. Gotcha.
By the way, make sure you delete and recreate your profile-debug folder if you test this locally; I think the localization things only get properly built if you rebuild the profile.
Attachment #8371870 - Flags: review?(mmedeiros)
Comment on attachment 8371870 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/16058

Re-flagging you for review, after refactoring based on your GitHub feedback.
Attachment #8371870 - Flags: review?(mmedeiros)
Comment on attachment 8371870 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/16058

changes looks good and it avoided code duplication, so I'm r+.
Attachment #8371870 - Flags: review?(mmedeiros) → review+
Landed in master:

https://github.com/mozilla-b2g/gaia/commit/deb3fdd105df2dccb8a4405e802eb939797bd977
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
[Verified info]
Gaia      6e71ab4da1b08586ea0c758edb7aa199ee34cd2f
Gecko     https://hg.mozilla.org/mozilla-central/rev/bb030d47c946
BuildID   20140219160202
Version   30.0a1

[Testing result]
PASS
The naming is renamed. I mark it to "VERIFIED"
Status: RESOLVED → VERIFIED
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.