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

Lint views/courses and fix up run_moss UI #1974

Merged
merged 3 commits into from
Sep 12, 2023
Merged

Conversation

20wildmanj
Copy link
Contributor

@20wildmanj 20wildmanj commented Aug 31, 2023

Summary

Summary generated by Reviewpad on 12 Sep 23 19:33 UTC

This pull request includes changes to multiple files. Here is a summary of the modifications:

  1. In reload.html.erb, changes are made to the options section. Two list items are replaced with multiline list items. The first list item now includes a link to reload the configuration file with an updated data method. The second list item remains the same.

  2. The file app/views/courses/download_roster.html.erb has been deleted. It used to contain a loop that prints out various attributes of users in a specific format. The loop iterates over @users, and each line printed includes the semester, user details, school, major, year, grade policy, lecture, and section.

  3. In report_bug.html.erb, the indentation of the text_area_tag, options for the text_area_tag, and options for the submit_tag have been reformatted to improve readability and maintainability of the code.

  4. The file app/views/courses/_updateRosterPreview.html.erb has undergone several changes, including replacing the closing tag of the checkbox input, changing the syntax of the class attribute in the submit buttons, changing the value of the locals hash key sort_status, and removing an extra new line at the end of the file.

  5. Changes in courses/_usersTable.html.erb involve removing whitespace and simplifying the conditional statement for displaying user roles.

  6. In app/views/courses/_uploadError.html.erb, changes include removing the trailing space in the <br /> tag and changing it to <br>, as well as removing the trailing space in the <table> tag.

  7. The file app/views/courses/_uploadTable.html.erb has changes related to formatting and styling, including removing unnecessary spaces in the code, updating attribute styles, and adding a newline at the end of the file.

  8. In index.html.erb in the app/views/courses directory, a link is modified to include a section parameter, and an exception handling block is added for rendering the partial home/topannounce.

  9. Various changes have been made to improve code formatting and maintainability without affecting the logic or functionality in the modified files.

  10. Changes in app/views/courses/email.html.erb include updating variables, wrapping them in <font> tags with different colors, aligning and indenting the section select options, updating the form tag with the symbol syntax, removing quotes for the table class attribute, and using hash syntax for options and attributes.

  11. Changes in upload_roster.html.erb involve fixing spacing issues, adjusting indentation, updating routes and form syntax to follow best practices, and adding labels and proper alignment.

  12. app/views/components/_dropdown_icon.html.erb is a new file that adds icons and JavaScript code for toggling visibility of certain elements based on user interaction in the UI.

  13. Changes in users.html.erb include updating routes, adjusting indentation, and adding attributes for better UX.

  14. The file diff includes several changes related to styling updates for the Moss page, including adding new classes, changing backgrounds, and applying padding, margin, and border-radius.

  15. Changes in the file involve updating HTML tags and attributes, adjusting indentation, adding help text, and fixing class attributes.

  16. In manage.html.erb, several instances of the link_to method have been replaced with updated routing helpers for course and management actions.

  17. In run_moss.html.erb, changes include updating the heading tag, adding a check for job success, displaying messages and results, and including a heading with command string and result output.

  18. The file diff of app/views/courses/_courseFields.html.erb includes changes to indentation, formatting, and help text attributes for various fields.

  19. The file makeDlist.html.erb has been deleted in this diff. It displayed error or success messages.

Please let me know if there's anything else you need assistance with.

Description

  • lint views/courses using bundle exec erblint app/views/courses/*(file).html.erb -a
  • Fix up moss.html.erb and run_moss.html.erb to be more bearable on the eyes by modifying styling, adding components/_dropdown_icon.html.erb for dropdown icon html and jquery
  • Turn upload_roster.html.erb form into FormBuilderWithDateTimeInput to have styling on upload file button
  • Remove unused files

Moss:

Before

Screenshot 2023-08-30 at 10 53 23 PM
Screenshot 2023-08-30 at 10 53 27 PM

  • Ow my eyes, also no dropdown arrow

After:

Screenshot 2023-08-30 at 10 52 51 PM
Screenshot 2023-08-30 at 10 52 56 PM

  • acceptable

Run Moss results

Before

Screenshot 2023-08-30 at 11 31 24 PM
Screenshot 2023-08-30 at 11 32 01 PM

After

Screenshot 2023-08-30 at 11 10 38 PM
Screenshot 2023-08-30 at 11 30 58 PM

Motivation and Context

  • Summer linting

How Has This Been Tested?

  • check each page / erb file renders correctly

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

@reviewpad reviewpad bot added large Pull request is large waiting-for-review labels Aug 31, 2023
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.

  • Checked that links on manage course page work
  • Checked that MOSS works (success and failure)
  • Checked that roster import works

LGTM (but it would be great to convert some remaining actions to new-style path helpers)

app/views/components/_dropdown_icon.html.erb Outdated Show resolved Hide resolved
app/views/courses/moss.html.erb Outdated Show resolved Hide resolved
app/views/courses/upload_roster.html.erb Outdated Show resolved Hide resolved
app/views/courses/upload_roster.html.erb Outdated Show resolved Hide resolved
app/views/courses/users.html.erb Outdated Show resolved Hide resolved
app/views/courses/users.html.erb Outdated Show resolved Hide resolved
@20wildmanj 20wildmanj added this pull request to the merge queue Sep 12, 2023
Merged via the queue into master with commit b5743da Sep 12, 2023
6 checks passed
@20wildmanj 20wildmanj deleted the joeywildman-lint-courses branch September 12, 2023 19:39
NicholasMy pushed a commit to UB-CSE-IT/Autolab that referenced this pull request Jan 4, 2024
* lint views/courses and fix up run_moss UI

* Address nits

(cherry picked from commit b5743da)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
large Pull request is large
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants