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

Voucher, Discounts, Media migrations to new macaw-ui #5158

Closed
wants to merge 24 commits into from

Conversation

Cloud11PL
Copy link
Member

@Cloud11PL Cloud11PL commented Sep 12, 2024

  • Media tile, media upload, dropzone
  • Voucher details
  • Channel availability dialog
  • Category image upload
  • Some old discounts components
  • Tabs

What type of PR is this?

  • 💅 Refactor
  • 🌟 Feature
  • 🔥 Bug Fix
  • 🔩 Maintenance
  • 🛠 Workflow CI/CD changes

Related Issues or Documents

  • closes #

Usage Instructions, Screenshots, Recordings

Before After
CleanShot 2024-09-12 at 15 56 42 CleanShot 2024-09-12 at 15 59 34
CleanShot 2024-09-12 at 16 01 03 CleanShot 2024-09-12 at 16 00 42
CleanShot 2024-09-12 at 16 05 34 CleanShot 2024-09-12 at 16 05 58
CleanShot 2024-09-13 at 12 11 09 CleanShot 2024-09-13 at 12 10 32

Have you written tests?

  • Yes!
  • No... here is why: Writing tests are mandatory, please replace this text with why test are not included in this PR

[Optional] Description

Copy link

changeset-bot bot commented Sep 12, 2024

🦋 Changeset detected

Latest commit: 0c6897a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
saleor-dashboard Patch

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

@github-actions github-actions bot temporarily deployed to pr-5158 September 12, 2024 09:04 Destroyed
@Cloud11PL Cloud11PL marked this pull request as ready for review September 13, 2024 10:20
@Cloud11PL Cloud11PL requested a review from a team as a code owner September 13, 2024 10:20
@github-actions github-actions bot temporarily deployed to pr-5158 September 13, 2024 10:22 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5158 September 13, 2024 11:02 Destroyed
const handleDrop = (acceptedFiles: File[]) => {
const fileList: FileList = {
...acceptedFiles,
length: 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.

I don't think you need that

Suggested change
length: acceptedFiles.length,

Copy link
Member Author

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

Copy link
Member

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?

Copy link
Member Author

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 😅

Copy link
Member Author

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/components/ImageUpload/ImageUpload.tsx Show resolved Hide resolved
@Cloud11PL Cloud11PL requested a review from a team as a code owner September 17, 2024 08:25
@github-actions github-actions bot temporarily deployed to pr-5158 September 17, 2024 08:32 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5158 September 17, 2024 09:32 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5158 September 17, 2024 10:13 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5158 September 17, 2024 10:28 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5158 September 17, 2024 11:01 Destroyed
}) => (
<>
{channels.map((option, index) => {
const hasMoreChannels = index < channels.length - 1;
Copy link
Member

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

Suggested change
const hasMoreChannels = index < channels.length - 1;
const isLastChannel = index === channels.length - 1;

src/components/ImageUpload/ImageUpload.tsx Outdated Show resolved Hide resolved
src/index.css Outdated Show resolved Hide resolved
@github-actions github-actions bot temporarily deployed to pr-5158 September 18, 2024 11:22 Destroyed
Copy link
Member

@poulch poulch left a comment

Choose a reason for hiding this comment

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

I did small QA:

  1. Edit icon button does not trigger any action
    Screenshot 2024-09-18 at 14 27 46

  2. This input is still old, shuldn't be replace by new one?:
    Screenshot 2024-09-18 at 14 37 23

src/components/MediaTile/MediaTile.tsx Outdated Show resolved Hide resolved
@github-actions github-actions bot temporarily deployed to pr-5158 September 18, 2024 12:58 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5158 September 18, 2024 14:17 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5158 September 18, 2024 14:51 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5158 September 18, 2024 15:19 Destroyed
@andrzejewsky
Copy link
Member

andrzejewsky commented Sep 19, 2024

Quick QA:

  • Scroll for channel selection does not work anymore:

Screenshot 2024-09-19 at 09 52 18

  • Not regression in this PR, but seems also like recent changes, it does look properly (label optional):
    Screenshot 2024-09-19 at 10 00 46

  • Inconsistency: we have change the modal for assigning channels (manage button), but we kept assigning products in the old version, on the same view
    Screenshot 2024-09-19 at 10 05 47
    The migration has been tackled from the wrong side, eg. we could have migrate all selection modals first in single PR, then all media managements in another PR and finally all collection page

@Cloud11PL
Copy link
Member Author

@andrzejewsky
Ad 1. I changed it so that that particular modal has similar height to before (note: the height will be inconsistent with other modals in that view)
Ad 2. I do not understand that comment.
Ad 3. I didn't want to do that in this PR as I was already beyond the timebox.

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).

Copy link

github-actions bot commented Oct 5, 2024

This pull request is stale because it has been open 14 days with no activity.

@github-actions github-actions bot added the stale label Oct 5, 2024
Copy link

github-actions bot commented Oct 7, 2024

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

@github-actions github-actions bot closed this Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants