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

fix non-react javascript for Vite #11355

Merged
merged 24 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
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
20 changes: 20 additions & 0 deletions services/QuillLMS/app/assets/stylesheets/shared/spinner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,19 @@

.spinner {
height: 100px;
animation: rotation 2s infinite linear;
-webkit-animation: rotation 2s infinite linear;
}

@keyframes rotation {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}

@-webkit-keyframes rotation {
from {-webkit-transform: rotate(0deg);}
to {-webkit-transform: rotate(359deg);}
Expand All @@ -16,6 +26,16 @@
.assigner-container {
.assigner {
-webkit-animation: rotation 2s infinite linear;
animation: rotation 2s infinite linear;
}

@keyframes rotation {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}

@-webkit-keyframes rotation {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

<script defer src="<%= ENV['FONT_AWESOME_KIT_LINK'] %>" crossorigin="anonymous" integrity="sha384-p7JrABPXxZLpj1XoHTzkPyVs8ekVssRFXc4B7XU6Z1c8XVDA7sVPem/lQ9UouxqE"></script>
<%= render partial: 'typekit' unless Rails.env.test? %>
<%= render partial: 'application/lazyload' %>
<%= vite_typescript_tag((@js_file || 'home'), defer: true, 'crossorigin': 'anonymous') %>
<%= vite_stylesheet_tag 'home.scss' %>
<%= vite_stylesheet_tag 'shared.scss' %>
Expand Down
6 changes: 3 additions & 3 deletions services/QuillLMS/app/views/pages/evidence_tool.erb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<%= text_data[:second_attempt][key] %>
</section>
<section class="right-side-container">
<img alt="screenshot of example first attempt Reading for Evidence activity prompt" class="lazy" id="prompt-screenshot" data-src="https://assets.quill.org/images/evidence/home_page/widget_images/2x/HeroEvidenceWidget_6.webp" />
<img alt="screenshot of example first attempt Reading for Evidence activity prompt" class="lazy" id="prompt-screenshot" data-src="https://assets.quill.org/images/evidence/home_page/widget_images/2x/HeroEvidenceWidget_6.webp" src="https://assets.quill.org/images/evidence/home_page/widget_images/2x/HeroEvidenceWidget_6.webp" />
<img alt="dotted line arrow" id="arrow" class="lazy" loading="lazy" data-src="https://assets.quill.org/images/evidence/home_page/evidence_arrow.svg" src="https://assets.quill.org/images/evidence/home_page/evidence_arrow.svg" />
</section>
</section>
Expand All @@ -99,7 +99,7 @@
</section>
<section class="right-side-container">
<img alt="screenshot of example first attempt Reading for Evidence activity prompt" class="lazy" id="prompt-screenshot" loading="lazy" data-src="https://assets.quill.org/images/evidence/home_page/widget_images/2x/HeroEvidenceWidget_9.webp" src="https://assets.quill.org/images/evidence/home_page/widget_images/2x/HeroEvidenceWidget_9.webp" />
<img alt="dotted line arrow" class="lazy" id="arrow" loading="lazy" data-src="https://assets.quill.org/images/evidence/home_page/evidence_arrow.svg" />
<img alt="dotted line arrow" class="lazy" id="arrow" loading="lazy" data-src="https://assets.quill.org/images/evidence/home_page/evidence_arrow.svg" src="https://assets.quill.org/images/evidence/home_page/evidence_arrow.svg" />
</section>
</section>
<section class="attempt">
Expand All @@ -114,7 +114,7 @@
</section>
<section class="player-container">
<div class="youtube-container">
<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen class="youtube-iframe lazy" frameBorder="0" data-src="https://www.youtube.com/embed/vN3Rd-kJgFI" title="YouTube video player"></iframe>
<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen class="youtube-iframe lazy" frameBorder="0" data-src="https://www.youtube.com/embed/vN3Rd-kJgFI" src="https://www.youtube.com/embed/vN3Rd-kJgFI" title="YouTube video player"></iframe>
</div>
<p>Students receive instant feedback on the quality of their writing.</p>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class SocketStore {
this.instance = null;
this.classroomUnitId = null;
this.tokenUrl = `${process.env.DEFAULT_URL}/api/v1/lessons_tokens`;
this.socketsUrl = process.env.LESSONS_WEBSOCKETS_URL;
this.socketsUrl = process.env.VITE_LESSONS_WEBSOCKETS_URL;
this.token = null;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from 'react';
const spinnerSrc = 'https://assets.quill.org/images/icons/loader_still.svg';

const Spinner = () => (
<div className="loading-spinner">
<div className="spinner-container">
Expand Down
10 changes: 10 additions & 0 deletions services/QuillLMS/client/app/bundles/Shared/styles/spinner.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.button-loading-spinner-container {
.button-loading-spinner {
animation: rotation 2s infinite linear;
-webkit-animation: rotation 2s infinite linear;
height: 16px;
}
Expand All @@ -8,4 +9,13 @@
from {-webkit-transform: rotate(0deg);}
to {-webkit-transform: rotate(359deg);}
}

@keyframes rotation {
from {
transform: rotate(0deg);
}
to {
transform: rotate(359deg);
}
}
}
2 changes: 2 additions & 0 deletions services/QuillLMS/client/app/entrypoints/shared.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import '../../../vendor/assets/javascripts/jquery-1.8.2.js'
import '../../../vendor/assets/javascripts/bootstrap.js'
85 changes: 49 additions & 36 deletions services/QuillLMS/client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading