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

rocketchat-ui-message: messagePopupConfig::popupSlashCommandsConfig commands are truncated to 11 _before_ the sort #3571

Closed
jeffreywescott opened this issue Jun 16, 2016 · 1 comment · Fixed by #3572
Milestone

Comments

@jeffreywescott
Copy link
Contributor

Your Rocket.Chat version: develop branch

Right now, a somewhat "random" list of slash commands is displayed in the message popup when the / key is pressed with no additional keys. This is because the getFilter function chooses the first 11 commands in the collection before they are sorted rather than after they are sorted.

The end result of this is that you don't get the 11 alphabetically-first commands in the popup. Then, if a user types another key, commands seem to appear out of nowhere.

We discovered this bug after adding a custom /cycle command. It wouldn't show up when the user typed / but would when the user typed /c. PR forthcoming.

@graywolf336
Copy link
Contributor

👍 looking forward to the pull request

@jeffreywescott jeffreywescott changed the title rocketchat-ui-message: messagePopupConfig::popupSlashCommandsConfig commands are truncated to 10 _before_ the sort rocketchat-ui-message: messagePopupConfig::popupSlashCommandsConfig commands are truncated to 11 _before_ the sort Jun 16, 2016
jeffreywescott pushed a commit to LearnersGuild/echo-chat that referenced this issue Jun 16, 2016
rather than breaking out of the loop after processing the 11th slash command, we will process all of the slash commands, sort them alphabetically, then return the top 11
engelgabriel added a commit that referenced this issue Jun 16, 2016
…fore-filtering

Fixes #3571: sort slash commands before filtering
Gudii added a commit to Gudii/Rocket.Chat that referenced this issue Jul 1, 2016
…nto develop

* 'develop' of https://github.com/RocketChat/Rocket.Chat: (210 commits)
  Save room topic escaped
  Update references from ES2016 to ECMAScript 2015
  REST API Add all users to room (RocketChat#3569)
  Use .eslintc file instead of .eslintrc.js
  Update settings.js
  Restore watermark
  Add eslint and ES2016 to contributing guide
  Fix eslint errors
  Fix Ubuntu link closes 3575
  Update more links to current documentation
  Fixes RocketChat#3571: sort slash commands before filtering
  Rename settings group
  Lingohub (RocketChat#3562)
  Remove unused method
  User findOneByEmailAddress case insensitive
  fixes language_version on catalan translation
  fixes language_version on spanish translation
  version bump to 0.34.0
  Add "How it all started"
  Fix issue with updateTimeout using rid out of context
  ...

# Conflicts:
#	packages/rocketchat-theme/assets/stylesheets/base.less
#	packages/rocketchat-ui-login/login/form.coffee
#	packages/rocketchat-ui-sidenav/side-nav/sideNav.html
@engelgabriel engelgabriel added this to the 0.35.0 milestone Jul 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants