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

Introduce edditable table for creating score distributions #5723

Open
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

jorg-vr
Copy link
Contributor

@jorg-vr jorg-vr commented Aug 6, 2024

This pull request introduces jspreadsheet-ce as table editor to manage score items for an evaluation.

This way, copying, reusing and even initially filling it out all go a lot faster. The excel like layout should be easy to interact with for most users.

It also allows to prepare score items in advance in a spreadsheet program and pasting it here directly.

Reordering is partially supported. Doing when some solutions are already evaluated will force you to redo those evaluations.

test.mp4

Darkmode is also supported
image

  • Tests were added
  • Documentation update can be found at dodona-edu/dodona-edu.github.io#

Closes #4940 and closes #2713

@jorg-vr jorg-vr added the feature New feature or request label Aug 6, 2024
@jorg-vr jorg-vr self-assigned this Aug 6, 2024
@jorg-vr jorg-vr marked this pull request as ready for review August 8, 2024 14:34
@jorg-vr jorg-vr requested a review from bmesuere as a code owner August 8, 2024 14:34
Copy link

coderabbitai bot commented Aug 8, 2024

Walkthrough

This update introduces a significant enhancement to the evaluation interface, notably through the addition of the new ScoreItemInputTable component, which improves the management and input of score items. It incorporates features for editing, visibility management, and user feedback. Additionally, substantial localization improvements enhance the user experience in both English and Dutch.

Changes

Files Change Summary
app/assets/javascripts/components/input_table.ts, app/assets/javascripts/i18n/translations.json New ScoreItemInputTable component added for score item management, with localization for UI elements in English and Dutch.
app/assets/stylesheets/base.css.scss Added imports for jspreadsheet and jsuites stylesheets to enhance the application's styling capabilities.
config/locales/js/en.yml, config/locales/js/nl.yml New localization entries for score items, including key attributes and validation messages for user guidance.
package.json Added jspreadsheet-ce dependency to enable spreadsheet functionalities within the application.

Assessment against linked issues

Objective Addressed Explanation
Prepare evaluation in advance (#4940) No feature for importing rubrics or advance evaluations has been implemented.
Reorder score items (#2713) The ScoreItemInputTable allows for the management of score items, including reordering capabilities.

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 testing code 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 testing code 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 testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Outside diff range, codebase verification and nitpick comments (1)
app/assets/javascripts/components/input_table.ts (1)

91-121: Remove commented-out condition in firstUpdated.

The firstUpdated method is well-structured, but consider removing the commented-out condition in the resize observer for clarity.

-            // if (Math.abs(parseInt(this.table.getWidth(2) as string) - this.descriptionColWidth) > 10) {
Tools
GitHub Check: codecov/patch

[warning] 91-93: app/assets/javascripts/components/input_table.ts#L91-L93
Added lines #L91 - L93 were not covered by tests


[warning] 116-116: app/assets/javascripts/components/input_table.ts#L116
Added line #L116 was not covered by tests


[warning] 118-118: app/assets/javascripts/components/input_table.ts#L118
Added line #L118 was not covered by tests

db/schema.rb Show resolved Hide resolved
db/schema.rb Show resolved Hide resolved
app/assets/javascripts/components/input_table.ts Outdated Show resolved Hide resolved
Copy link

@coderabbitai coderabbitai bot left a 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

@jorg-vr jorg-vr marked this pull request as draft August 9, 2024 08:16
@jorg-vr jorg-vr marked this pull request as ready for review August 9, 2024 09:40
Copy link

@coderabbitai coderabbitai bot left a 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

@bmesuere bmesuere added deploy naos Request a deployment on naos deploy mestra Request a deployment on mestra labels Aug 30, 2024
@jorg-vr jorg-vr added deploy mestra Request a deployment on mestra and removed deploy mestra Request a deployment on mestra deploy naos Request a deployment on naos labels Aug 30, 2024
@github-actions github-actions bot removed the deploy mestra Request a deployment on mestra label Aug 30, 2024
Copy link
Member

@bmesuere bmesuere left a comment

Choose a reason for hiding this comment

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

First of all, very nice work!

We semi-discussed that clicking on the table would also trigger edit mode. Is there a reason why this isn't implemented?

I found an edge-case when entering numbers using , instead of .. If I enter 1,5 as a score, I don't get an error that I need to enter a number, but saving also seems to fail silently. I think we should both accept 1.5 as well as 1,5.

Do we have control over the editor? If so, for the header row and col, maybe try to reduce the font size a little and make it bold to be more in line with the actual table.

The Maximum column is centered, but jumps to left aligned when editing. Why not alway align left?

The tooltip of the Maximum column mentions steps of 0.25 but I think we allow steps of 0.1?

If I remember correctly, you demoed copying entire rows. I can't seem to reproduce this. I can select a row, press ctrl+c and the row gets a dashed line, but pasting doesn't do anything.

In the form to add comments to submissions, we didn't give the cancel button an outline. I would also not do that here. This will also increase the visual padding between the two buttons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prepare evaluation in advance Reorder score items
2 participants