Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Adjusting zh-tw keyboard layout. #2801

Merged
merged 4 commits into from
Mar 23, 2020
Merged

Adjusting zh-tw keyboard layout. #2801

merged 4 commits into from
Mar 23, 2020

Conversation

daoshengmu
Copy link
Contributor

@daoshengmu daoshengmu commented Feb 19, 2020

Fixes #2714.

This makes more sense based on iOS zh-TW keyboard layout.

However, I still can see we have couple of questions on KeyboardWidget. @keianhzo Please take a look at this screen recording (https://drive.google.com/file/d/1m43TsivrTurHQnA19aKykkDbhLhyQ7gI/view?usp=sharing)

  • I can't be easy to adjust its placement and resize the KeyboardLayout according to the parameters from KeyboardInterface. Although I spend an afternoon, I still feel the width of keyboardContainer or keyboardLayout is not what I expect. [0:00 - 0:23 sec in the video]
  • Pinyin and Japanese keyboards didn't be placed at the the same position as others. We can see there is an offset between it and others. [0:23 - 0:41 sec in the video] I have checked their UI definitions are the same with keyboard_qwerty.xml, but they are still wrong. That's odd.

@daoshengmu daoshengmu requested a review from keianhzo February 19, 2020 02:11
@daoshengmu daoshengmu self-assigned this Feb 19, 2020
@keianhzo
Copy link
Contributor

@daoshengmu the proposal at #2714 (comment) was not a final design I was just trying to understand if it was a valid layout based on what I see in Android Zhuyin, we still probably need to go through Design review for this and request a new redesign with a larger space bar and maybe that also keeps the same height as the rest of the keyboards as this one (and also my proposal are 5 rows instead of 4).

Regarding the KeyboardLayout, you may need to override the getAlphabeticKeyboardWidth method from BaseKeyboard to provide a new width. I've this already sorted out in my branch, which is basically the same as this one with small layout differences.

What you see in the Pinyin and Japanese keyboards is because those have the clause composition bar on top where the composed characters are displayed, that's why thy are placed a bit further down than the others.

@emstanley who should be making keyboard layout related decisions? I think in the past Janice run it through localization contributors?

@daoshengmu daoshengmu changed the title [wip] Adjusting zh-tw keyboard layout. Adjusting zh-tw keyboard layout. Feb 19, 2020
@daoshengmu
Copy link
Contributor Author

daoshengmu commented Feb 20, 2020

What you see in the Pinyin and Japanese keyboards is because those have the clause composition bar on top where the composed characters are displayed, that's why thy are placed a bit further down than the others.

It makes sense now :)

I have done the adjustment for zh-tw keyboard, and it looks great. I aware zh-tw IME would be the only one keyboard which uses 5 rows for now. Therefore, I need to do some customize work for it. For examples, because its symbol keyboard is still 4 rows, it makes me need to change its layout when users are doing mode changing. Anyway, this PR is ready to review. @keianhzo

@keianhzo
Copy link
Contributor

@daoshengmu I guess we should wait until @emstanley confirms who's the right person to review this new design and we get the approval?

Copy link
Contributor

@keianhzo keianhzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should fix the alignment of the second/third rows and also the enter button should be a bit bigger to be aligned with the backspace button.

Screenshot_org mozilla vrbrowser dev_2020 02 21-09 17 05

I'm also not very convinced about changing to a 4 rows layout when switching to the symbols keyboard. Android Zhuyin keeps the keyboard height when switching to the symbols keyboard but only shows 4 rows, switching the keyboard height feels weird, we don't do that for any other keyboard. Let see what @thenadj says after reviewing.

@daoshengmu
Copy link
Contributor Author

daoshengmu commented Feb 21, 2020

Maybe we should fix the alignment of the second/third rows and also the enter button should be a bit bigger to be aligned with the backspace button.

the second/third rows are not aligned is intentional. iOS keyboard is like that, I haven't checked it on Android, but I guess so.

