laem / cartes

L'appli Web de cartes grand public
https://cartes.app
GNU Affero General Public License v3.0
172 stars 21 forks source link

<OpenIndicator /> est faux lorsqu'un lieu est ouvert 24/24 #537

Open kevinvennitti opened 1 month ago

kevinvennitti commented 1 month ago

Exemple ici :

screencapture-2024-08-10-22 07 27

Dans OpeningHours.tsx, ce lieu semble avoir ìsOpen = false, ce qui conditionne la couleur de la pastille. Par contre, le message est correct car il s'appuie sur nextChange.

waterced commented 1 month ago

Précisément, quand on regarde le noeud, on a opening_hours="Selon la programmation de la Cité de l'architecture". Le message Ouvert24/24 7j/7 n'est donc pas correct, il faudrait améliorer la façon dont on parse pour afficher ces messages customs qui semblent bien conformes au wiki.

waterced commented 1 month ago

A parcourir le code je constate qu'on fait appel à un parser extérieur ("opening_hours": "^3.8.0",) je suppose que c'est celui-ci https://packages.ecosyste.ms/registries/npmjs.org/packages/opening_hours

waterced commented 1 month ago

On a dans la doc:

Comments

  • Supports (additional) comments (Mo unknown "on appointment"; Th-Fr 09:00-18:00 open "female only"; Su closed "really")
    • The string which is delimited by double-quotes can contain any character (except a double-quote sign)
    • unknown can be omitted (just a comment (without state) will also result in unknown) - value can also be just a double-quoted string ("on appointment") which will result in unknown for any given time.

Reste à comprendre si la valeur unknown est prise en charge actuellement