This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/app/controllers
Grayden 7ba35e0d71
UX: Improvements for reordering categories (#13013)
* UX: Improvements to reorder categories UX

Before, moving a category from, for example, position 25 to position 0 would result in switching the positions of the two categories at those positions.

Category A at position 0 would move to position 25, and Category B at position 25 would move to position 0.

Instead of switching positions, the reorder categories function should retain the order of categories except for the one being moved.

So, Category B at position 25 would still move to position 0, but Category A is merely bumped down to position 1.

This improves the UX because if a user *really* wants to switch the two categories, it results in one extra step. However in the other (what I think is normal) case, it saves the 24 other switches the user has to make to get Category A back to position 1 (you can imagine the user having to click the up arrow button repeatedly to return Category A to the top of the page). Now, imagine trying to do this with a site with 100s of categories. Yikes!

The UX improvement described above is what this commit accomplishes by redesigning the `move()` method of the reorder-categories controller. It adds some overhead to adjust the positions of all categories in between the origin and target positions, but in testing this is not noticible to the user. It's better for the computer to do extra work than the user.

* UX: Allow decimal input in reorder-categories for more precise positioning.

A common UX pattern when reordering a list of items is to allow a user to specify a target position as a decimal between two valid integer positions. The user is indicating they want the target list item to move in between the list items at the positions on either side of the target position.

For example, say there are three categories Category A at position 0, Category B at position 1, and Category C at position 3.

To move Category C in between Categories A and B, a user can now simply update Category C's position to 0.5.
2021-06-09 13:01:06 +03:00
..
badges DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
discovery FEATURE: Allow selective dismissal of new and unread topics (#12976) 2021-05-26 09:38:46 +10:00
navigation DEV: Use import { inject as controller} Ember idiom (#13140) 2021-05-25 18:37:32 +02:00
preferences DEV: Use import { inject as controller} Ember idiom (#13140) 2021-05-25 18:37:32 +02:00
about.js FIX: do not include contact url & email in client site settings payload (#13004) 2021-05-19 16:15:24 +10:00
account-created-edit-email.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
account-created-index.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
activation-edit.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
application.js FEATURE: Rename 'Discourse SSO' to DiscourseConnect (#11978) 2021-02-08 10:04:33 +00:00
associate-account-confirm.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
auth-token.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
avatar-selector.js UX: The Site's logo is the selected option when changing the system's user avatar. (#12861) 2021-04-27 17:28:15 -03:00
basic-modal-body.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
bookmark.js DEV: Add time shortcut picker component and libs and refactor bookmark modal controller into component which uses time shortcut picker (#11802) 2021-02-01 09:03:41 +10:00
bulk-notification-level.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
change-owner.js DEV: Use import { inject as controller} Ember idiom (#13140) 2021-05-25 18:37:32 +02:00
change-post-notice.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
change-timestamp.js DEV: Use import { inject as controller} Ember idiom (#13140) 2021-05-25 18:37:32 +02:00
composer.js FIX: Return naturalWidth and naturalHeight for Composer image sizes (#13271) 2021-06-03 16:21:56 -04:00
convert-to-public-topic.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
create-account.js DEV: Correct typos and spelling mistakes (#12812) 2021-05-21 11:43:47 +10:00
create-invite-bulk.js FEATURE: Various improvements to invite system (#12023) 2021-03-03 11:45:29 +02:00
create-invite.js UX: Use icons as bulleted list in invite modal (#13229) 2021-06-02 16:28:54 +03:00
delete-topic-confirm.js DEV: Use import { inject as controller} Ember idiom (#13140) 2021-05-25 18:37:32 +02:00
discard-draft.js FEATURE: Allow users to save draft and close composer (#12439) 2021-03-19 09:19:15 -04:00
discovery-sortable.js DEV: Use import { inject as controller} Ember idiom (#13140) 2021-05-25 18:37:32 +02:00
discovery.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
do-not-disturb.js FEATURE: Create notification schedule to automatically set do not disturb time (#11665) 2021-01-20 10:31:52 -06:00
edit-category-tabs.js UX: Small tweak to category delete warning (#11799) 2021-01-26 09:43:47 -05:00
edit-slow-mode.js UX: show Update button instead of Enable button when slow mode is already enabled (#13077) 2021-05-25 13:33:39 +04:00
edit-topic-timer.js FEATURE: Add year to relative time picker (#12268) 2021-03-03 11:41:07 +10:00
edit-user-directory-columns.js FEATURE: Add user custom fields to user directory (#13238) 2021-06-07 12:34:01 -05:00
email-login.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
exception.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
explain-reviewable.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
feature-topic-on-profile.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
feature-topic.js DEV: Use import { inject as controller} Ember idiom (#13140) 2021-05-25 18:37:32 +02:00
flag.js FEATURE: Admins can flag posts so they can review them later. (#12311) 2021-03-11 08:21:24 -03:00
forgot-password.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
full-page-search.js DEV: prettier 2.2.1 (#11862) 2021-01-27 12:39:20 +01:00
grant-badge.js DEV: Use import { inject as controller} Ember idiom (#13140) 2021-05-25 18:37:32 +02:00
group-activity-posts.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
group-activity-topics.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
group-activity.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
group-add-members.js DEV: Deprecate {{user-selector}} and replace it with {{email-group-user-chooser}} (#12042) 2021-02-12 13:51:36 +03:00
group-index.js FEATURE: Improve group settings and members management (#11878) 2021-02-03 16:11:08 +02:00
group-manage-categories.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
group-manage-logs.js DEV: enforces eslint’s curly rule to the codebase (#10720) 2020-09-22 16:28:28 +02:00
group-manage-profile.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
group-manage-tags.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
group-manage.js FIX: Allow mobile-nav to work without loading transitions (#12184) 2021-02-23 11:16:40 +00:00
group-messages.js FIX: Allow mobile-nav to work without loading transitions (#12184) 2021-02-23 11:16:40 +00:00
group-permissions.js FEATURE: Group category permissions tab (#10388) 2020-08-10 09:49:05 -05:00
group-requests.js Revert "Revert "DEV: Wrap Ember.run.debounce. (#11352)"" (#11509) 2020-12-18 10:18:52 -03:00
group.js FIX: Set the "hasTargetGroups" attribute in the composer when clicking the group message button. (#12536) 2021-03-29 14:43:00 -03:00
groups-index.js Revert "Revert "DEV: Wrap Ember.run.debounce. (#11352)"" (#11509) 2020-12-18 10:18:52 -03:00
groups-new.js DEV: Deprecate {{user-selector}} and replace it with {{email-group-user-chooser}} (#12042) 2021-02-12 13:51:36 +03:00
history.js DEV: prettier 2.2.1 (#11862) 2021-01-27 12:39:20 +01:00
ignore-duration-with-username.js DEV: Deprecate {{user-selector}} and replace it with {{email-group-user-chooser}} (#12042) 2021-02-12 13:51:36 +03:00
ignore-duration.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
insert-hyperlink.js FIX: Close hyperlink modal on ESC key (#13166) 2021-05-26 15:11:12 -04:00
invites-show.js FIX: Make UI match server behavior for external-auth invites (#13113) 2021-05-26 09:47:44 +01:00
json-schema-editor.js DEV: Add experimental json_scheme site setting type (#12226) 2021-03-01 09:15:17 -05:00
jump-to-post.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
keyboard-shortcuts-help.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
login.js DEV: Pass signup=true to auth providers when signup buttons used (#12337) 2021-03-10 12:16:21 +00:00
modal.js DEV: Add the missing app subdirectory (#9499) 2020-04-23 10:07:54 -03:00
move-to-topic.js DEV: Use import { inject as controller} Ember idiom (#13140) 2021-05-25 18:37:32 +02:00
not-activated.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
password-reset.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
preferences.js FIX: Allow mobile-nav to work without loading transitions (#12184) 2021-02-23 11:16:40 +00:00
publish-page.js UX: publishes page, on public change, only when page is published (#12123) 2021-02-18 17:34:50 +01:00
raw-email.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
reject-reason-reviewable.js FEATURE: reason to reject user signup (#11700) 2021-01-15 09:43:26 +11:00
rename-tag.js FIX: ensures successive tags can be renamed (#12818) 2021-04-23 16:18:23 +02:00
reorder-categories.js UX: Improvements for reordering categories (#13013) 2021-06-09 13:01:06 +03:00
request-group-membership-form.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
review-index.js FIX: Review Queue Query parameters were not refreshing in Ember CLI builds (#13101) 2021-05-20 14:00:25 -04:00
review-settings.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
second-factor-add-security-key.js DEV: Correct typos and spelling mistakes (#12812) 2021-05-21 11:43:47 +10:00
second-factor-add-totp.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
second-factor-backup-edit.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
second-factor-edit-security-key.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
second-factor-edit.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
share-and-invite.js DEV: Add the missing app subdirectory (#9499) 2020-04-23 10:07:54 -03:00
share-topic.js FEATURE: Allow sending a message with invite (#12892) 2021-05-06 10:16:42 +03:00
static.js UX: fix button alignment on log-in required page (#11965) 2021-02-04 14:38:58 +11:00
tag-groups-edit.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
tag-groups-new.js UX: Adjustments to tag groups layout (#13269) 2021-06-03 13:58:28 -04:00
tag-groups.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
tag-show.js FEATURE: Allow selective dismissal of new and unread topics (#12976) 2021-05-26 09:38:46 +10:00
tags-index.js Fix i18n issues reported on Crowdin (#11747) 2021-02-02 10:50:04 +01:00
topic-bulk-actions.js FIX: Show staff bulk actions only to staff (#12823) 2021-04-26 12:40:52 +03:00
topic.js FEATURE: Show all categories in composer (#13213) 2021-05-31 20:50:23 +02:00
upload-selector.js UX: hide the list of file extensions on the upload dialog (#12836) 2021-05-04 15:16:00 +04:00
user-activity-bookmarks.js DEV: Use import { inject as controller} Ember idiom (#13140) 2021-05-25 18:37:32 +02:00
user-activity.js FIX: Allow mobile-nav to work without loading transitions (#12184) 2021-02-23 11:16:40 +00:00
user-badges.js FEATURE: lets users favorite 2 badges to show on user-card (#13151) 2021-06-01 10:33:40 +02:00
user-card.js FEATURE: Optional filtered replies view (#11387) 2020-12-10 12:02:07 -05:00
user-invited-show.js FEATURE: Various improvements to invite system (#12314) 2021-03-09 00:15:14 +02:00
user-notifications.js FIX: Allow mobile-nav to work without loading transitions (#12184) 2021-02-23 11:16:40 +00:00
user-posts.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
user-private-messages-tags.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
user-private-messages.js FIX: Reload messages after a bulk operation (#12569) 2021-03-31 16:08:12 +03:00
user-summary.js DEV: Use import { inject as controller} Ember idiom (#13140) 2021-05-25 18:37:32 +02:00
user-topics-list.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
user.js DEV: Use import { inject as controller} Ember idiom (#13140) 2021-05-25 18:37:32 +02:00
users.js FEATURE: Add group filter to user directory (#13330) 2021-06-08 13:20:08 -05:00