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

Fix user dropdown on assessments view #1547

Merged
merged 1 commit into from
Jun 6, 2022
Merged

Conversation

damianhxy
Copy link
Member

@damianhxy damianhxy commented Jun 4, 2022

Description

When initializing user dropdown, use vanilla js M.Dropdown.init(elems, options) over jQuery .dropdown().

Motivation and Context

Currently, on the assessment view page, git_submission.js and handin.js have the line require semantic-ui, which imports all semantic-ui javascript, particularly semantic-ui/dropdown. However, this overrides the original materialize dropdown method, causing the user dropdown to not work. The same problem occurs on the metrics watchlist page.

To remedy this and future proof the code, switch to the vanilla js method of initializing the dropdown.

How Has This Been Tested?

On assessment view page (and a variety of other pages), user dropdown works as intended.

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
Contributor

@fanpu fanpu left a comment

Choose a reason for hiding this comment

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

Tested that this fixes the issue with the dropdown, great work!

@damianhxy damianhxy merged commit 2521f65 into master Jun 6, 2022
@damianhxy damianhxy deleted the assessments-dropdown-fix branch June 6, 2022 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants