scribe-org / Scribe-iOS

iOS app with keyboards for language learners
https://apps.apple.com/app/scribe-language-keyboards/id1596613886
GNU General Public License v3.0
128 stars 78 forks source link

iPad layouts more reflective of system keyboards #33

Closed andrewtavis closed 1 year ago

andrewtavis commented 2 years ago

Terms

Description

This issue at time of writing is not a priority, but could be later. The focus is making the iPad version of Scribe more reflective of the system keyboard layout. iPad support was not the key focus for Scribe at launch, so the keyboards generally look like larger versions of iPhone keyboards. It would be best if multiple layouts of iPad keyboards could be made that reflect having the numbers on the top row always, as well as other the system keyboard layout characteristics.

andrewtavis commented 2 years ago

These changes would be done in the InterfaceVariables files for each keyboard, with the conditions within KeyboardsBase/KeyboardKeys.swift then being used to adapt the key widths.

neisenlo commented 1 year ago

Would this be desired for all iPads or would only the larger models want an additional row of keys?

andrewtavis commented 1 year ago

Hey @neisenlo! ๐Ÿ‘‹ Iโ€™d agree that only the larger models should have an extra row of keys :) A basic thing we could do is edit the key sizes now to get them to be more reflective of the system keyboards (by this I mean that some keys should be wider than they are now). After this we could do a simple boolean check of screen dimensions to determine if another row would be possible. We could add the number keys into the interface variable files and just ignore them if the screen isnโ€™t big enough?

Let me know if this is something youโ€™d be interested in working on. Would be happy to assign and could also draw your attention to some of the files youโ€™d be working with ๐Ÿ˜Š

neisenlo commented 1 year ago

I'd definitely be willing to give it a shot! Would you recommend hardcoding the changes into each letterKeysPad in the InterfaceVariables file first?

andrewtavis commented 1 year ago

Assigning you so people know ๐Ÿ˜Š Iโ€™d say a first thing to do as prep could even be adding in the number keys and delete into the letterKeysPads and then changing the place where theyโ€™re called such that those keys are skipped? The row would be 1 to 0, -, = and backspace.

andrewtavis commented 1 year ago

Big thing is that in thinking about this we need a new layout file to make this work, as itโ€™s designed now so that the keys each have their own row. We thus only have four rows available. Maybe letโ€™s add the top row and skip it first, then I can make a new layout file for the larger iPads and hook it up, and then from there you can work on getting the layouts the way they should look with wider buttons and a tab option, etc? Let me know how this sounds :) Youโ€™d also be welcome to play around with layouts if you wanted, but thatโ€™s something I wouldnโ€™t expect ๐Ÿ˜Š

neisenlo commented 1 year ago

I have added a number row (as specified above) to all the keyboards and simulated an iPad that was too small so I ignored the first row. I'm not sure this is worth a pull request but here is my forked branch https://github.com/neisenlo/Scribe-iOS/tree/iPadKeyboard

andrewtavis commented 1 year ago

Itโ€™s definitely worth a PR :) No stress! Send it along and Iโ€™ll merge. Do you have interest in working on .xib layout files? Youโ€™d be welcome to if so. I could make a layout file thatโ€™s the same as the current one, make sure it can be referenced by just iPads, and then you could experiment with adding the fifth row. Only if itโ€™s of interest obviously ๐Ÿ˜Š If youโ€™d rather work on other parts of the issue Iโ€™d be happy to do the layout files myself fully :)

neisenlo commented 1 year ago

This is my first swift project so it may take me a while to figure out how. But I would definitely be interested in giving it a try if that's not a concern.

andrewtavis commented 1 year ago

No stress! Happy to have people use Scribe as a means to learn ๐Ÿ˜Š Iโ€™ll plan on setting up the base iPad .xib, and just let me know if you want to work on that file as well or take it over after Iโ€™m done making it :)

andrewtavis commented 1 year ago

