Goal 4: Show and hide descriptions
Where we are now
Every todo item shows its title and its whole description, all the time. With a few long descriptions, the list gets cluttered and hard to scan.
User story
As a user, I want to see just the titles of my todo items. When I click the arrow next to an item, its description opens. When I click it again, the description closes.
Technically speaking
Opening and closing a description doesn’t change any data, so there’s no need to ask the server. Each todo item just needs to remember one thing in the browser: is it open or closed? We’ll use Alpine.js to store that, to flip it when the arrow is clicked, and to show or hide the description to match.