Corrige l'option « conserver dans mes albums » jamais affichée dans la modale#357
Merged
Merged
Conversation
…ant en string Twig `in` ne caste pas automatiquement un objet Uuid pour le comparer aux strings RFC4122 de filesInAlbum : l'option "conserver dans mes albums" n'apparaissait jamais dans la modale de suppression (#246), même pour un fichier dans un album.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Résumé
Suite au merge de #356 (#246), la modale de suppression n'affichait jamais l'option « conserver dans mes albums », même pour un fichier appartenant à un album — comportement observé en test manuel sur
/explorer.Cause :
templates/components/FoldersGrid.html.twigcomparaitfile.id(objetSymfony\Component\Uid\Uuid) directement àfilesInAlbum(tableau de strings RFC4122) via l'opérateur Twigin, qui ne caste pas automatiquement l'objet — la comparaison échouait donc toujours silencieusement.Fix : cast explicite
(file.id ~ '')avant la comparaison.Test plan
testExplorerRendersDeleteButtonWithInAlbumTrueWhenFileHasMediaInAlbum./vendor/bin/phpunit— 924 tests, 0 échec (hors 1 échec Tailwind préexistant sans rapport)