Closed Bug 1036796 Opened 10 years ago Closed 10 years ago

[Keyboard] "ABC " and "12&" size need to be the same

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-v2.1 fixed)

RESOLVED FIXED
2.1 S3 (29aug)
Tracking Status
b2g-v2.1 --- fixed

People

(Reporter: Carol, Assigned: rudyl)

References

Details

(Whiteboard: [p=1])

Attachments

(1 file)

Please adjust the sizes of "ABC " and "12&" both to 1.8 rem for all the built-in Keyboards, thanks!
Whiteboard: [good first bug][lang=css][mentor-lang=zh][mentor=Rudy]
Mentor: rlu
Whiteboard: [good first bug][lang=css][mentor-lang=zh][mentor=Rudy] → [good first bug][lang=css][mentor-lang=zh]
If you could guide me a bit, I would love to work on this bug.
Trishul,

at the CSS we have

.keyboard-key.special-key.switch-key > .visual-wrapper > .key-element {
    font-size: 1.8rem;
}

At the default layout this layout is applied to the switch key but at the alt layout it isn't since you haven't ".switch-key". You need to change apps/keyboard/js/keyboard/layout_manager.js to add the necessary class to the key.

Do you need more information?
Flags: needinfo?(trishul.goel)
Great, that's all I need and will submit the required patch asap...
Flags: needinfo?(trishul.goel)
Hi, 
Unfortunately I am too occupied to work on this but sudheesh is willing to work on it
Flags: needinfo?(sudheesh1995)
(In reply to Raniere Silva from comment #2)
> Trishul,
> 
> at the CSS we have
> 
> .keyboard-key.special-key.switch-key > .visual-wrapper > .key-element {
>     font-size: 1.8rem;
> }
> 
> At the default layout this layout is applied to the switch key but at the
> alt layout it isn't since you haven't ".switch-key". You need to change
> apps/keyboard/js/keyboard/layout_manager.js to add the necessary class to
> the key.
Or maybe we should make this rule (font-size: 1.8rem) applied to all special keys, and remove '.switch-key' selector, but that needs a examination on each "special key".

> 
> Do you need more information?
I will be working on this. Thanks Trishul.
Assignee: nobody → sudheesh1995
Flags: needinfo?(sudheesh1995)
L233
} else {
      spaceKeyRow.splice(spaceKeyCount, 0, {
        keyCode: this.KEYCODE_BASIC_LAYOUT,
        value: this.currentLayout.basicLayoutKey || 'ABC',
        ratio: 1.5,
        ariaLabel: 'basicLayoutKey'
      });

Shouldn't adding 
+ className: 'switch-key'
after the ariaLabel: 
fix this? Am I missing something else ? In order to keep ABC and 12& the same size, the only rule thats controlling the size is 'switch-key' ?
(In reply to Sudheesh Singanamalla (:ShellHacker) from comment #7)
> L233
> } else {
>       spaceKeyRow.splice(spaceKeyCount, 0, {
>         keyCode: this.KEYCODE_BASIC_LAYOUT,
>         value: this.currentLayout.basicLayoutKey || 'ABC',
>         ratio: 1.5,
>         ariaLabel: 'basicLayoutKey'
>       });
> 
> Shouldn't adding 
> + className: 'switch-key'
> after the ariaLabel: 
> fix this? Am I missing something else ? In order to keep ABC and 12& the
> same size, the only rule thats controlling the size is 'switch-key' ?

Yeah, that should be able to work.

However, I am not sure if we could modify the font size for all the special keys, including "Alt", [Backspace] and [Enter] key.
Let's ask for Carol about this.

Carol, could you help comment on this?
Thanks.
Flags: needinfo?(chuang)
similar problem faced in localization of firefox OS keyboard
Abin, some keyboards have 4 characters in space of '12&' so I think the l10n:<xx> keyboards need to have special rules and should be tracked as separate bugs each specific to the language to which the problem occurs.
Flags: needinfo?(mail2abin)
Hi Rudy,
As our offline discussion, 'ABC' would be 1.6 rem ; 'Alt','En(IME Switch)' and '12&' would be 1.8 rem.
[Backspace],[Shift]and [Enter] key will stay the same size as what we have now.

I will update the Visual spec later. Thank you!!
Flags: needinfo?(chuang)
Carol, thanks for the update.

Hi Sudheesh,

Please be informed of the spec update mentioned in comment 11 and comment on this bug if you have any questions.

Thank you.
Flags: needinfo?(sudheesh1995)
(In reply to Rudy Lu [:rudyl] from comment #12)

> Please be informed of the spec update mentioned in comment 11 and comment on
> this bug if you have any questions.

I've noted the spec update. Thank you. The Gaia branch isn't allowing me to access the keyboard app to do the required testing. None of the apps work when I click on them. Waiting for this to be fixed before I can try something at this. Is there another workaround ?
Flags: needinfo?(sudheesh1995)
(In reply to Sudheesh Singanamalla (:ShellHacker) from comment #13)
> (In reply to Rudy Lu [:rudyl] from comment #12)
> 
> > Please be informed of the spec update mentioned in comment 11 and comment on
> > this bug if you have any questions.
> 
> I've noted the spec update. Thank you. The Gaia branch isn't allowing me to
> access the keyboard app to do the required testing. None of the apps work
> when I click on them. Waiting for this to be fixed before I can try
> something at this. Is there another workaround ?

Yes, it is Bug 1052722, and maybe you could try an older version of Firefox, like Aurora, if want to use Firefox to run Gaia.
Another option would be using simulator in App manager,
https://developer.mozilla.org/zh-TW/Firefox_OS/Running_custom_builds_in_the_App_Manager

Happy hacking and sorry for the inconvenience.
Flags: needinfo?(sudheesh1995)
Rudy, Sorry for delaying, i've tried everything possible to set up a custom build for the app manager, didn't seem to work out too well, i'll just wait for Bug 1052722 to be fixed and jump on to fix this. :)
Setting a Need Info for myself.
Flags: needinfo?(sudheesh1995) → needinfo?(rlu)
Redirect the ni to you based on comment 15. :)
Flags: needinfo?(rlu) → needinfo?(sudheesh1995)
I'll take this, since we need to wrap up the keyboard related changes in a week or two.
Sudheesh, sorry for stealing the bug from you, and thanks for your help to start looking into this issue.
Assignee: sudheesh1995 → rlu
Flags: needinfo?(sudheesh1995)
Flags: needinfo?(mail2abin)
Whiteboard: [good first bug][lang=css][mentor-lang=zh] → [p=1]
Mentor: rlu
Attached file Patch V1
This is mainly UI changes, so ask for Carol's help to review.

Tim, could you please help do the code review?
Thanks.
Attachment #8474962 - Flags: ui-review?(chuang)
Attachment #8474962 - Flags: review?(timdream)
Rudy, Not a problem :) By the way the code looks great :)
Attachment #8474962 - Flags: review?(timdream) → review+
Status: NEW → ASSIGNED
Comment on attachment 8474962 [details] [review]
Patch V1

Hi Rudy,
As our offline discussion, UI changes as follow:
'ABC' '12&' and 'Alt' is 1.7 rem ; En(IME Switch)' is 1.8 rem.

And the UI looks good, thank you!!
Attachment #8474962 - Flags: ui-review?(chuang) → ui-review+
Landed to Gaia master,
https://github.com/mozilla-b2g/gaia/commit/2e0b3bd20c3fdb163ab64c639af38b7b186059a3

Thanks for the code/ui review.

--
Gaia-Try result, https://tbpl.mozilla.org/?rev=118d285dd615925db65a80235b879adb68fb8e50&tree=Gaia-Try
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S3 (29aug)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: