-
Notifications
You must be signed in to change notification settings - Fork 221
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
When installing existing assessment, don't autoselect all #2226
Conversation
📝 Walkthrough📝 WalkthroughWalkthroughThe pull request modifies the Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
app/views/assessments/_install_assessment_table.html.erb (1)
48-49
: LGTM! Changes align with PR objectives.The modifications successfully implement the desired behavior of not auto-selecting assessments by default. This aligns well with the PR objectives and should improve the user experience.
A minor suggestion for improvement:
Consider adding an
aria-label
attribute to the checkbox for better accessibility. For example:- <%= check_box_tag asmt_file, asmt_file, false, class: 'cbox', id: "#{asmt_file}_checkbox" %> + <%= check_box_tag asmt_file, asmt_file, false, class: 'cbox', id: "#{asmt_file}_checkbox", 'aria-label': "Select #{asmt_file} for installation" %>This change would provide more context to users relying on screen readers.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- app/views/assessments/_install_assessment_table.html.erb (1 hunks)
🔇 Additional comments (2)
app/views/assessments/_install_assessment_table.html.erb (2)
Line range hint
1-80
: Summary: Changes successfully implement PR objectivesThe modifications in this file effectively implement the desired behavior of not auto-selecting assessments by default, aligning with the PR objectives. The changes should improve user experience by allowing for more selective importing of assessments.
Key points:
- The checkbox is now unchecked by default.
- A new class has been added to the label, potentially for styling or JS interactions.
- Existing "Select All" and "Unselect All" buttons provide flexibility for users.
Ensure to address the minor accessibility suggestion and verify the JavaScript functionality as mentioned in the previous comments.
Line range hint
1-80
: Verify JavaScript functionality with the new default stateThe changes to the checkbox default state are correct. However, to ensure full compatibility:
Please verify that the JavaScript functions, particularly those related to the "Select All" and "Unselect All" buttons, work correctly with the new default unchecked state of the checkboxes.
Run the following script to locate relevant JavaScript files:
Review the output files to ensure they handle the new default state correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM though 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- app/assets/stylesheets/install_assessment.css.scss (1 hunks)
🔇 Additional comments (1)
app/assets/stylesheets/install_assessment.css.scss (1)
22-25
: LGTM! Clean and focused styling for assessment checkboxes.The new
.assessment-checkbox
class provides proper centering for checkboxes using flexbox, which aligns well with the PR's objective of improving the assessment installation interface. The implementation follows good CSS practices and maintains consistency with the existing styling patterns.
Description
Motivation and Context
Resolves #2220
How Has This Been Tested?
Go to an assessment, delete it, then go to "Install Assessment" and view that the uninstalled assessments aren't automatically checked.
BEFORE:
AFTER:
Types of changes
Checklist:
overcommit --install && overcommit --sign
to use pre-commit hook for linting