Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Layout issues in EmojiDialog for several edge cases. #326

Merged
merged 7 commits into from Jan 23, 2019
Merged

Fix Layout issues in EmojiDialog for several edge cases. #326

merged 7 commits into from Jan 23, 2019

Conversation

mario
Copy link
Collaborator

@mario mario commented Jan 21, 2019

This PR fixes a few layout issues I've noticed, more importantly:

  • it now properly aligns the emoji keyboard above soft navigation buttons at the bottom on some phones
  • it now properly shows the emoji keyboard when using default edit text behaviour in horizontal orientation

This is still WIP as I want to clean it up and test, but feel free to test it yourself and comment - all feedback is more than welcome.

Signed-off-by: Mario Danic mario@lovelyhq.com

@mario mario added the WIP label Jan 21, 2019
Copy link
Owner

@vanniktech vanniktech left a comment

Choose a reason for hiding this comment

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

Can you use the Square formatting codestyle? It's quite hard to review as it is now.

@mario
Copy link
Collaborator Author

mario commented Jan 21, 2019

@vanniktech well, I can try :) Would appreciate testing in the mean time!

@vanniktech
Copy link
Owner

It behaves very weirdly on my emulator.

screenshot_1548063558

Also toggling with the Emoji button no longer seems to work.

@mario
Copy link
Collaborator Author

mario commented Jan 21, 2019

Can you let me know which emulator is that so I can take a look? (what Android version)
(Nevermind, got it)

@vanniktech
Copy link
Owner

9d477d27 still behaves flaky with the same behavior.

@mario
Copy link
Collaborator Author

mario commented Jan 21, 2019

Yea, I just did reformatting to comply with your rules. The code did work, so maybe I didn't push the right branch - I'm investigating.

@mario
Copy link
Collaborator Author

mario commented Jan 21, 2019

Should be ready now. I've experienced some weird "dismiss" animation issues but those seem to be there before as well.

This fixed extracted UI issues + issues with phones like P20 pro.

@rubengees
Copy link
Collaborator

As @vanniktech said, this is really hard to review. I know it is not fun, but can you revert all style changes, not related to your actual changes (And preferably use a style fitting the rest of the repo)?

@mario
Copy link
Collaborator Author

mario commented Jan 21, 2019

@rubengees I now use the exact same style as you folks do (Square Android) and the formatting has been done according to those guidelines.

Can you clarify what should I change? Do you mean the private modifiers I've added and such?

@rubengees
Copy link
Collaborator

rubengees commented Jan 21, 2019

No, those are fine! I'm very sorry for being so picky, but these changes add noise to the PR, making it hard to focus on the actual changes.

I mean things like below.

@mario
Copy link
Collaborator Author

mario commented Jan 21, 2019

So hard on the new contributors :P

Anyway, I tried ... let me know if I missed something, it's getting quite late :)

Copy link
Owner

@vanniktech vanniktech left a comment

Choose a reason for hiding this comment

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

Looks good and it does work with the emulator. Do you think this will fix #191?

And yeah style guidelines and everything is a bit stricter here. 🤷‍♂️

There's still one glitch though (the bottom part isn't filled correctly)
screenshot_1548150899

@mario
Copy link
Collaborator Author

mario commented Jan 22, 2019

@vanniktech can you let me know where (what phone, what OS version) do you experience the glitch with the bottom part not filled?

As for #191, I believe so - I'll take a look at my S7 - might not be the EXACT same phone, but oh well.

@vanniktech
Copy link
Owner

(I can also take care of the formatting in case it's too exhausting for you.) We'll get there slowly.

Emulator is Nexus 4 with API 28. And on my Pixel 3 this also fails with the same behavior which is on Android P too.

@mario
Copy link
Collaborator Author

mario commented Jan 22, 2019

@vanniktech I plan on contributing in the long term unless something serious happens, so I'd rather slowly familiarize myself with the guidelines and all. Luckily, I've been in FOSS for my whole life so I don't find the approach off-putting (and understand the reasoning), but I can understand how a new contributor might want to get away after so many style requests on their first PR :P

@mario
Copy link
Collaborator Author

mario commented Jan 22, 2019

Formatting is changed, but unfortunately I can't reproduce the layout issue you have :(

Nexus 4, API 28 as follows:

screenshot 2019-01-22 at 11 32 08

Are there any "special" steps I could take to try and reproduce the issue?

Signed-off-by: Mario Danic <mario@lovelyhq.com>
@vanniktech
Copy link
Owner

Weird. Not that I know. I do think that the notch isn't supported which is why it's failing on my Pixel 3XL.

@mario
Copy link
Collaborator Author

mario commented Jan 22, 2019

@vanniktech my P20 Pro has a notch, and it works as expected. Can you try to clean & rebuild? Probably not it, but you never know.

@vanniktech
Copy link
Owner

Nah didn't solve it.

@mario
Copy link
Collaborator Author

mario commented Jan 22, 2019

Ah missed the two, sorry about that. Will try on a few more devices, but it's really strange that your Nexus 4 emulator (which is the same as mine!) behaves differently.

@mario
Copy link
Collaborator Author

mario commented Jan 22, 2019

I just simulated a cutout too (both regular & double) and it works. Uh.

@mario
Copy link
Collaborator Author

mario commented Jan 22, 2019

Ah found a way to reproduce. Will fix.

Signed-off-by: Mario Danic <mario@lovelyhq.com>
@mario
Copy link
Collaborator Author

mario commented Jan 22, 2019

Can you folks try it now please?

vanniktech
vanniktech previously approved these changes Jan 23, 2019
Copy link
Owner

@vanniktech vanniktech left a comment

Choose a reason for hiding this comment

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

Looking good! Thanks a lot for the work ❤️

I've also fixed some of the styling issues. I believe this should go green and then I'll merge.

vanniktech
vanniktech previously approved these changes Jan 23, 2019
@vanniktech vanniktech changed the title Fix layout issues Fix Layout issues in EmojiDialog for several edge cases. Jan 23, 2019
@vanniktech vanniktech merged commit 748c208 into vanniktech:master Jan 23, 2019
@vanniktech vanniktech removed the WIP label Jan 23, 2019
@vanniktech
Copy link
Owner

Thank you very much!

@mario
Copy link
Collaborator Author

mario commented Jan 23, 2019

Thanks fo both of you for testing and doing code review.

@mario mario deleted the fix-layout-issues-from-updated branch January 23, 2019 21:10
@rubengees
Copy link
Collaborator

Thanks for this change @mario! I was not in time to review, but I integrated this commit in one of my apps and confirmed with a user having a similar problem, that it now works!

@vanniktech
Copy link
Owner

If you want @rubengees next time I'll wait for your review too.

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

Successfully merging this pull request may close these issues.

None yet

3 participants