Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a "restart" icon, that when clicked regenerates the slug of a course #56

Closed
5 tasks
rotimi-best opened this issue Nov 27, 2023 · 4 comments · Fixed by #65
Closed
5 tasks

Add a "restart" icon, that when clicked regenerates the slug of a course #56

rotimi-best opened this issue Nov 27, 2023 · 4 comments · Fixed by #65
Assignees
Labels
good first issue Good for newcomers

Comments

@rotimi-best
Copy link
Collaborator

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}.

image

IMPORTANT

  1. 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-L92

  2. The icon to use is this one from Carbon Icons - Refresh and the prop size should be 16

image **Note**: Make sure you look at other places how we import carbon icons: like here

https://github.com/rotimi-best/classroomio/blob/0e9214f717279d88cc99ae36637256282f11b682/apps/dashboard/src/lib/components/Apps/components/Poll/components/CreatePollForm.svelte#L9

  1. 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

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.

  • I have searched the existing feature requests to make sure this is not a duplicate.
  • I have provided a detailed description of the requested feature.
  • I have explained the use case or scenario for this feature.
  • I have included any relevant technical details or design suggestions.
  • I understand that this is a suggestion and that there is no guarantee of implementation.
@rotimi-best rotimi-best added the good first issue Good for newcomers label Nov 27, 2023
@rotimi-best
Copy link
Collaborator Author

Heads up

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.

@R4Rohit23
Copy link
Contributor

Hey @rotimi-best I would like to work on this issue.

@Toyin5
Copy link
Contributor

Toyin5 commented Nov 30, 2023

@rotimi-best can I get assigned to this?

@rotimi-best
Copy link
Collaborator Author

@Toyin5, @R4Rohit23 is already working this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants