Autolab icon indicating copy to clipboard operation
Autolab copied to clipboard

Visual cues improvements

Open jlge opened this issue 1 year ago • 1 comments

Description

  • Added new option in settings to allow user to specify whether they would like to hover to see the start/due dates of assessments (new field called hover_assessment_date for users)
  • Modify clearfix to adjust based on window size
  • Added start/due dates on the course index page for current assignments

Motivation and Context

Addresses #2031

How Has This Been Tested?

  • Go to account settings, click to toggle and see that due dates are now only visible on hover image
  • Dates shown on course index page image
  • Clearfix before: image
  • Clearfix after: image

Types of changes

  • [x] 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:

  • [x] I have run rubocop and erblint 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

jlge avatar Feb 26 '24 17:02 jlge

Walkthrough

Walkthrough

The recent update enhances the user interface and experience related to assessments, focusing on display settings and date visibility. A key feature is the introduction of hover_assessment_date, enabling users to view assessment dates on hover, now configurable in user profiles. The update includes layout adjustments for assessments, improved styling for date display, and backend support for these features, including a new database migration to add the hover_assessment_date field to users.

Changes

File(s) Change Summary
app/controllers/users_controller.rb
app/views/users/show.html.erb
Added @hover_assessment_date assignment; introduced update_display_settings method with authorization and logic; included JavaScript for hover_assessment_date handling and display settings form.
app/views/assessments/index.html.erb
app/views/courses/index.html.erb
Enhanced layout management with JavaScript for layout adjustments, conditional classes, and hover effects on assessment items; added assessment_date styling; modified link_to blocks for assessments.
db/migrate/20240226083719_add_hover_assessment_date_to_users.rb
db/schema.rb
Added migration for hover_assessment_date boolean column in users table; updated schema with new field.
app/assets/stylesheets/_variables.scss
app/assets/stylesheets/assessment_date.scss
app/assets/stylesheets/assessments.scss
Introduced $autolab-gray-text variable; added styles for date elements and refined hover effects in stylesheets.
config/routes.rb Added update_display_settings route using PATCH method for adjusting user settings.

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?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

coderabbitai[bot] avatar Feb 26 '24 17:02 coderabbitai[bot]

Could you figure out a way for the due date hover that there exists a buffer between the rows so that when you go to hover on a due date, it doesn't push the rows below it down? Right now hovering on an asmt pushes everything down if the category column is the longest one

Screenshot 2024-03-08 at 3 05 59 PM Screenshot 2024-03-08 at 3 06 06 PM

20wildmanj avatar Mar 08 '24 15:03 20wildmanj

The clearfix "fix" don't seem to be working, seems to cause cards to get inserted in spaces where they shouldn't, instead of clean separation:

Before: Screenshot 2024-03-08 at 3 11 55 PM

After: Screenshot 2024-03-08 at 3 10 58 PM

screencapture-localhost-3000-courses-AutoPopulated-assessments-2024-03-08-15_08_32

20wildmanj avatar Mar 08 '24 15:03 20wildmanj