Forem

Matt Layman
Matt Layman

Posted on • Originally published at mattlayman.com

Refactoring Enrollment - Building SaaS #84

In this episode, I decided to redesign a portion of the application flow. I wasn't pleased with how users would enroll students for their grades so I refactored the school year page into a flow that worked better.

Note: My internet connection was not good during this stream. Thankfully, the audio is fine and reading code is very possible because the background doesn't need to change much. My apologies for the low quality.

I started by deleting an "Enroll Student" button on the school year detail page. This involved removing some view context data and associated tests as well.

After I deleted the old method, I added some new context that added a boolean of has_students to the grades that display on the school year page. I used this context to control whether to show a call to action to let user's enroll for a grade level.

Top comments (0)

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay