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

Use "small-loading-icon" insead of "btn-octicon is-loading" #26710

Merged
merged 1 commit into from
Aug 24, 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
7 changes: 0 additions & 7 deletions web_src/css/modules/animations.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,6 @@ form.single-button-form.is-loading .button {
background: transparent;
}

/* TODO: not needed, use "is-loading small-loading-icon" instead */
.btn-octicon.is-loading::after {
border-width: 2px;
height: 1.25rem;
width: 1.25rem;
}

/* TODO: not needed, use "is-loading small-loading-icon" instead */
code.language-math.is-loading::after {
padding: 0;
Expand Down
4 changes: 2 additions & 2 deletions web_src/js/features/copycontent.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function initCopyContent() {
// the text to copy is not in the DOM or it is an image which should be
// fetched to copy in full resolution
if (link) {
btn.classList.add('is-loading');
btn.classList.add('is-loading', 'small-loading-icon');
try {
const res = await fetch(link, {credentials: 'include', redirect: 'follow'});
const contentType = res.headers.get('content-type');
Expand All @@ -32,7 +32,7 @@ export function initCopyContent() {
} catch {
return showTemporaryTooltip(btn, i18n.copy_error);
} finally {
btn.classList.remove('is-loading');
btn.classList.remove('is-loading', 'small-loading-icon');
}
} else { // text, read from DOM
const lineEls = document.querySelectorAll('.file-view .lines-code');
Expand Down