Skip to content

Speedgrader Draggable/Resizable Components#1486

Merged
michellexliu merged 25 commits intomasterfrom
golden-layout
Apr 5, 2022
Merged

Speedgrader Draggable/Resizable Components#1486
michellexliu merged 25 commits intomasterfrom
golden-layout

Conversation

@michellexliu
Copy link
Copy Markdown
Contributor

Description

This PR introduces draggable, expandable, and resizable components to the speedgrader page using the Golden Layout JavaScript library.
golden-layout

Motivation and Context

Different classes use the speedgrader for different purposes and thus have different workflows. As a result, there are some components that some classes' course staff rely heavily on while grading, while others don't use. This introduces the motivation to make components resizable and movable, so that classes can expand the components that they use often and remove or minimize the ones they don't. By making components stackable, we also introduce the potential to fit additional speed-grader components on the page later on.

How Has This Been Tested?

  • Tested adding annotations to check saving and state changes
  • Tested components to make sure they can be dragged correctly
  • Tested state saving between different pages

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:

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

Other issues / help required

@victorhuangwq
Copy link
Copy Markdown
Contributor

Test uploading a PDF, and I get the following error
image

@victorhuangwq
Copy link
Copy Markdown
Contributor

Further tested the following

  1. Uploading tar files containing both code and pdf - works, multiple files showing'
  2. Trying left right to go to next and prev file - works
  3. Download submission - works
  4. Clicking download file and copy code on code - works
  5. Tested file with multiple functions, to see if Symbol Tree works - not working. Symbol tree not rendering
  6. Adding annotations to files - works.
  7. Changes to golden layout viewer persisting - works

@victorhuangwq
Copy link
Copy Markdown
Contributor

  1. Symbol Tree issue addressed.
  2. File directory issue addressed.
  3. PDF issue addressed.

@victorhuangwq
Copy link
Copy Markdown
Contributor

image

Clicking on the open in new window function makes most features unusable. Recommendation is just to disable opening in new window

@victorhuangwq
Copy link
Copy Markdown
Contributor

  1. Popup removed
  2. Symbol tree issue seems to have been addressed

Copy link
Copy Markdown
Contributor

@victorhuangwq victorhuangwq left a comment

Choose a reason for hiding this comment

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

LGTM.

}
// Reloads the grades part upon update
$('.problemGrades').load(document.URL + ' .problemGrades');
$('.problemGrades').load(document.URL + ' .problemGrades')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: the semi-colon seems to have been accidentally removed?

// if all components have been loaded, load the annotations js files
componentsLoaded += 1;
if (componentsLoaded === numComponents)
$('body').append("<%= j render(:partial => 'annotations_js') %>");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

very interesting workaround


<div style="width:300px">
<p>Click on a line of code to annotate. You will see text boxes for a comment, value and problem. If you enter a value, you're annotation will be added to the summary. Try tabbing between boxes to save time.</p>
<p>Click on a line of code to annotate. You will see text boxes for a comment, value and problem. If you enter a value, your annotation will be added to the summary. Try tabbing between boxes to save time.</p>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

good catch

@michellexliu michellexliu merged commit af7f303 into master Apr 5, 2022
@michellexliu michellexliu deleted the golden-layout branch April 5, 2022 22:26
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.

2 participants