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 annotation UI more compact #2208

Merged
merged 4 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions app/assets/stylesheets/annotations.scss
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,22 @@
border: 1px solid red;
}

.code-table .annotation-line .annotation-form .row {
margin-bottom: 0;
}

.code-table .annotation-line .annotation-preview {
border: 1px solid $autolab-highlight-gray;
padding: 5px;
margin: 0 10px;
width: 100%;
}

.code-table .annotation-line .annotation-form .row .input-field {
margin-bottom: 0;
margin-top: 0.75rem !important;
}

.code-table .float-left {
float: left;
}
Expand Down
10 changes: 5 additions & 5 deletions app/views/submissions/_annotation_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="error" style="display: none;"></div>
<form>
<div class="row">
<div class="input-field col s12 annotation-comment">
<div class="input-field col s12 annotation-comment no-padding-bottom">
<textarea class="comment materialize-textarea" id="comment-textarea" placeholder=""></textarea>
<label for="comment-textarea">Comment</label>
<p>
Expand All @@ -17,29 +17,29 @@

<div class="row annotation-problem-score">
<% if global %>
<div class="input-field col s12">
<div class="input-field col s12 no-padding-bottom">
<input class="score" type="number" value="0" placeholder="0" step="any" id="comment-score" autocomplete="on">
<label for="comment-score">Score</label>
<span> Grading style: <b><%= @assessment.is_positive_grading ? "Positive grading" : "Negative grading" %></b>
<i class="material-icons" title="<%= "#{@assessment.is_positive_grading ? 'Score is added, starting from 0.' : 'Score is deducted from the total points.'} Change this setting in Edit Assessment > Problems" %>">info_outline</i> </span>
</div>
<% else %>
<div class="input-field col s6">
<div class="input-field col s6 no-padding-bottom">
<input class="score" type="number" value="0" placeholder="0" step="any" id="comment-score" autocomplete="on">
<label for="comment-score">Score</label>
<span> Grading style: <b><%= @assessment.is_positive_grading ? "Positive grading" : "Negative grading" %></b>
<i class="material-icons" title="<%= "#{@assessment.is_positive_grading ? 'Score is added, starting from 0.' : 'Score is deducted from the total points.'} Change this setting in Edit Assessment > Problems" %>">info_outline</i> </span>
</div>

<div class="input-field col s6">
<div class="input-field col s6 no-padding-bottom">
<select class="browser-default problem-id">
</select>
</div>
<% end %>
</div>

<div class="row">
<div class="input-field col s12">
<div class="input-field col s12 no-padding-bottom">
<input type="submit" class="btn" value="Add annotation">
<button class="btn grey annotation-cancel-button">Cancel</button>
</div>
Expand Down