I'm also not very convinced about changing to a 4 rows layout when switching to the symbols keyboard. Android Zhuyin keeps the keyboard height when switching to the symbols keyboard but only shows 4 rows, switching the keyboard height feels weird, we don't do that for any other keyboard. Let see what @thenadj says after reviewing.

iOS also keeps the same height of keyboard layout. When switching to the symbol keyboard that only has 4 rows, it will make the keys size be bigger.

@daoshengmu
Copy link
Contributor Author

I have fixed the alignment problem with the backspace button. I have a feeling we should consider to make the symbol keyboard of Zh-TW keyboard to be 5 rows or we need to adjust key height and keyboard height globally.

@cjyjae35
Copy link

BUG-40 Zhuyin Keyboard

1 similar comment
@cjyjae35
Copy link

BUG-40 Zhuyin Keyboard

@thenadj
Copy link

thenadj commented Feb 27, 2020

@daoshengmu Please take a look at BUG-40 for updates to the keyboard.
BUG-40 Zhuyin Keyboard_001.pdf

@bluemarvin
Copy link
Contributor

Why are we arbitrarily changing the numeric key layout on all keyboard in this design?

@thenadj
Copy link

thenadj commented Feb 27, 2020

@bluemarvin In April of 2019 we got the feedback that we should change the numeric key layout from the phone layout to the extended layout. At that point, we updated it in all specs. But looking at the builds now, all keyboards still have the telephone layout.

@daoshengmu
Copy link
Contributor Author

Using the extended layout for the numeric key layout makes sense to me. However, based on the new design, it still wouldn't solve our original problem that is caused by the space bar is not long enough to show the full text of 中文 ( 正體 / 注音) as the captured video below.
https://drive.google.com/file/d/1Dj6KhPSCI4J6pSnIWkU3Ih08dm96KqCL/view?usp=sharing

@thenadj
Copy link

thenadj commented Feb 28, 2020

@daoshengmu We recommend not to show the name on the spacebar of the Chinese keyboard. The user can see the language the chose from the language picker menu.

@daoshengmu
Copy link
Contributor Author

@thenadj I am ok to not show the input name on the spacebar for Traditional Chinese keyboard. How about the Simplified Chinese keyboard (Pinyin)? Does it need to show the name?

Moreover, I saw the design document mention the spacebar will show Space in different languages. But, we didn't have it now, we just make it to be blank in spacebar. Do we need to add it back to all the keyboards?

@thenadj
Copy link

thenadj commented Feb 28, 2020

@daoshengmu Show it if there is space in the pinyin keyboard and keep it blank.

@daoshengmu daoshengmu requested a review from keianhzo March 9, 2020 23:50
@daoshengmu daoshengmu dismissed keianhzo’s stale review March 9, 2020 23:53

Fixed by new design.

@daoshengmu
Copy link
Contributor Author

daoshengmu commented Mar 10, 2020

Screen Shot 2020-03-09 at 10 25 16 PM

@cjyjae35 @thenadj One thing I would like to discuss is the character and 。In the spelling system of Zhuyin, 'ㄨ' is always come before . But, in this new design, 'ㄨ' is put at the below of 'ㄛ'. It is not an usual way that I experienced before. It is not too bad, users might be able to endure it. I just wanna share my thought to see if we still have space to enhance it in the layout.

@bluemarvin
Copy link
Contributor

Screen Shot 2020-03-09 at 10 25 16 PM

@cjyjae35 @thenadj One thing I would like to discuss is the character and 。In the spelling system of Zhuyin, 'ㄨ' is always come before . But, in this new design, 'ㄨ' is put at the below of 'ㄛ'. It is not an usual way that I experienced before. It is not too bad, users might be able to endure it. I just wanna share my thought to see if we still have space to enhance it in the layout.

@daoshengmu Is the solution to just swap the two characters? If so, please just do it. I would like to get this landed.

@daoshengmu
Copy link
Contributor Author

@cjyjae35 @thenadj One thing I would like to discuss is the character and 。In the spelling system of Zhuyin, 'ㄨ' is always come before . But, in this new design, 'ㄨ' is put at the below of 'ㄛ'. It is not an usual way that I experienced before. It is not too bad, users might be able to endure it. I just wanna share my thought to see if we still have space to enhance it in the layout.

