readthedocs-fr / bin-server

Un outil pour héberger des snippets de code et les partager via une URL.
https://bin.readthedocs.fr
MIT License
14 stars 15 forks source link

feat(front): improve bin deletion UX #157

Open Mesteery opened 2 years ago

Mesteery commented 2 years ago

The bin deletion via the interface was completly impratical.

From now on, the token storage is done automatically. Indeed, a Service Worker is registered to intercept in particular the request of the form and the request of the final page (redirection). This allows to associate the token with the bin ID, which is not known in advance.

In the background, the IndexedDB database is used via the localforage abstraction, which allows to easily store key-value in the same way as the localStorage (which is not available in a Service Worker).

This feature is only available for the clients with JavaScript enabled.

Closes: https://github.com/readthedocs-fr/bin-server/issues/147.

Julien00859 commented 2 years ago

When you'll resolve the conflict, could you add a comment for the noscript tag explaining that the feature requires javascript and that this bit of code hide the menu in no-script environments ?

Mesteery commented 2 years ago

When you'll resolve the conflict, could you add a comment for the noscript tag explaining that the feature requires javascript and that this bit of code hide the menu in no-script environments ?

Done

Julien00859 commented 2 years ago

Still waiting for a third person to review and test this branch!

Mesteery commented 2 years ago

cc @fusetim or anyone who wants to test this.

fusetim commented 2 years ago

Might take a while for me

Mesteery commented 2 years ago

bump @Julien00859?

AntoineJT commented 2 years ago

De mon côté le bouton de suppression de bin ne s'affiche pas Ai-je mal fait quelque chose ? @Mesteery