There are definitely more improvements we can make here but I wanted to get a review app up and avoid the PR growing any more. There is a lot of HTML/tailwind soup here so in summary the key points are:
I've tried to go for as close as possible to an edit in place style while still relying on turbo frames to avoid having a massive complicated form with JS logic.
Because of the fact that we use different forms for different parts of the case study we need to use the form attribute to break apart the form and avoid having nested forms. This is a bit quirky but it's exactly what the attribute is for and is the only way to achieve this without JS. ( I think )
Fixed a bug where a new company would be created every time we made an edit to the company because we weren't sending the ID.
There is still some styling inconsistencies with the various content forms, however, I am hoping to clean that up some more in another PR.
I've now made the admin header sticky. This was in order to achieve the sidebar layout I wanted for this page. Let me know if you aren't a fan and I can only make it sticky for this page.
There is a styling issue at the moment when submitting the form where the flash notice pushes the page down and you have to scroll in order to get back to the submit button. I can solve this by making the notices sticky on the bottom left or something but given they are shown on all admin pages I didn't want to change yet.
Reviewer Checklist
[ ] PR has a clear title and description
[ ] Manually tested the changes that the PR introduces
[ ] Changes introduced by the PR are covered by tests of acceptable quality
Resolves: Ticket
Description
There are definitely more improvements we can make here but I wanted to get a review app up and avoid the PR growing any more. There is a lot of HTML/tailwind soup here so in summary the key points are:
Reviewer Checklist