Hey @neisenlo ๐Ÿ‘‹ 9475942 added in the potential to add a numbers row to the keyboard. Settings up the .xib was actually easier than I expected and we thankfully didn't need to set up another layout file ๐Ÿ˜Š The following controls the height of the new UIStackView that we can populate with the numbers keys for iPads:

https://github.com/scribe-org/Scribe-iOS/blob/9475942de61fa6472308d2faebd135dc1260091c/Keyboards/KeyboardsBase/KeyboardViewController.swift#L24

This function as of now sets the height of this UIStackView to zero, but we can use the conditional to check the size of the iPad or potentially the model and then add in the numbers keys if appropriate :) Do you want to give adding in the numbers keys a shot, and then from there we can finish it up by adding in tab and some other iPad specific keys?

andrewtavis commented 1 year ago

Hey @neisenlo ๐Ÿ‘‹ Just wanted to let you know that I'm gonna go through the v2.3.0 release process now as I was able to get some good new features done over the last few days. No stress on this issue is what I'm getting at! Hope that all's well with you and that you have had a nice week! Let me know if you still have interest and we'll go from there ๐Ÿ˜Š

neisenlo commented 1 year ago

Hey, sorry about that, it was graduation week so I ended up being quite busy. But I would very much enjoy to continue working on this project!

On Sun, Apr 30, 2023 at 11:46 AM Andrew Tavis McAllister < @.***> wrote:

Hey @neisenlo https://github.com/neisenlo ๐Ÿ‘‹ Just wanted to let you know that I'm gonna go through the v2.3.0 release process now as I was able to get some good new features done over the last few days. No stress on this issue is what I'm getting at! Hope that all's well with you and that you have had a nice week! Let me know if you still have interest and we'll go from there ๐Ÿ˜Š

โ€” Reply to this email directly, view it on GitHub https://github.com/scribe-org/Scribe-iOS/issues/33#issuecomment-1529057722, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANW7SMU4EMNIXJ7Y3BDPHETXD2COFANCNFSM5ISNGYGA . You are receiving this because you were mentioned.Message ID: @.***>

andrewtavis commented 1 year ago

Sounds great, @neisenlo! Let me know what I can do to support you :) Again no rush on this as for now I'm focussed on another project, but I'm very happy to jump over and help out if you have questions ๐Ÿ˜Š

andrewtavis commented 1 year ago

Hey @neisenlo! Hope you're well :) Checking in with you on if you'd still like to work on this issue ๐Ÿ˜Š We're getting into the swing of things for our participation in Google Summer of Code, so would be great if we could also include this in all the work we'll be doing ๐Ÿš€

nyfz18 commented 1 year ago

since I can't see the current layout, would you mind sending a screenshot of how it currently looks on the simulator?

andrewtavis commented 1 year ago

Hey @nyfz18! Yes, sure thing :) The layout files that you'd be editing are in files like Keyboards/LanguageKeyboards/German/DEInterfaceVariables.swift where we'd want to edit the values for letterKeysPad and the like :)

As of now it looks like this:

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 20 23 58

And we're hoping to change the values in each InterfaceVariables.swift file so it looks more like this:

ipad_keyboard

This would be only for iPads that are big enough though, which we can discuss later :)

Btw, @neisenlo - hey there ๐Ÿ‘‹ You're still welcome to help with this. @nyfz18 is on Windows and can thus only do the base layout changes. I can support if you're still busy ๐Ÿ˜Š Hope you're well!

nyfz18 commented 1 year ago

okay, so essentially the goal is to resize the buttons and add more that all fit the within the ipad screen?

andrewtavis commented 1 year ago

Exactly :) Your task would be to change the letterKeysPad and other iPad key layouts in order to match the keys that are in there. Along with that we'll need some other things like adding the functionality for a tab key that as of now isn't included. I can do that potentially, and would just add that into the PR or commit it later on ๐Ÿ˜Š

