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

V8: Make "Open in split view" look better in narrow viewports #4619

Merged
merged 4 commits into from
Mar 19, 2019

Conversation

kjac
Copy link
Contributor

@kjac kjac commented Feb 17, 2019

Prerequisites

  • I have added steps to test this contribution in the description below

Description

In a somewhat narrow viewport, the "Open in split view" button causes the language selector to bounce around because of some text wrapping:

language-selecor-narrow-viewport-before

This PR does a bit of mending. It's still not perfect, but at least better than the current solution:

language-selecor-narrow-viewport-after

Perhaps someone with mad flexbox skills can do better 😄

@nielslyngsoe nielslyngsoe self-assigned this Feb 18, 2019
@nielslyngsoe nielslyngsoe self-requested a review February 18, 2019 11:37
@nielslyngsoe nielslyngsoe removed their assignment Feb 18, 2019
@emmaburstow
Copy link
Contributor

Hello Kenn, my old friend.

Thanks for the work. We'll let you know if we need anything here in due course.

Em

@nul800sebastiaan nul800sebastiaan changed the base branch from temp8 to dev-v8 February 19, 2019 15:05
@nielslyngsoe
Copy link
Member

Good catch. Looking at it I think it wouldn't hurt to set a minimum width of the dropdown, to make sure that we have a decent width. So the dropdown would in situations like this get wider than the name-input, expanding to the right.
What do you think @kjac ?

@kjac
Copy link
Contributor Author

kjac commented Feb 21, 2019

Works for me 👍

@kjac
Copy link
Contributor Author

kjac commented Feb 24, 2019

@nielslyngsoe so I tried a minimum width. It's not the best of solutions. Turns out the language selector must be at least 540px wide to have the culture "Macedonian (Former Yugoslav Republic of Macedonia)" fit just remotely comfortably inside it. And in split view that's 2x 540px 😲

I did tweak the current solution a bit more so it expands beyond the width of the input to support such long culture names, but still with the absolute positioning of the split view button. Now it looks like this:

image

For comparison here's how the language selector works as-is with such long culture names in narrow viewports:

language-selecor-narrow-viewport-before-2

@nielslyngsoe
Copy link
Member

@kjac Super great! I´m merging this!

@nielslyngsoe nielslyngsoe merged commit 3a0dd23 into umbraco:dev-v8 Mar 19, 2019
@kjac kjac deleted the v8-split-view-narrow-viewport branch March 19, 2019 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants