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

Fixes position of upload svg on mobile #2693

Merged
merged 2 commits into from
Sep 22, 2017
Merged

Conversation

karmatosed
Copy link
Member

@karmatosed karmatosed commented Sep 7, 2017

This works for any 'not large' device.

Fixes #2671

This was before on an iPhone 7 Plus

img_1441 png

After

Mobile:

screen shot 2017-09-22 at 09 04 26

Desktop:

screen shot 2017-09-22 at 09 09 39

This works for any 'not large' device.
@karmatosed karmatosed changed the title Fixes position of svg on mobile Fixes position of upload svg on mobile Sep 7, 2017
@codecov
Copy link

codecov bot commented Sep 7, 2017

Codecov Report

Merging #2693 into master will increase coverage by 0.24%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2693      +/-   ##
==========================================
+ Coverage   33.69%   33.93%   +0.24%     
==========================================
  Files         185      185              
  Lines        5594     5743     +149     
  Branches      976     1020      +44     
==========================================
+ Hits         1885     1949      +64     
- Misses       3141     3203      +62     
- Partials      568      591      +23
Impacted Files Coverage Δ
components/form-file-upload/index.js 71.42% <ø> (ø) ⬆️
editor/header/index.js 0% <0%> (ø) ⬆️
editor/writing-flow/index.js 0% <0%> (ø) ⬆️
editor/modes/visual-editor/block.js 0% <0%> (ø) ⬆️
blocks/library/image/block.js 0% <0%> (ø) ⬆️
blocks/api/registration.js 100% <0%> (ø) ⬆️
editor/modes/text-editor/index.js 0% <0%> (ø) ⬆️
editor/sidebar/index.js 0% <0%> (ø) ⬆️
editor/modes/visual-editor/block-crash-boundary.js 0% <0%> (ø) ⬆️
...ebar/post-taxonomies/hierarchical-term-selector.js 0% <0%> (ø) ⬆️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a93c553...b2d861b. Read the comment docs.

Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

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

Is #1745 the right issue to be closing? I'm not sure what to be testing here.

@@ -106,6 +106,13 @@
margin-bottom: 0;
}

@media ( max-width: $break-large ) {
.wp-core-ui .button.wp-block-image__upload-button.button.button-large {
padding: 6px 21px 6px 6px;
Copy link
Member

Choose a reason for hiding this comment

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

Mixed spaces / tabs here.

@gziolo
Copy link
Member

gziolo commented Sep 21, 2017

@karmatosed, it looks like wrong issue is referenced here. Can you provide some testing instructions here?

@@ -106,6 +106,13 @@
margin-bottom: 0;
}

@media ( max-width: $break-large ) {
Copy link
Member

@mtias mtias Sep 21, 2017

Choose a reason for hiding this comment

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

Can we use @include break-large() on the upload button component?

Copy link
Member

Choose a reason for hiding this comment

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

Updated to make it mobile first and moved styling to the component's style file.

@karmatosed
Copy link
Member Author

karmatosed commented Sep 21, 2017

I have updated with the issue it should have referenced, my apologies it was relating to a different issue. #2671

@gziolo gziolo self-assigned this Sep 22, 2017
@gziolo
Copy link
Member

gziolo commented Sep 22, 2017

@mtias can you validate my style changes? Just saying, I'm not an expert in this field :)

@mtias
Copy link
Member

mtias commented Sep 22, 2017

@gziolo seems good, though you might also have to do for galleries (that's why I was hoping it could be done for https://github.com/WordPress/gutenberg/tree/master/blocks/media-upload-button directly).

@gziolo
Copy link
Member

gziolo commented Sep 22, 2017

It makes sense, I will update 👍

@gziolo gziolo force-pushed the try/mobile-upload-svg-position branch from caac15d to 6bde531 Compare September 22, 2017 11:01
@gziolo
Copy link
Member

gziolo commented Sep 22, 2017

It's a different component <FormFileUpload /> :) Anyways updated and it syncs nicely between those two mentioned blocks:

screen shot 2017-09-22 at 13 02 13

@@ -0,0 +1,11 @@
.components-form-file-upload {
Copy link
Member

Choose a reason for hiding this comment

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

The file should be style.scss not editor; editor.scss is used to differentiate editor styles for blocks.

Copy link
Member

Choose a reason for hiding this comment

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

I see. It makes sense, but it's a bit confusing. I assumed that it needs to be editor view as this is where it only applies :)

Copy link
Member

Choose a reason for hiding this comment

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

The editor / style split is only for blocks, as we need to load those on the front end, and we don't want to pull block styles that are meant for the editor.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for making it clear :) It's now updated to match the convention.

@gziolo gziolo force-pushed the try/mobile-upload-svg-position branch from 6bde531 to b2d861b Compare September 22, 2017 11:54
@mtias
Copy link
Member

mtias commented Sep 22, 2017

🚢 it

@gziolo gziolo merged commit 26369c3 into master Sep 22, 2017
@gziolo gziolo deleted the try/mobile-upload-svg-position branch September 22, 2017 12:04
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