Back to posts
  • Web Applications
  • Accessibility
  • Usability Testing

Live-Coding a Fullstack Prototype – Episode 7

Nils Borgböhmer
Nils Borgböhmer
This post is part of a series

Welcome back to our virtual bookshelf coding series! This blog post is a summary of the key points from our latest YouTube video, which you can find above. In this session, Judith and I continue working on our create, read, update, delete (CRUD) application, focusing on implementing the edit functionality for a book.

tl;dr: Link to this headline

  • Discussing the goal: editing a book
  • Adding a confirmation dialog before deleting a book
  • Reusing the add book dialog for editing
  • Refactoring code for dialog component
  • Improving UI design and adding hover effects
  • Handling form fields and dialog interactions
  • Testing and updating book data in the CRUD app
  • Future improvements: UI enhancements, authentication, and categorizing books

Goal of the Session: Editing a Book Link to this headline

Judith and I discussed what we wanted to achieve today, and we decided to focus on the edit functionality. We’ve built a CRUD application, but the update part is still missing. Our goal for this session is to make it possible to edit a book that we have already added to our bookshelf.

Adding a Confirmation Dialog Before Deleting a Book Link to this headline

One of the first things we addressed was adding a confirmation dialog before deleting a book. We decided to use the window.confirm function to prompt users to confirm their action before the book is deleted.

Reusing the Add Book Dialog for Editing Link to this headline

To streamline our code, we considered reusing the existing add book dialog for editing a book. This involved passing the book data to the dialog component and updating the dialog title and button text accordingly.

Refactoring Code for Dialog Component Link to this headline

We refactored our code to ensure that the dialog component could handle both adding and editing books. This required setting default values for the form fields and updating the form values based on the selected book.

Improving UI Design and Adding Hover Effects Link to this headline

As we worked on the edit functionality, we also discussed ways to improve the UI design. We added hover effects to the buttons to make the interface more user-friendly and visually appealing.

Handling Form Fields and Dialog Interactions Link to this headline

We focused on handling the opening and closing of the dialog, ensuring that the form fields were properly set with default values, and updating the form values when a book was selected for editing.

Testing and Updating Book Data in the CRUD App Link to this headline

After making the necessary changes to the code, we tested the update functionality to ensure that the changes were reflected in the UI. We explored different approaches to updating the book data and addressed some issues with rendering the data.

Future Improvements Link to this headline

Looking ahead, we discussed future improvements for our application. We plan to enhance the UI further, explore additional features like authentication, and consider categorizing books to provide a better user experience.

  1. How do I start editing a book in the application?

    To start editing a book, you need to select the book you want to edit. This will open a form with the book's current details pre-filled, allowing you to make the necessary changes.

  2. What technologies are used in this project?

    Our virtual bookshelf application is built using React for the front end and Supabase for the back end, which helps us manage our database operations.

  3. Can I follow along with the coding sessions?

    Absolutely! Each episode of our coding series is available on YouTube. You can watch the sessions and follow along with the code, which is also available in our GitHub repository.

Author

Nils Borgböhmer
Nils Borgböhmer

Co-Founder, Head of Interaction Design

Connect on LinkedIn

Similar articles