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

make submission summary fill up space #1624

Merged
merged 5 commits into from
Oct 23, 2022
Merged

Conversation

20wildmanj
Copy link
Contributor

@20wildmanj 20wildmanj commented Oct 14, 2022

Description

Previously, assignments with few problems would have a submission summary where the table only took up part of the horizontal space provided:

Screen Shot 2022-10-13 at 22 20 35

The "show all submissions" button also displayed for any amount of submissions, which was weird in the case where only a couple submissions were made, since the information in history is now exactly the same as submission summary:

Screen Shot 2022-10-18 at 18 19 14

Change Summary

  • Changed the table view to now use css that applies display: table; to the actual table, and overflow-x: scroll to the wrapper div so that the table will become scrollable if there are too many problems, but take up the space otherwise.
  • Changed "Download Submission" and "View Source" into buttons so that the options are easier to click

Screen Shot 2022-10-18 at 18 16 48

  • Changed the logic behind the submissions history link so that it only displays when the total submission count exceeds the amount of submissions the summary can display.
    • The summary table is the exact same as the history, so this change doesn't change much, just makes more logical sense.

Screen Shot 2022-10-14 at 11 39 04

Lots of problems:
Screen Shot 2022-10-18 at 18 15 11

How Has This Been Tested?

  • Submit to an assignment with one problem, see that summary takes up horizontal space
  • Submit to an assignment with lots of problems, see that summary scrolls properly
  • Submit to an assignment with no previous submissions, see that link to "See all x submissions" doesn't appear until after the fourth submission
  • Download Submission / View Submission
  • Upload plain text file, see that visually the button looks the same, but hovering over shows tooltip that indicates to download as text

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have run rubocop for style check. If you haven't, run overcommit --install && overcommit --sign to use pre-commit hook for linting

…ut still overflow properly

- only show link to full submission history table if submissions exceed summary view limit
@20wildmanj 20wildmanj requested review from victorhuangwq and removed request for damianhxy October 18, 2022 22:26
@michellexliu
Copy link
Contributor

nit: can we get the icons and button text to be vertically center-aligned? looks slightly off rn

@20wildmanj
Copy link
Contributor Author

nit: can we get the icons and button text to be vertically center-aligned? looks slightly off rn

Screen Shot 2022-10-19 at 10 42 18

Copy link
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! Works as expected.

One other small consideration, do we want view source on top of download submissions? I would imagine people would want to view source more often than downloading a submission.

app/assets/stylesheets/style.css.scss Show resolved Hide resolved
@20wildmanj 20wildmanj merged commit 833db77 into master Oct 23, 2022
@20wildmanj 20wildmanj deleted the fix-submission-summary branch October 23, 2022 18:47
damianhxy added a commit that referenced this pull request Oct 27, 2022
* Add line number

* Move active class

* Add lineNumber when updating

* Change score field to type number

* Consistently display annotation scores to 1 d.p.

* Fix plus_fix

* Sort annotations after updates

* Add sorting logic

* Match get_correct_filename behavior

* Round grades to 1dp

* Fix indentation

* Disable accordion (to allow multiple sections open at once)

* annotation.js cleanup

* Remove max-height on collapsible

* Run attachChangeFileEvents once at the end

* Group annotations by filename

* Implement group_by for js

* Add collapsible arrows

* Add collapsible arrows (after update)

* Increase arrow size

* Disable user-select on header

* Add spacing between annotations of different files

* Remove debug statement

* Use jquery load for annotations

* Remove dead code

* Revert filelist from instance to local variable

* Fixed annotation switching problems not updating score (#1621)

* Force flatpicker interface for date/datetime picker on mobile (#1620)

* Validate against empty annotation scores

* Fix annotation score validation on backend

* Simplify badge color update logic

* Prevent blank annotation scores on update

* Simplify badge color update logic (fix)

* Show revised due date for manage extensions (#1623)

show revised due date

* Bump nokogiri from 1.13.6 to 1.13.9 (#1625)

* make submission summary fill up space (#1624)

* - fix submission summary/history table to fill up horizontal space, but still overflow properly
  - only show link to full submission history table if submissions exceed summary view limit
* - make "Download Submission" and "View Source" into buttons
* Vertically center-align icon and text
* add spaces, move view source to be above download submission

* round 2 decimal places

* plusFix round to 2 decimal places

* Change grades panel to use 2dp

Co-authored-by: Nicholas AJ Clark <nicholas@californiaclarks.com>
Co-authored-by: Michelle Liu <mliuu3259@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joey Wildman <josephwildman88@gmail.com>
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.

3 participants