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

[hotfix] Parameterize category names for allowlist #1588

Merged
merged 6 commits into from
Sep 22, 2022

Conversation

michellexliu
Copy link
Contributor

@michellexliu michellexliu commented Sep 17, 2022

Description

Previously, nothing would happen when a user clicked on the switch icon between the "Included" and "Excluded" list for assignment categories that have spaces in the names (e.g. "Optional Assignments"). This was caused because the category names were being used as ID's, which caused the jQuery to return undefined for categories with spaces. This was fixed by altering the jQuery to look for [id='included_${category}'], rather than individual id tags (which looks for id's separated by spaces separately, causing nothing to be returned).

How Has This Been Tested?

  • Toggled included/excluded for both categories with and without spaces and made sure it saved properly.
  • Category names with other non-alphanumeric characters (e.g. $, %, etc.)
  • Category names with trailing whitespaces or multiple non-alphanumeric characters in a row

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have run rubocop for style check. If you haven't, run overcommit --install && overcommit --sign to use pre-commit hook for linting
  • My change requires a change to the documentation, which is located at Autolab Docs
  • I have updated the documentation accordingly, included in this PR

Copy link
Member

@damianhxy damianhxy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@michellexliu michellexliu merged commit d8b2765 into master Sep 22, 2022
@michellexliu michellexliu deleted the metrics-spaced-names branch September 22, 2022 16:34
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 this pull request may close these issues.

2 participants