Let me take a moment to document the various iPad keyboard layouts for the keyboards we have or will implement soon. Will do this now ๐Ÿ™ƒ

andrewtavis commented 1 year ago

Layouts we want to match

Danish (#133)

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 21 57 51

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 15 28

English (#7)

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 00 15

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 16 16

French

Canada

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 01 04

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 16 50

France

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 01 31

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 17 20

German

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 21 51 44

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 17 52

Hebrew (#134)

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 02 22

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 18 24

Italian

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 02 56

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 19 19

Norwegian (Bokmรฅl, #135)

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 03 25

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 19 50

Portuguese

Brazil

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 21 04

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 20 20

Portugal

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 04 56

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 21 37

Russian

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 05 24

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 22 03

Spanish

Mexico

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 23 11

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 22 32

Spain

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 07 07

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 23 39

Swedish

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 07 40

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 24 06

andrewtavis commented 1 year ago

@SaurabhJamadagni and @wkyoshida, interesting to see that for iPads there's a fair amount of variety based on the country ๐Ÿค” I doubt there's much variety aside from the main currency symbol on phones, but for pads we may need to consider country localizations? Not sure ๐Ÿค” I think that the average person is hunting and pecking on iPad keyboards, and if they actually want to type then they have an external one. At the very least for the start I think just picking the one that's most popular by native speakers and providing the QWERTY/AZERTY options via #312 would be enough :)

nyfz18 commented 1 year ago

I'm working through the code. Here's my forked repo: https://github.com/nyfz18/Scribe-iOS/blob/main/Keyboards/LanguageKeyboards/German/DEInterfaceVariables.swift

I haven't added the symbols on the right hand side of the keyboard yet but I've added some of the left buttons. I just wanted to double check if I'm on the right track before adding more

andrewtavis commented 1 year ago

Yes, @nyfz18, this is generally what we were thinking. Thanks for checking! The only main change I'd do is leave the original iPad layouts as there were and make new versions of it. For smaller iPads we'll still need to use the old version :) You could make two new variables - letterKeysPadExpanded and symbolKeysPadExpanded - and we'd then not need the expanded version of the number keys as they'd be in the top row :)

And as far as the "snake" character that you mentioned, in looking at it it seems to be a carrot (^) to the left or 1 on the German letters layout above ๐Ÿ˜Š You can just put in that char instead of snake.

nyfz18 commented 1 year ago

Okay, thanks for checking. I just added the letterKeysPadExpanded. Is that what you meant?

Also, would it be possible to send a reference of what you want the symbolKeysPadExpanded to look like? I can layout the keyboard based on that

andrewtavis commented 1 year ago

Thanks for the communication! :)

Also, would it be possible to send a reference of what you want the symbolKeysPadExpanded to look like? I can layout the keyboard based on that

Using the above images as a baseline and specifically German:

letterKeysPadExpanded would look like the following as you generally have set up in your branch:

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 21 51 44

There are a couple of changes that you need to make, like the keys after 0 being รŸ and ' instead of - and =. For symbolKeysPadExpanded we'd be looking for a similar variable with the layout looking like the second picture within each language group above:

Simulator Screenshot - iPad Pro (12 9-inch) (4th generation) - 2023-07-12 at 22 17 52

Happy to answer further questions! Thanks for getting at this!

wkyoshida commented 1 year ago

At the very least for the start I think just picking the one that's most popular by native speakers and providing the QWERTY/AZERTY options

Yeah, I'd agree - I think I'm perhaps less concerned with some of the small key differences that some regions might have, since accounting for all of them might be a whole pandora's box we might not want opened yet :fearful: :laughing: What IS worth accounting for though is when regions do have completely different layouts, as is the case with France vs Canada as we've been discussing. As you pointed out, we've got that planned, so I'd say we're alright

nyfz18 commented 1 year ago

I added the letterKeysPadExpanded and symbolKeysPadExpanded. There are two things that I'm not sure how to do:

andrewtavis commented 1 year ago

the quotation button in the symbol expanded layout (")

Do you mean how to input it, @nyfz18? Normally you can via single quotes like '"' :) Let me know if it's something else though :)

when there's two character a button (ex: the numbers)

This is related to #22, which as of now is not a priority. We'll have the bottom character be what shows up on letterKeysPadExpanded and top character be what shows up on symbolKeysPadExpanded :)

nyfz18 commented 1 year ago

Yeah, so for line 68 in my forked repo of DE Interface, in the 8th index, I currently have '"' . Is that the right formatting? My IDE is coloring some text weirdly because of that part of the program I think. Also once I have the expanded keyboard set, should I add a condition for the larger iPad so it'll use the expanded keyboard version?

Thanks for the help!

wkyoshida commented 1 year ago

Yeah, so for line 68 in my forked repo of DE Interface...

Quick tip on the above!

When viewing repo files within GitHub, if you click on the line number, there's a Copy permalink option that gives a link that goes directly to the specific line in the file. Very handy for sharing with others!

image

andrewtavis commented 1 year ago

Yeah, so for line 68 in my forked repo of DE Interface, in the 8th index, I currently have '"' . Is that the right formatting?

Yes, @nyfz18, this should work great ๐Ÿ˜Š

Also once I have the expanded keyboard set, should I add a condition for the larger iPad so it'll use the expanded keyboard version?

You can if you'd like to! I'd be happy to figure out where that change should go and help you test it a bit in the PR :)

