theodinproject icon indicating copy to clipboard operation
theodinproject copied to clipboard

Update Javascript handling the user settings page

Open CouchofTomato opened this issue 3 years ago • 5 comments

Description

Some of the legacy Javascript can now be updated so we can eventually remove the depedency on jquery.

As part of this we need to update this file to use a Stimulus Controller.

Suggest reading to help you: https://stimulus.hotwired.dev/ and https://www.betterstimulus.com/

Acceptance Criteria:

  1. The Admin Flash operates as it currently does
  2. A stimulus controller is created to handle the interaction

Additional Information:

Stimulus controllers are all about finding the correct level of abstraction. The suggested reading for better stimulus covers this.

CouchofTomato avatar Nov 15 '21 14:11 CouchofTomato

@CouchofTomato curious about why this issue was put on hold. If the situation has changed in regards to why this is on hold I can start working on this one.

linkonsat avatar Apr 12 '22 19:04 linkonsat

I honestly can't remember mate. I should probably have made a note. I think it's because of a lot of other changes that were happening. I don't have an issue with it being worked on though.

CouchofTomato avatar Apr 12 '22 19:04 CouchofTomato

Sweet. I'll start work on this one next then!

linkonsat avatar Apr 12 '22 20:04 linkonsat

~~It would be worth researching a bit how others are doing this with Stimulus @linkonsat if you don't mind? It will be difficult and clunky adapting our existing form validation code to a Stimulus controller.~~

Sorry, I thought this was the form validations issue somehow 😆

But it would be worth holding off on the settings page JS. It's a perfect use case for Hotwire turbo frames. We're going to try getting that in the app during the tailwind move. There are a few areas that need it.

KevinMulhern avatar Apr 12 '22 21:04 KevinMulhern

All good @KevinMulhern ! I'll pick it up eventually I'm sure if it's still around. I'll take a look at the other two stimulus issues. Actually it looks like the forms validations is the only one besides this one for the JS stimulus issues left. So I'll move onto that and do some research on it to see how's it's done. *Assuming the tailwind rework won't impact that issue.

linkonsat avatar Apr 12 '22 21:04 linkonsat

Completed with: https://github.com/TheOdinProject/top-meta/issues/223

KevinMulhern avatar Oct 02 '22 22:10 KevinMulhern