-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Voucher, Discounts, Media migrations to new macaw-ui #5158
Conversation
🦋 Changeset detectedLatest commit: 0c6897a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
...components/ChannelsAvailabilityDialogChannelsList/ChannelsAvailabilityDialogChannelsList.tsx
Outdated
Show resolved
Hide resolved
const handleDrop = (acceptedFiles: File[]) => { | ||
const fileList: FileList = { | ||
...acceptedFiles, | ||
length: acceptedFiles.length, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need that
length: acceptedFiles.length, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why Dashboard uses FileList
but for this interface length
is required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but you already spread length
above ...acceptedFiles
, Is it any other reason to pass it like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tbh TS showed me an error and that's why I passed it explicitly. Now I checked again and you're right, it's not necessary, thanks 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I just tested this again, it turns out length
has to be explicitly passed, otherwise it's not in the fileList
object
src/discounts/components/DiscountCategories/DiscountCategories.tsx
Outdated
Show resolved
Hide resolved
src/categories/components/CategoryBackground/CategoryBackground.tsx
Outdated
Show resolved
Hide resolved
}) => ( | ||
<> | ||
{channels.map((option, index) => { | ||
const hasMoreChannels = index < channels.length - 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Wouldn't be more clear to name it like that
const hasMoreChannels = index < channels.length - 1; | |
const isLastChannel = index === channels.length - 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andrzejewsky If I did only modal migrations then there would be still inconsistencies between the modal and eg. collection page checkboxes (because if I understand the correctly that's the issue with this PR). |
This pull request is stale because it has been open 14 days with no activity. |
This PR request has been closed because it has been stalled for 2 days with no activity. You are still welcome to reopen it and continue from where you finished. Best regards Saleor team |
What type of PR is this?
Related Issues or Documents
Usage Instructions, Screenshots, Recordings
Have you written tests?
[Optional] Description