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

Forum Edit Categories (Reordering) #2126

Merged
merged 10 commits into from Jun 12, 2018

Conversation

Projects
None yet
4 participants
@scopeInfinity
Copy link
Member

scopeInfinity commented Jun 8, 2018

Issue: #2094 (Forum: color coded & instructor ordered tags)

To be merged after PR Forum allow multiple categories for a thread #2083, need to change Base Branch of PR before merging.

  • Categories Reordering
    • Used Sortable JS for UI
    • After successful reordering, refresh categories order on same page without making additional request.

@scopeInfinity scopeInfinity requested a review from andrewaikens87 Jun 8, 2018

if(count($categories) == 0) {
$return .= <<<HTML
<span id='category-list-no-element' style="margin-left: 1em;" >
No category found

This comment has been minimized.

@andrewaikens87

andrewaikens87 Jun 10, 2018

Member

If there is no category found there still displays a draggable bar. Can we please remove that? Also if there exists no categories we should instruct the user to create one. So possibly something like "No categories exist please create one." or something similar.

draggablebar

This comment has been minimized.

@scopeInfinity

scopeInfinity Jun 10, 2018

Author Member

Thanks! Bug fixed.

type: "POST",
data: data,
success: function(data){
console.log(data);

This comment has been minimized.

@andrewaikens87

andrewaikens87 Jun 10, 2018

Member

Please remove console log

@bmcutler

This comment has been minimized.

Copy link
Contributor

bmcutler commented Jun 10, 2018

There should always be at least one category. We start with "question" & "comment" (they can be renamed/removed if desired, as long as there is always at least one category).

Only instructor/fullaccess/limitedaccess can create or delete categories.

Only unused categories can be deleted.

You cannot remove the last category. (a category is required to make a post, and a student cannot make a category)

@andrewaikens87

This comment has been minimized.

Copy link
Member

andrewaikens87 commented Jun 10, 2018

Yes, there should always be at least one category. The error message should only show up if someone manually deleted the rows in the categories_list table. This PR currently has changes for altering the ordering of the categories. Renaming/deleting categories hasn't been implemented yet.

@scopeInfinity scopeInfinity changed the title Forum Edit Categories Forum Edit Categories (Reordering) Jun 11, 2018

@KevinMackenzie KevinMackenzie self-requested a review Jun 12, 2018

@KevinMackenzie
Copy link
Contributor

KevinMackenzie left a comment

I played around with the ordering feature and it appears to update correctly almost everywhere. The only place I have a question about is the order the tags show up in the thread list. I would assume these should be displayed in 'rank' order, but they don't appear to display in any consistent order. I can sometimes change the ordering of categories from the 'create thread' page and it will change the ordering in this list, but I can't seem to consistently reproduce this behavior and have it update on all threads.
image

@bmcutler bmcutler merged commit 9dc90c8 into forum_multiple_categories Jun 12, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@bmcutler bmcutler deleted the forum_edit_categories branch Jun 13, 2018

bmcutler added a commit that referenced this pull request Jun 18, 2018

Forum Categories having colors and edit category features (#2135)
* Forum allow multiple categories for a thread

* Using Category selection as checkbox

* Categories as buttons

* Fixed typos and indentations

* Forum Allows Categories reordering UI

* Forum allows categories reordering controllers

* Forum category rank in sample data

* Better UI for button toggle

* Bug Fix

* Added E2E tests for multiple categories

* Fixed typos

* Filter category name

* Added refreshCategories feature without making additonal request to server

* Create Thread category selection on JS disabled and Fixed typo

* Better category selection on JS enable/disabled

* Filter threads on multiple categories together

* Fixed bug, showing category list if not exists

* Removed console log

* Forum Edit Categories, colors

* Added 8 colors with names

* Updated sample data for cat colors

* Edit Category Name

* Forum, Delete Category

* Dynamic refresh cat-buttons on new category creation

* Edit thread title

* Better notification on create/delete category

* Fixed Bug

* Forum Edit Categories (Reordering) (#2126)

* Forum Allows Categories reordering UI

* Forum allows categories reordering controllers

* Forum category rank in sample data

* Added refreshCategories feature without making additonal request to server

* Fixed bug, showing category list if not exists

* Removed console log

* Revert "Edit thread title"

This reverts commit c4cce1c.

* Bug Fix

* Bug Fix update_database.py

* Inline Add Category field in popup

* Bug Fix

* Bug Fixes

* DB color column as NOT NULL

* Minor UI Fix + changes in update_database.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment