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

Update drop zone to Polaris v3.10.0 #299

Merged
merged 10 commits into from
Mar 29, 2019

Conversation

andrewpye
Copy link
Member

Adds the React implementation's reset inputHTMLElement to allow duplicate files change.

@andrewpye andrewpye self-assigned this Mar 26, 2019
@andrewpye
Copy link
Member Author

@vladucu
Copy link
Member

vladucu commented Mar 27, 2019

There are a bunch of other changes here from what I can see, or I'm wrong?

@andrewpye
Copy link
Member Author

There are a bunch of other changes here from what I can see, or I'm wrong?

Wondering what those changes are in case I missed anything - just checked the diff again and the majority of the changes are import restructuring and updates to use the icon code changes which we don't have at this point (and can't have at this point, see Shopify/polaris#385 for details).

@vladucu
Copy link
Member

vladucu commented Mar 27, 2019

Wondering what those changes are in case I missed anything

Shopify/polaris@v2.11.0...v3.10.0#diff-7ee058419e736ffe4c643519496b920fR426

@andrewpye
Copy link
Member Author

lol... the diff is too big to show me what you're pointing out 😅 Were there any lines in particular that worried you? I'll accept a screen grab since github can't handle such large diffs 😉

@vladucu
Copy link
Member

vladucu commented Mar 27, 2019

screen-shot
Screen Shot 2019-03-27 at 12 53 35 PM

@andrewpye
Copy link
Member Author

@vladucu updated with the changes I missed earlier - thanks for spotting those! 🙌

There are a handful of new tests that were added for overlayText and errorOverlayText on different screen sizes - I'll add them in the morning 👍

Copy link
Contributor

@tomnez tomnez left a comment

Choose a reason for hiding this comment

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

Do we want to update the file name attributes in polaris-drop-zone/file-upload too? We're still using IconDragDrop, AssetFileUpload, and AssetImageUpload.

Screen Shot 2019-03-27 at 12 04 33 PM

@andrewpye andrewpye requested a review from tomnez March 28, 2019 10:42
@andrewpye
Copy link
Member Author

@tomnez yeah I originally left those file name updates as part of the bigger icon update that we'll need to do in the future, but realised there wasn't really any reason not to update them now so that's done.

I've also added the tests I referred to yesterday, so this should be complete now 🙏

Copy link
Contributor

@tomnez tomnez left a comment

Choose a reason for hiding this comment

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

🎉 Aw yiss

Copy link
Member

@vladucu vladucu left a comment

Choose a reason for hiding this comment

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

Few small things and

@tomnez yeah I originally left those file name updates as part of the bigger icon update that we'll need to do in the future, but realised there wasn't really any reason not to update them now so that's done.

I don't see these changed...maybe a Github glitch?!?

addon/components/polaris-drop-zone.js Outdated Show resolved Hide resolved
dragging: false,
error: rejectedFiles.length > 0,
});
state.incrementProperty('numFiles', acceptedFiles.length);
Copy link
Member

Choose a reason for hiding this comment

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

nit: should we just move in the setProperties above instead of using incrementProperty?

@@ -13,11 +13,11 @@
{{else if (eq size "large")}}
{{#polaris-stack vertical=true spacing="tight"}}
{{#if (eq type "file")}}
{{svg-jar assetFileUpload class=imageClasses}}
{{svg-jar fileUpload class=imageClasses}}
Copy link
Member

Choose a reason for hiding this comment

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

this might be my bad when initially implemented....but instead of an svg elements, we should be using img

Copy link
Member

Choose a reason for hiding this comment

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

don't think there was a specific reason for doing this

@tomnez
Copy link
Contributor

tomnez commented Mar 28, 2019

@vladucu maybe you're looking at an older diff or something? I see the changes in addon/components/polaris-drop-zone/file-upload.js when I visit the diff tab.

@vladucu
Copy link
Member

vladucu commented Mar 28, 2019

hmm, @tomnez I only see some renaming
Screen Shot 2019-03-28 at 8 40 19 PM

@tomnez
Copy link
Contributor

tomnez commented Mar 28, 2019

@vladucu yeah that was the change I requested. What else were you thinking was there?

Although it looks like the rename of iconDragDrop to DragDropMajorMonotone was missed 😕

Edit: Maybe when @andrewpye said "file name updates" he meant "variable name updates" since thats what I was asking about.

@andrewpye
Copy link
Member Author

Although it looks like the rename of iconDragDrop to DragDropMajorMonotone was missed 😕

@tomnez this was deliberate - since Polaris switched to using @shopify/polaris-icons, all of their icon SVGs have changed name. We can't currently take those changes (discussion with Shopify is here) so we need to keep using the same old icon names for the time being, until we can start using the new icon formats.

@vladucu
Copy link
Member

vladucu commented Mar 29, 2019

@tomnez this was deliberate - since Polaris switched to using @shopify/polaris-icons, all of their icon SVGs have changed name. We can't currently take those changes (discussion with Shopify is here) so we need to keep using the same old icon names for the time being, until we can start using the new icon formats.

ohh, so only the icon names changed here....but the actual icon didnt?

@andrewpye
Copy link
Member Author

ohh, so only the icon names changed here....but the actual icon didnt?

TBH I haven't checked the new icon, but from what I've seen they've just changed the naming to be more explicit, and capitalised it to reflect the fact that the icons are now React components instead of SVG files. The way I see it, we need to make a fairly hefty overhaul to polaris-icon which we can't do yet so I'm thinking we leave icons as they are for now and revisit icon usages at the time of that update, thoughts?

@vladucu
Copy link
Member

vladucu commented Mar 29, 2019

TBH I haven't checked the new icon, but from what I've seen they've just changed the naming to be more explicit, and capitalised it to reflect the fact that the icons are now React components instead of SVG files. The way I see it, we need to make a fairly hefty overhaul to polaris-icon which we can't do yet so I'm thinking we leave icons as they are for now and revisit icon usages at the time of that update, thoughts?

works for me...maybe add a TODO so we don't forget?

@andrewpye
Copy link
Member Author

works for me...maybe add a TODO so we don't forget?

Should be pretty clear anyway, we'll need to update all polaris-icon usages so a TODO seems unnecessary 🤷‍♂️

Copy link
Member

@vladucu vladucu left a comment

Choose a reason for hiding this comment

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

I think we gucci here ✨

@andrewpye andrewpye merged commit a359913 into update/polaris-v3.10.0 Mar 29, 2019
@delete-merged-branch delete-merged-branch bot deleted the update/drop-zone-v3.10.0 branch March 29, 2019 14:38
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.

None yet

3 participants