pil0u / lewagon-aoc

Advent of Code x Le Wagon
https://aoc.lewagon.community/
MIT License
28 stars 5 forks source link

feat(snippets): Update reactions with javascript #419

Closed wJoenn closed 3 weeks ago

wJoenn commented 10 months ago

Summary of changes and context

The point of this PR is to make the reaction smoother by updating the DOM without refreshing (to avoid jumping back to the top at every interactions) and updating the DB with fetch

Javascript now handles selecting the correct path to fetch so we don't need the 3 different buttons per reaction anymore.

In order to respond to the Stimulus controller, the ReactionsController now only render json objects instead of redirecting or rendering ViewTemplates.

https://github.com/pil0u/lewagon-aoc/assets/75388869/535d25b7-3c99-4e15-a3a0-3ba3069a308d

Sanity checks

wJoenn commented 4 weeks ago

J'avais pas de changement de prevu non, pour moi ca peut etre merge

wJoenn commented 3 weeks ago

🚀