Polaris-react: DropZone height is not respected

Created on 12 Dec 2018  路  7Comments  路  Source: Shopify/polaris-react

Issue summary

The <DropZone /> determines its size (height and width) based on width only. This makes certain valid use cases, where the default DropZone height isn't appropriate, impossible. For instance, this one:

DropZone is configurable to work at various sizes, however. For example:

Default

50 height, 50 width
screen shot 2018-12-12 at 2 06 50 pm

So far, so good. Until...

50 height, unspecified width
screen shot 2018-12-12 at 2 08 19 pm

Expected behavior

I would expect something more like:

50 height, unspecified width
screen shot 2018-12-12 at 2 12 07 pm

Actual behavior

50 height, unspecified width
screen shot 2018-12-12 at 2 08 19 pm

Notice that the DropZone is cut off at the bottom. That is because it actually returns to its default size (shown above).

Steps to reproduce the problem

  1. Go to https://polaris.shopify.com/components/actions/drop-zone
  2. Paste this code: <div style={{height: 50}}><DropZone /></div>

Specifications

  • Are you using the React components? (Y):
  • Polaris version number: latest
  • Browser: All
  • Device: All
  • Operating System: All
Icebox 馃悰Bug

Most helpful comment

Yes, I鈥檒l open this now. @asalisbury

All 7 comments

馃憢 Thanks for opening your first issue. A contributor should give feedback soon. If you haven鈥檛 already, please check out the contributing guidelines. You can also join #polaris on the Shopify Partners Slack.

This bug is not fixed - still the DropZone doesn't respect the given height of the wrapper div.
Is this working for anybody?

Looks like #1138 is under review. This should probably be reopened until that PR merges. Does that sound right, @elizabethletourneau?

Yes, I鈥檒l open this now. @asalisbury

Thanks so much!

Is there an update on this issue? We ran into a similar problem, the height of the DropZone is not calculated correctly.

https://github.com/Shopify/web/issues/22382

This issue has been inactive for 180 days and labeled with Icebox. It will be closed in 7 days if there is no further activity.

Was this page helpful?
0 / 5 - 0 ratings