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

Remove saved annotations sidecard #4886

Merged
merged 1 commit into from
Aug 11, 2023
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

This file was deleted.

4 changes: 0 additions & 4 deletions app/assets/stylesheets/models/submissions.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,3 @@ iframe.file {
margin-right: 6px;
}
}

d-saved-annotations-sidecard:empty {
display: none;
}
1 change: 0 additions & 1 deletion app/javascript/packs/application_pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import { initClipboard } from "copy";
import { FaviconManager } from "favicon";
import { themeState } from "state/Theme";
import "components/saved_annotations/saved_annotation_list";
import "components/saved_annotations/saved_annotations_sidecard";
import "components/progress_bar";
import "components/theme_picker";
import { userState } from "../../assets/javascripts/state/Users";
Expand Down
7 changes: 0 additions & 7 deletions app/views/feedbacks/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@
<div class="card" id="feedback-actions-holder">
<%= render partial: 'feedback_actions', locals: { evaluation: @feedback.evaluation, feedback: @feedback } %>
</div>
<!-- REMOVE IF AFTER CLOSED BETA -->
<% if policy(SavedAnnotation).beta_course? @feedback.evaluation.series.course.id %>
<d-saved-annotations-sidecard course-id="<%= @feedback.evaluation.series.course.id %>"
exercise-id="<%= @feedback.exercise.id %>"
user-id="<%= current_user.id %>"
></d-saved-annotations-sidecard>
<% end %>
</div>
<div class="col-12 order-lg-0 col-lg-8 col-xxl-9 feedback-submission">
<div class="card feedback-show">
Expand Down
13 changes: 2 additions & 11 deletions app/views/submissions/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%= render 'navbar_links' %>
<div class="row justify-content-center">
<div class="col-lg-8 col-xxl-9 col-12">
<div class="row">
<div class="col-md-10 offset-md-1 col-12">
<div class="card">
<div class="card-title card-title-colored">
<h2 class="card-title-text"><%= t ".submission_results" %></h2>
Expand Down Expand Up @@ -28,15 +28,6 @@
</div>
</div>
</div>

<!-- REMOVE IF AFTER CLOSED BETA -->
<% if policy(SavedAnnotation).beta_course? @submission.course&.id %>
<d-saved-annotations-sidecard course-id="<%= @submission.course&.id %>"
exercise-id="<%= @submission.exercise&.id %>"
user-id="<%= current_user.id %>"
class="col-12 col-lg-4 col-xxl-3"
></d-saved-annotations-sidecard>
<% end %>
</div>
<% if @submission.queued? || @submission.running? %>
<script>setTimeout(function () {
Expand Down
11 changes: 0 additions & 11 deletions test/system/saved_annotation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ class SavedAnnotationsTest < ApplicationSystemTestCase
visit(submission_path(id: @first.id))
click_link 'Code'

assert_no_css 'd-saved-annotations-sidecard'

find('tr#line-1').hover
find('.annotation-button button').click

Expand All @@ -55,10 +53,6 @@ class SavedAnnotationsTest < ApplicationSystemTestCase
# assert linked icon
assert_css 'i.mdi-link-variant'
end

# assert sidebar with saved annotations
assert_css 'd-saved-annotations-sidecard'
assert_css 'd-saved-annotations-sidecard td[title="The first five words of"]'
sign_out @staff
end

Expand All @@ -67,8 +61,6 @@ class SavedAnnotationsTest < ApplicationSystemTestCase
visit(submission_path(id: @first.id))
click_link 'Code'

assert_no_css 'd-saved-annotations-sidecard'

find('tr#line-1').hover
find('.annotation-button button').click

Expand All @@ -85,7 +77,6 @@ class SavedAnnotationsTest < ApplicationSystemTestCase
assert_no_css 'i.mdi-link-variant'
end

assert_no_css 'd-saved-annotations-sidecard'
sign_out @student
end

Expand All @@ -95,8 +86,6 @@ class SavedAnnotationsTest < ApplicationSystemTestCase
visit(submission_path(id: @first.id))

click_link 'Code'
assert_css 'd-saved-annotations-sidecard'
# assert_css `d-saved-annotations-sidecard td[title="#{sa.title}"]`

find('tr#line-1').hover
find('.annotation-button button').click
Expand Down