Skip to content

Improve style of inserter UI#608

Merged
pinarol merged 6 commits intodevelopfrom
issue/349-improve-inserter-ui
Feb 18, 2019
Merged

Improve style of inserter UI#608
pinarol merged 6 commits intodevelopfrom
issue/349-improve-inserter-ui

Conversation

@pinarol
Copy link
Copy Markdown
Contributor

@pinarol pinarol commented Feb 18, 2019

Fix: #349

  • Remove the title
  • Make column number dynamic
  • Update icon/text colors
  • Update width/height of icons
  • Update Button width/height
  • Update justifying to content behavior

Some screenshots to demonstrate portrait/landscape modes for different number of items:

screen shot 2019-02-18 at 13 01 41

screen shot 2019-02-18 at 13 01 33

screen shot 2019-02-18 at 13 02 18

screen shot 2019-02-18 at 13 02 25

screen shot 2019-02-18 at 13 15 53

Resepecting Safe Area:

screen shot 2019-02-18 at 14 01 49

screen shot 2019-02-18 at 14 01 56

Android:

screen shot 2019-02-18 at 13 21 18

TO TEST

For WPiOS

Checkout the PRs branch to any arbitrary folder and cd .. to it
run yarn install, yarn start
Open XCode WPiOS on the latest develop
Clean build folder on Xcode, and then run the app

For WPAndroid

open grade.properties at WordPress-Android folder
add wp.BUILD_GUTENBERG_FROM_SOURCE = true to grade.properties
checkout the PRs branch in the subrepo of WordPress-Android repo
cd to WordPress-Android/libs/gutenberg-mobile
run yarn install, yarn start
yarn wpandroid on a separate terminal in the same directory

Test Steps:

  • Check that style matches with the latest designs
  • Check that there's no anomaly in the inserter functionality
  • Check with different device types and verify nothing looks odd.

- Remove the title
- Make column number dynamic
- Update width/height of icons
- Update Button width/height
- Update justifying to content behavior
@pinarol pinarol force-pushed the issue/349-improve-inserter-ui branch from debfeda to 858a17b Compare February 18, 2019 10:04
@pinarol pinarol changed the title [Not Ready]Improve style of inserter UI Improve style of inserter UI Feb 18, 2019
@pinarol
Copy link
Copy Markdown
Contributor Author

pinarol commented Feb 18, 2019

hey @iamthomasbishop could you go over the screenshots one last time? Especially the iPhone X ones, I applied safe area margins as an addition to already existing margins, I am not sure how they look actually. Thanks!

@etoledom
Copy link
Copy Markdown
Contributor

@pinarol - Thanks for wrangling this!
Do you think it's possible to use our BottomSheet component for the inserter?

import { BottomSheet } from '@wordpress/editor';
https://github.com/WordPress/gutenberg/tree/master/packages/editor/src/components/mobile/bottom-sheet

This component has the style an behavior used in the Image block (and hopefully soon in the Links Settings too)
It also should (hopefully) work well with SafeAreas by default, and soon will be constrained to a maximum width.

@pinarol
Copy link
Copy Markdown
Contributor Author

pinarol commented Feb 18, 2019

@etoledom will try that, thanks!

@pinarol
Copy link
Copy Markdown
Contributor Author

pinarol commented Feb 18, 2019

Let's wait till my BottomSheet update gets finished to review, I'll update the screenshots also. Currently labeling as not ready to review.

@pinarol
Copy link
Copy Markdown
Contributor Author

pinarol commented Feb 18, 2019

Switching to BottomSheet turned out to be more troublesome than expected so @etoledom and I decided to ship that on a separate PR not to block this one. Removing the 'not ready to review' label. Let's keep on reviewing.

@iamthomasbishop
Copy link
Copy Markdown
Contributor

This is looking really great, nice work @pinarol! This looks so close to the BottomSheet component that I just assumed it was using it 😄 I would also prefer that we use it if it's not a huge pain, because we get a bunch of wins as @etoledom mentioned in terms of sizing and constraints.

A couple super tiny details that I'm curious about:

  1. What is the current value of the border-radius on block buttons? IIRC the preferred value is 8, they currently (to my eye) look ~2-4? 🕵️‍♂️

  2. How much margin is defined at the bottom of the list of block-types? It looks pretty good on the examples without the home indicator/safe area, but on instances where we account for the safe area, we might not need so much space. To my eye (guessing), it looks like ~24 margin at the bottom of the list, whereas we might only need ~8-16.

One more question: Where are we getting the block-type icons from? Are they dynamic, in that do they pull from somewhere or are we "hard-coding" them? Just curious as icons are/will be shifting a little bit over the next few months.

Copy link
Copy Markdown
Contributor

@etoledom etoledom left a comment

Choose a reason for hiding this comment

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

It looks super good! 🎉

There are a few visual/behavior details that can be fixed by using BottomSheet component, so those are not important for now. Let's focus on the buttons design and :shipit: after @iamthomasbishop's ✅

@pinarol
Copy link
Copy Markdown
Contributor Author

pinarol commented Feb 18, 2019

hey @iamthomasbishop 👋
We will be refactoring this to use the BottomSheet component but first it needs to be updated to be more reusable with different paddings and also it needs to provide its width to outside components (that is also related with the other PR that is not merged yet). And a few other technical problems raised in the way. But I am positive this week we'll make it.

  1. What is the current value of the border-radius on block buttons

It is 4, updating this as 8.

2. How much margin is defined at the bottom of the list of block-types?

Normally without the safe area 12+6 = 18. 6 is the default bottom padding for each button item, 12 is the bottom padding of the container.

But safe area brings an additional +34 in portrait mode and +21 in landscape mode.

Here are some screenshots when I remove the extra 12 padding:

screen shot 2019-02-18 at 18 45 41

screen shot 2019-02-18 at 18 45 50

Here are some screenshots when I remove that 18 padding completely:

screen shot 2019-02-18 at 18 41 17

screen shot 2019-02-18 at 18 41 26

Which one do you prefer?

Where are we getting the block-type icons from?

I am re-using what was already defined for common usage between web and mobile. I didn't hard code them so I think we'll be getting updates automatically.

@iamthomasbishop
Copy link
Copy Markdown
Contributor

Which one do you prefer?

I prefer the last example (remove margin completely).

I am re-using what was already defined for common usage between web and mobile.

Perfect! 😄

- Update bottom padding for SafeArea screens
- Update border-radius
@pinarol pinarol merged commit e664fa0 into develop Feb 18, 2019
@pinarol pinarol deleted the issue/349-improve-inserter-ui branch February 18, 2019 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants