Skip to content

Enlarged modules box up to 250px, so that buttons don't overlap anymore#464

Merged
rinatkhaziev merged 3 commits intoAutomattic:masterfrom
TheCrowned:fix/361-settings-style-update
Dec 18, 2018
Merged

Enlarged modules box up to 250px, so that buttons don't overlap anymore#464
rinatkhaziev merged 3 commits intoAutomattic:masterfrom
TheCrowned:fix/361-settings-style-update

Conversation

@TheCrowned
Copy link
Copy Markdown
Contributor

@TheCrowned TheCrowned commented May 28, 2018

Fix styling not being optimal on mobile devices (and small resolutions in general), as proposed in #361.
In particular,

  • Enlarged module boxes and button divs from 210px to 250px to prevent buttons from overlapping.
  • Removed min-width property from modules container, which prevented the page from being fully adaptable to different resolutions.

Any viewer which is at least ~ 250px wide should see the page well. Tested with Chrome (with variable window size) and a mobile emulator. Now, if the viewer is not at least ~ 500px wide, module boxes are all stacked in a single column.

Before CSS changes

After CSS changes

@sboisvert
Copy link
Copy Markdown
Contributor

@TheCrowned I'd add a bit more information to this PR's description, for example a screenshot of before and after on a mobile device (or a mobile emulator) While there is some more info in #361 it would be nice to have all the rationale for the PR here since Issues could have long conversations and not always start or go over the main reasoning in one place. Having a summary of the "why" in PRs is very useful (the "Why" can include things like screenshots to demonstrate).
It would also be nice to note what this change has been tested with and if it could have any unintended side effects.

… be responsive and adapt itself to different resolutions.
@TheCrowned
Copy link
Copy Markdown
Contributor Author

All right - I have updated the PR initial description with details and screenshots. Also, I took the chance to make another commit further improving the layout on small screens (details above) :)

Copy link
Copy Markdown

@mdbitz mdbitz left a comment

Choose a reason for hiding this comment

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

Verified the styling updates that no buttons break to 2 lines on my mobile.

@rinatkhaziev tagging you to verify this is good to merge.

@rinatkhaziev
Copy link
Copy Markdown
Contributor

Thanks for your contribution @TheCrowned. Unfortunately, your solution doesn't really cover all the bases. We'll be better off with using Flexbox in conjunction with media queries. So that for smaller viewport a module should take 100% of widh and modules should be stacked on top of each other.

If you're unfamiliar with Flexbox, here's a good starting point: https://css-tricks.com/snippets/css/a-guide-to-flexbox/

I'm tentatively punting this to 0.9

@rinatkhaziev rinatkhaziev added this to the 0.9 milestone Jun 14, 2018
@TheCrowned
Copy link
Copy Markdown
Contributor Author

Nice, I didn't know about the flex directives @rinatkhaziev! I have added them and they seem to work beautifully, even without the media queries. I have pushed an additional commit. I also took the chance to float the two buttons: one to the left and one to the right.

Tested the changes on my phone, see screenshots :)

@rinatkhaziev rinatkhaziev merged commit 3c5728f into Automattic:master Dec 18, 2018
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.

4 participants