Skip to content

Conversation

@lanfisis
Copy link
Contributor

@lanfisis lanfisis commented Apr 11, 2025

  • README compatibilities updated
  • README link to branch for Sylius 1.x compatibility
  • UPGRADE small guide
  • Update recipe in Mbiz repo

Demo

Select a file

add_image.mov

Select a file but with type error

not_of_type.mov

Remove a file

remove_image.mov

Upload file

upload_from_type.mov

Upload file with error

upload_with_bad_type.mov

Delete file with confirm

delete_file_with_confirm.mov

Add subfolder

add_subfolder.mov

Tests

For tests [TYPE] will be:

  • image
  • video
  • pdf
  • favicon
  • audio
  • file
  • Open file selection modal when click on "Choose a [TYPE]" button
  • Remove value of input when click on "Remove [TYPE]" button
  • Add file of [TYPE] when click on file name on the list
  • Error message is display if clicked file is not of [TYPE]
  • Can remove file from list clicking the garbage button with TWO confirmation modal
  • If cancel on deleting file process, nothing appends
  • It's possible to upload file from [TYPE] in current folder
  • File is suffixed by number if another file with same name exists in current folder
  • Error message is display if file too heavy
  • Error message is display if file not from [TYPE]
  • Possibility to go to a sub folder
  • Possibility to go to parent folder you are not in the root folder
  • Possibility to delete a subfolder if it empty clicking the garbage button with TWO confirmation modal
  • Can add a subfolder to the current folder
  • If another subfolder exists with the same name, an error is display
  • Can rename current folder if it's not the root with TWO confirmation modal
  • If a folder with the same names exists, an error is display

Know potential bugs or problems

  • Sometime when switching between modal, the black transparent background of Boostrap modal not removed
  • Some blink when components reload, could be anoying

lanfisis added 27 commits April 11, 2025 17:14
@lanfisis lanfisis requested review from delyriand and maximehuran and removed request for delyriand April 11, 2025 15:43
@@ -0,0 +1,62 @@
{% extends '@SyliusShop/shared/components/confirmation_modal.html.twig' %}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

🎯 suggestion:

Suggested change
{% extends '@SyliusShop/shared/components/confirmation_modal.html.twig' %}
{% extends '@SyliusAdmin/shared/components/confirmation_modal.html.twig' %}

@@ -0,0 +1,6 @@
sylius_twig_hooks:
hooks:
# There is no other global hook to use in the admin size
Copy link
Contributor Author

Choose a reason for hiding this comment

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

💣 chore:

Suggested change
# There is no other global hook to use in the admin size
# There is no other global hook to use in the admin side

Copy link
Member

@maximehuran maximehuran left a comment

Choose a reason for hiding this comment

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

Filter on file selection
If the media manager aske me for an image, I can only select an image.

Now, I can select any type of file

image

Big file upload
image

Maybe we can check the behaviour on v1 or add a php ini in test file to allow big files to upload and make the Symfony validation works

Form fields labels
Can we have sample labels for fields ?

image

SVG not displayed
Maybe the same for ico ?

image

We can have an eye icon with link if we cannot display the image directly

Folder selection
We see the previous folder while the new is loading.
Can we empty the display when we close the modal ?

Enregistrement.de.l.ecran.2025-05-05.a.11.00.17.mov

public function createParentLinkFile(string $absoluteDirectoryPath): FileInterface
{
$file = new File();
$file->setName('...');
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
$file->setName('...');
$file->setName('..');

@lanfisis lanfisis changed the base branch from master to 2.x May 5, 2025 09:26
@lanfisis
Copy link
Contributor Author

lanfisis commented May 5, 2025

SVG not displayed

Maybe the same for ico ?

image

We can have an eye icon with link if we cannot display the image directly

It's ok on chrome

image

@lanfisis
Copy link
Contributor Author

lanfisis commented May 5, 2025

Filter on file selection

If the media manager aske me for an image, I can only select an image.

Now, I can select any type of file

image

It's ok now

@lanfisis lanfisis requested review from delyriand and maximehuran May 5, 2025 10:09
@lanfisis lanfisis merged commit 7111770 into monsieurbiz:2.x May 13, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants