WikiEducationFoundation / WikiEduDashboard

Wiki Education Foundation's Wikipedia course dashboard system
https://dashboard.wikiedu.org
MIT License
385 stars 600 forks source link

1. Added functionality for creating new Training Libraries, adding and removing categories in these libraries #5810

Open omChauhanDev opened 1 month ago

omChauhanDev commented 1 month ago

What this PR does

This pr added functionality for creating new training libraries through dashboard.

Tasks :

Screenshots

Before:

image

After:

1. Button on main training page

image

2. Filling up form

image

3. Successfully created library

image

4. First Library

image

4. Validations at front-end

image

5. Custom Error Message

image

TheTrio commented 4 weeks ago

I think having a UI similar to this(which doesn't lose all the info you entered if the library with the same name already exists) would be better.

image

ragesoss commented 4 weeks ago

Yes, it would be nice to follow the same patter as the course creation modal, and to validate from the form so that errors can be fixed without starting over.

omChauhanDev commented 4 weeks ago

okay, working on this

omChauhanDev commented 4 weeks ago

I have updated the validation pattern, kindly check this out :

https://github.com/WikiEducationFoundation/WikiEduDashboard/assets/119471995/421aad36-6537-41e9-b553-076e857b2480

ragesoss commented 2 weeks ago

I tested this out, and it's working pretty smoothly. One improvement would be to refresh the page after creating a new Library or Category, as the new one doesn't appear until after a page refresh.

omChauhanDev commented 2 weeks ago

Hi @ragesoss and @TheTrio, I have implemented 'switching between different modes' using session storage and have also modified all the relevant test cases. I'm considering pushing this commit in a separate PR to maintain a clear separation of concerns.

For that, merging this PR will help me resolve the merge conflicts before raising the new PR.

ragesoss commented 2 weeks ago

@omChauhanDev i created this branch with the earlier commits: https://github.com/WikiEducationFoundation/WikiEduDashboard/tree/Om-Training

You should open the separate PR against that branch, for dealing with merge conflicts.