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

Visual cues improvements #2108

Merged
merged 18 commits into from
Mar 16, 2024
Merged

Visual cues improvements #2108

merged 18 commits into from
Mar 16, 2024

Conversation

jlge
Copy link
Contributor

@jlge jlge commented Feb 26, 2024

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

  • 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 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

Copy link
Contributor

coderabbitai bot commented Feb 26, 2024

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.

app/controllers/users_controller.rb Outdated Show resolved Hide resolved
app/views/users/show.html.erb Outdated Show resolved Hide resolved
@jlge jlge linked an issue Feb 26, 2024 that may be closed by this pull request
@damianhxy damianhxy requested review from a team and 20wildmanj and removed request for a team February 26, 2024 20:56
@20wildmanj
Copy link
Contributor

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
Copy link
Contributor

20wildmanj commented Mar 8, 2024

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

Copy link
Contributor

@20wildmanj 20wildmanj left a comment

Choose a reason for hiding this comment

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

the hover toggle works, but otherwise style-wise hover needs refinements. Clearfix is still jank so needs some more work, and also code organization could be approved

@jlge jlge requested a review from 20wildmanj March 11, 2024 22:00
Copy link
Contributor

@20wildmanj 20wildmanj left a comment

Choose a reason for hiding this comment

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

LGTM besides nit

@jlge jlge enabled auto-merge March 16, 2024 16:42
@jlge jlge added this pull request to the merge queue Mar 16, 2024
Merged via the queue into master with commit 3ef1dcd Mar 16, 2024
5 checks passed
@jlge jlge deleted the visual-cues branch March 16, 2024 16:46
NicholasMy pushed a commit to UB-CSE-IT/Autolab that referenced this pull request Jan 10, 2025
* add visual cue to course index page

* Implement toggle for hover

* remove bold from course index

* fix clearfix

* get rid of console output

* fix schema

* fix schema

* fix schema

* add content for tag

* Address comments and fix clearfix

* Move date to partial

* Change line endings

* fix schema

* Remove dead code

(cherry picked from commit 3ef1dcd)
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.

Visual Cues improvements
2 participants