Nouveautés: correction de l'affichage de la modale#6313
Merged
Conversation
supports_local_storage was only available in demo & review-apps as a side-effect of the demo_accounts modal. Instead define the helper where it is needed.
rsebille
approved these changes
Jun 11, 2025
rsebille
left a comment
Contributor
There was a problem hiding this comment.
Effectivement on pourrais se dire qu'on la supprime : https://caniuse.com/mdn-api_window_localstorage
Ou alors la mettre dans utils.js ou un compat.js chargé plus haut 🤷, au moins ça évitera la duplication de code.
local_storage is widely available in all major browsers since at least 10 years
Contributor
Author
|
J'ai droppé la fonction. Je reste sur 2 commits pour que le problème et son fix soient bien clairs. |
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.
🤔 Pourquoi ?
La fonction
supports_local_storagen'était dispo que sur la démo & les recettes jetables, pour l'affichage de la modale de connexion des comptes de démo.La modale de nouveautés n'a donc jamais fonctionné en production 🙈 🥲 .
🍰 Comment ?
En définissant la fonction uniquement là où elle est utilisée.
Mais je me demande si on ne pourrait pas complètement la supprimer au vu de la compatibilité des navigateurs:
https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage#browser_compatibility
🚨 À vérifier
🏝️ Comment tester ?
💻 Captures d'écran