@daoshengmu Is the solution to just swap the two characters? If so, please just do it. I would like to get this landed.

@bluemarvin Things would not be so simple. Every character has their order in the keyboard by columns. If we wanna land it soon, we can open a follow up issue to address it, this problem is minor, honestly.

@bluemarvin
Copy link
Contributor

bluemarvin commented Mar 12, 2020

@daoshengmu Let's get it right, we have time. Please propose a solution.

@thenadj
Copy link

thenadj commented Mar 12, 2020

I agree, please get the order of the characters corrected. We are not native Chinese speakers and trust your feedback.

@daoshengmu
Copy link
Contributor Author

org mozilla vrbrowser-20200312-124744
org mozilla vrbrowser-20200312-124756

I think it looks good enough to me now. I took a small number of space from Enter button and give a margin at the second row.

@bluemarvin
Copy link
Contributor

If it is important to have the keys in a grid layout, would it make sense to have the enter key be the same width as delete and space keys?

@daoshengmu
Copy link
Contributor Author

daoshengmu commented Mar 12, 2020

If it is important to have the keys in a grid layout, would it make sense to have the enter key be the same width as delete and space keys?

I don't have a strong opinion on this. One advantage of making Enter key be wide might be the Enter key size would look like similar with other keyboards. In addition, if we still need to show Enter text on the key, the width can't be to be too thin.

@bluemarvin
Copy link
Contributor

bluemarvin commented Mar 13, 2020

So, maybe instead of showing Enter maybe we should show the enter symbol. This is what I see done on other mobile keyboards.

image

We could also show the space symbol:
image

@daoshengmu
Copy link
Contributor Author

Showing symbols to present Enter and Space looks ok to me. Keys in grid layout should be unnecessary. I feel these functional keys should have different size from other keys.

@keianhzo
Copy link
Contributor

@daoshengmu Is this ready to land or we are going to change the enter key?

@daoshengmu
Copy link
Contributor Author

daoshengmu commented Mar 17, 2020

@daoshengmu Is this ready to land or we are going to change the enter key?

My preference is landing this PR first and address the Enter key concern at another issue. Then, talking to our design team.

@cjyjae35
Copy link

cjyjae35 commented Mar 17, 2020

@daoshengmu Is this ready to land or we are going to change the enter key?

My preference is landing this PR first and address the Enter key concern at another issue. Then, discuss it with our design team.

Entershould be written on the key if the width is enough. If not, please use the symbols instead.

@bluemarvin
Copy link
Contributor

@daoshengmu Do you have enough information to finish this up? Would like to include in v10.

@daoshengmu
Copy link
Contributor Author

@daoshengmu Do you have enough information to finish this up? Would like to include in v10.

@bluemarvin I have checked Enter key on all keyboards, all of them have enough width to show the text. So, I assume at this moment we still don't need to do any change for symbols.

@daoshengmu
Copy link
Contributor Author

@daoshengmu Is this ready to land or we are going to change the enter key?

It is ready to land. Please help review once you're available.

@bluemarvin bluemarvin added this to the #10 features milestone Mar 19, 2020
Copy link
Contributor

@keianhzo keianhzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daoshengmu Maybe we should also add the emoji symbols to the Simplified Chinese kb as a follow up? I know it was popular in JP but if it's popular in TW maybe it is popular too in Mainland China?

@keianhzo keianhzo merged commit 09d76ae into master Mar 23, 2020
@keianhzo keianhzo deleted the zhTWKeyboard branch March 23, 2020 10:18
@daoshengmu
Copy link
Contributor Author

@daoshengmu Maybe we should also add the emoji symbols to the Simplified Chinese kb as a follow up? I know it was popular in JP but if it's popular in TW maybe it is popular too in Mainland China?

Yep. We will work on this in #2974.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Keyboard][zh-TW] The string for the Space key exits the keys boundaries
5 participants