You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generate slug functionality already exists, see an example of how it is used on the course landing page. There is an imported function called generateSlug
To generate a slug in the first place, you will need to open the Landing page of the course and hit save. This will generate the initial slug.
To test your work
Go back to the settings, update the title and then click the Refresh icon you just added. The course link should be updated and when you hit save and refresh the page, then the slug should still reflect.
Feature Description
From the image below, you need to add a restart icon, (we use carbon icons) just beside the "Course Link" text.
When clicked it should regenerate the slug of a course.
The slug of a course is everything after this
https://ciodevs.classroomio.com/course/{SLUG_HERE}
.IMPORTANT
Pay attention to how we implement icons in the project, we first import a component call
IconButton
, pass some props to it and then wrap the icon around it. See this code for example https://github.com/rotimi-best/classroomio/blob/0e9214f717279d88cc99ae36637256282f11b682/apps/dashboard/src/lib/components/Apps/components/Poll/components/CreatePollForm.svelte#L90-L92The icon to use is this one from Carbon Icons -
Refresh
and the prop size should be16
https://github.com/rotimi-best/classroomio/blob/0e9214f717279d88cc99ae36637256282f11b682/apps/dashboard/src/lib/components/Apps/components/Poll/components/CreatePollForm.svelte#L9
generateSlug
https://github.com/rotimi-best/classroomio/blob/0e9214f717279d88cc99ae36637256282f11b682/apps/dashboard/src/lib/components/CourseLandingPage/components/Editor/index.svelte#L21
And then it is used here:
https://github.com/rotimi-best/classroomio/blob/0e9214f717279d88cc99ae36637256282f11b682/apps/dashboard/src/lib/components/CourseLandingPage/components/Editor/index.svelte#L116
Use Case
If you rename the title of the course and you want a new slug
Proposed Solution
Already explained above
Alternatives (optional)
No response
Additional Context
Already explained above
Please check the boxes that apply to this feature request.
The text was updated successfully, but these errors were encountered: