Coursemology / coursemology2

Rails 6 re-write of Coursemology
https://coursemology.org
MIT License
147 stars 78 forks source link

Allow reordering forum topics #5548

Open RussellDash332 opened 1 year ago

RussellDash332 commented 1 year ago

Upon duplicating a course, the order of the forum topics might be shuffled, however one cannot simply reorder it by dragging and instead has to do delete/add/edit.

Left: duplicated course Right: original course

image

leslieyip02 commented 1 year ago

Hi, I'm interested in contributing to this issue, so I took a look at the code and found that the forum display uses ForumTopicTable, which uses the MUIDataTable component:

https://github.com/Coursemology/coursemology2/blob/3f343b1eb4d285e1f4901d201bf204c5c562d11c/client/app/bundles/course/forum/pages/ForumShow/index.tsx#L136

https://github.com/Coursemology/coursemology2/blob/3f343b1eb4d285e1f4901d201bf204c5c562d11c/client/app/lib/components/core/layouts/DataTable.jsx#L136-L141

Unfortunately, MUIDataTable only supports draggableColumns, and not draggable rows. It doesn't look like there's a way to implement dragging of the topics to shuffle without rewriting this component.

Any advice?

bivanalhar commented 1 year ago

Hi @leslieyip02 thanks a lot for your interest in this issue. Actually, we are currently working on resolving this issue. Should you be interested, you might also look into this issue https://github.com/Coursemology/coursemology2/issues/4972. This is also interesting issue and we think you might take a look at this one.