In this episode, we tackle a couple of UX improvements for our video recording app. First up, we set out to automatically provide default values for both the video title and description, so users don't have to fill them in every time. It's a small detail that makes a big difference!
We realize that our UI kit is missing a textarea component (important for longer descriptions), so we quickly whip up a new Textarea.vue
component that works just like our existing text input. Once that's sorted, we replace the description input with our new component.
For the default title, we decide to use the current date in a friendly format. To handle date formatting, we install the Day.js library and set up a computed property to generate the date string. We use this both for the title and as part of a simple default description like "A video captured on [date]."
We test it out by recording a video, and as soon as we finish, the title and description fields are pre-filled with our defaults! That’s it for this episode; next, we’ll connect all of this to the backend so videos get saved for real.