Thanks for the help!

Thanks for the interest and dedication!

nyfz18 commented 1 year ago

Sure, what should I do next?

andrewtavis commented 1 year ago

I guess weโ€™re ready for a pull request for now :)

andrewtavis commented 1 year ago

@nyfz18, b563c7f was the fixes to the PR you sent, with my comments being in the now closed discussions of #346 :) Feel free to send along more PRs for the languages that we already have: French, Italian, Portuguese, Russian, Spanish and Swedish. For the other languages that you see we haven't implemented the iPhone versions, but I can do that for you and you can come in for the expanded iPad versions ๐Ÿ˜Š

nyfz18 commented 1 year ago

hello! sorry, been a little swamped these days. I'll try to get them in by the end of the week sometime.

andrewtavis commented 1 year ago

Sounds wonderful, @nyfz18! Looking forward :) :)

nyfz18 commented 1 year ago

I've updated the languages for French, Italian, Portuguese, Russian, Spanish, Swedish. I committed the changes to my repo but my repo isn't up to date yet. Not sure if that will affect anything when trying to merge the change to the main repo.

https://github.com/nyfz18/Scribe-iOS/tree/main/Keyboards/LanguageKeyboards

andrewtavis commented 1 year ago

Hey @nyfz18! Ideally you'd update your branch with the changes that have gone through, but then the changes that you've made are to files that haven't been edited, so you should be good for a PR ๐Ÿ˜Š After that we can get these all hooked up!

andrewtavis commented 1 year ago

cd89548 was a ton of edits :) Please don't worry about how much went into the commit to complete this, @nyfz18! As the issue numbers int he commit say, I basically decided to go through and get the layouts for the remaining keyboards that we're working on as well as I find that it's best to handle these sorts of things in batches.

I'll close this issue now as what needs to happen for each keyboard is contained within the respective new keyboard issue ๐Ÿ˜Š Thanks so much for your work on this, @nyfz18! I'll email you soon with some ideas I've come up with for what you could work on :) Some basic things that could be done though is that if you'd like to make the variables for #133, #134 and #135 within each of their respective InterfaceVariables and CommandVariables files then that'd be a great help in us getting these keyboards out eventually. This is another thing for Scribe-iOS that wouldn't need an emulator. I'd be happy to explain this more, but then I think what I'll suggest in the email might be more fun anyway :) :)