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 tab button layout on mobile #2117

Merged
merged 4 commits into from Apr 22, 2021

Conversation

andydotxyz
Copy link
Member

Description:

Tab buttons were always rendered in a grid of columns, this PR uses a grid of rows when the tab location is leading or trailing

This is a re-application of "Fix tab button layout on mobile #1962" on top of the current develop code.

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.

@andydotxyz andydotxyz requested a review from Jacalz April 2, 2021 16:43
Copy link
Member

@Jacalz Jacalz left a comment

Choose a reason for hiding this comment

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

Hmm, I don't see any changes compared to develop (visually). The top and bottom locations seem to work as expected, but trailing and leading seem to just be the same as bottom.
mobile-tabs

@andydotxyz
Copy link
Member Author

Maybe it was just doctabs that was the problem:

doctab-lead

@fpabl0
Copy link
Member

fpabl0 commented Apr 4, 2021

Maybe it was just doctabs that was the problem:

I don't think so, the problem is in AppTabs too, I have faced that problem just a couple of days ago, but it seems to be very random :(

@andydotxyz
Copy link
Member Author

I don't think so, the problem is in AppTabs too, I have faced that problem just a couple of days ago, but it seems to be very random :(

Does it work with this PR applied?

@fpabl0
Copy link
Member

fpabl0 commented Apr 14, 2021

Does it work with this PR applied?

It is hard to say, because it was a random bug 😕

@andydotxyz
Copy link
Member Author

Is there anything I can do to move this forward @Jacalz? It's been a couple of weeks since the last comment.

@Jacalz
Copy link
Member

Jacalz commented Apr 15, 2021

Is there anything I can do to move this forward @Jacalz? It's been a couple of weeks since the last comment.

Sorry, I don’t know. I could not see any difference before and after so I can’t comment on it much unfortunately.

@andydotxyz
Copy link
Member Author

I could not see any difference before and after

You don’t see the same as the screenshot I posted for doctabs?

@fpabl0
Copy link
Member

fpabl0 commented Apr 15, 2021

@andydotxyz
I think @Jacalz is trying to say this (from his first comment):

trailing and leading seem to just be the same as bottom.

Doc tabs respect leading and trailing position, but AppTaps no (it is always at bottom), is that intended?

Always use the shorter edge for mobile tab placement
@andydotxyz
Copy link
Member Author

You are quite right, something got messed up in transition.
The mobile tabs should only be positioned on the shorter edges.
This is now fixed and consistent between app and doc tabs.

@stuartmscott
Copy link
Member

The different tab location restrictions were in the requesting ticket (#1310), though it is not a hill worth dying on - if someone really wanted tabs on the long edges of mobile then a custom drawer widget that slides out to display the tabs would probably give a better UX.

@andydotxyz
Copy link
Member Author

andydotxyz commented Apr 16, 2021

Yeah this is more tidying up doc tabs to be consistent, but also resolving a mistake that somehow crept in to AppTabs too.
In summary, AppTabs have never drawn on the long edge for mobile, this commit flips leading position to top when in portrait or top to leading in landscape (I don’t know how/when this stopped being the case but that was the original design). Then it updates doctabs to have the same layout constraint on mobile.
A navbar approach would indeed be a good approach if someone wants the left style, which is typically a richer component so I’m happy for them to be different. I think someone has a work in progress component heading to fyne-x at some point.

@andydotxyz
Copy link
Member Author

Any further thoughts @Jacalz or @fpabl0 ?

Copy link
Member

@fpabl0 fpabl0 left a comment

Choose a reason for hiding this comment

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

LGTM

@andydotxyz andydotxyz merged commit 55fd860 into fyne-io:develop Apr 22, 2021
@andydotxyz andydotxyz deleted the fix/mobiledoctabs branch April 22, 2021 08:34
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

4 participants