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

Block drop zone has no background color #8115

Closed
Soean opened this issue Jul 22, 2018 · 4 comments · Fixed by #8752 or #9071
Closed

Block drop zone has no background color #8115

Soean opened this issue Jul 22, 2018 · 4 comments · Fixed by #8752 or #9071
Labels
[Feature] Drag and Drop Drag and drop functionality when working with blocks Good First Issue An issue that's suitable for someone looking to contribute for the first time Needs Design Feedback Needs general design feedback. [Type] Bug An existing feature does not function as intended

Comments

@Soean
Copy link
Member

Soean commented Jul 22, 2018

Describe the bug
When I drag an image inside an paragraph, I see a drop-zone text, but can't read the text, because the background color is missing. The background in editor/components/block-drop-zone now overrides packages/components/drop-zone, maybe introduced in #7640.

Screenshots
drop-file

@Soean Soean added [Type] Bug An existing feature does not function as intended [Feature] Drag and Drop Drag and drop functionality when working with blocks labels Jul 22, 2018
@designsimply designsimply added the Needs Testing Needs further testing to be confirmed. label Jul 24, 2018
@designsimply
Copy link
Member

Tested and confirmed with the following steps:

  1. Drag an image from another window over the top of a filled-in paragraph block.
  2. Try to read the "Drop files to upload" message.
  3. Update the paragraph block with a dark background color and a light text color.
  4. Repeat steps 1 and 2.

Result: the dropzone notice that appears when an image is dragged over the top of a paragraph block is hard to read.

screen shot 2018-07-25 at wed jul 25 8 40 11 am

screen shot 2018-07-25 at wed jul 25 8 40 30 am

Seen at http://alittletestblog.com/wp-admin/post.php?post=14036&action=edit running WordPress 4.9.7 and Gutenberg 3.3.0 using Firefox 61.0.1 on macOS 10.13.6.

@designsimply designsimply added Good First Issue An issue that's suitable for someone looking to contribute for the first time and removed Needs Testing Needs further testing to be confirmed. labels Jul 25, 2018
@Taym95
Copy link

Taym95 commented Aug 1, 2018

Hello, what should be the best fix, change the background of the DropZone component? example change it to black?

@Soean
Copy link
Member Author

Soean commented Aug 1, 2018

The DropZone has a blue background color, but it's overridden by an other component.

@karmatosed
Copy link
Member

I am reopening this as it was added without a design review. We need to now focus on getting this fixed up, we can but in future let's make sure we do before commits.

@jasmussen is going to be amazing and work on a design solution - thanks for taking this on ❤️

jasmussen pushed a commit that referenced this issue Aug 17, 2018
This PR is a followup to #8752, and fixes #8115.

It is the situation in `master` right now that every single block has instructional overlay text when dragging files from the desktop over it. This also means very short paragraphs, separators, lots of different blocks that can neither fit the upload message, nor can really _accept_ any uploads. That last part is key, because we also have a different upload indicator — the blue horizontal line. This indicator shows _where the block you're about to drop will be inserted_. Because you can drop an image file on top of a paragraph, but it will show up either _before_ the paragraph, or _after_ the paragraph, not _inside_ it.

Therefore, the upload message should not be present on top of every single block. In fact it should be present only on placeholders and galleries, where dropping a file on the block itself really _does_ insert the dropped file there.
jasmussen added a commit that referenced this issue Aug 17, 2018
* Fix issues with drag and drop over text

This PR is a followup to #8752, and fixes #8115.

It is the situation in `master` right now that every single block has instructional overlay text when dragging files from the desktop over it. This also means very short paragraphs, separators, lots of different blocks that can neither fit the upload message, nor can really _accept_ any uploads. That last part is key, because we also have a different upload indicator — the blue horizontal line. This indicator shows _where the block you're about to drop will be inserted_. Because you can drop an image file on top of a paragraph, but it will show up either _before_ the paragraph, or _after_ the paragraph, not _inside_ it.

Therefore, the upload message should not be present on top of every single block. In fact it should be present only on placeholders and galleries, where dropping a file on the block itself really _does_ insert the dropped file there.

* Avoid showing the drop zone text on paragraph Block DropZoneswq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Drag and Drop Drag and drop functionality when working with blocks Good First Issue An issue that's suitable for someone looking to contribute for the first time Needs Design Feedback Needs general design feedback. [Type] Bug An existing feature does not function as intended
Projects
None yet
4 participants