From d5703d4a1bab58234c9e8e0e0e78c0cd26a90dce Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Thu, 31 Aug 2023 18:49:53 +0800 Subject: Remove "TODO" tasks from CSS file (#26835) 1. Use `gt-invisible` instead of `invisible`. 2. Use `gt-word-break` instead of `dont-break-out` (there is a slight different "hyphens", but I think it won't affect too much since it is only used for the "full name"). 3. Remove `.small.button:has(svg)` , now our buttons could layout SVG correctly, and actually I didn't see this CSS class is used in code. --- web_src/js/features/repo-diff.js | 4 ++-- web_src/js/features/repo-issue.js | 6 +++--- web_src/js/features/repo-legacy.js | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'web_src/js') diff --git a/web_src/js/features/repo-diff.js b/web_src/js/features/repo-diff.js index b79ca0f5b1..864b28a3bb 100644 --- a/web_src/js/features/repo-diff.js +++ b/web_src/js/features/repo-diff.js @@ -64,9 +64,9 @@ function initRepoDiffConversationForm() { $form.closest('.conversation-holder').replaceWith($newConversationHolder); if ($form.closest('tr').data('line-type') === 'same') { - $(`[data-path="${path}"] .add-code-comment[data-idx="${idx}"]`).addClass('invisible'); + $(`[data-path="${path}"] .add-code-comment[data-idx="${idx}"]`).addClass('gt-invisible'); } else { - $(`[data-path="${path}"] .add-code-comment[data-side="${side}"][data-idx="${idx}"]`).addClass('invisible'); + $(`[data-path="${path}"] .add-code-comment[data-side="${side}"][data-idx="${idx}"]`).addClass('gt-invisible'); } $newConversationHolder.find('.dropdown').dropdown(); initCompReactionSelector($newConversationHolder); diff --git a/web_src/js/features/repo-issue.js b/web_src/js/features/repo-issue.js index 194ffca57c..4f4103bb21 100644 --- a/web_src/js/features/repo-issue.js +++ b/web_src/js/features/repo-issue.js @@ -110,7 +110,7 @@ export function initRepoIssueSidebarList() { } filteredResponse.results.push({ name: `#${issue.number} ${htmlEscape(issue.title) - }
${htmlEscape(issue.repository.full_name)}
`, + }
${htmlEscape(issue.repository.full_name)}
`, value: issue.id, }); }); @@ -178,9 +178,9 @@ export function initRepoIssueCommentDelete() { const idx = $conversationHolder.data('idx'); const lineType = $conversationHolder.closest('tr').data('line-type'); if (lineType === 'same') { - $(`[data-path="${path}"] .add-code-comment[data-idx="${idx}"]`).removeClass('invisible'); + $(`[data-path="${path}"] .add-code-comment[data-idx="${idx}"]`).removeClass('gt-invisible'); } else { - $(`[data-path="${path}"] .add-code-comment[data-side="${side}"][data-idx="${idx}"]`).removeClass('invisible'); + $(`[data-path="${path}"] .add-code-comment[data-side="${side}"][data-idx="${idx}"]`).removeClass('gt-invisible'); } $conversationHolder.remove(); } diff --git a/web_src/js/features/repo-legacy.js b/web_src/js/features/repo-legacy.js index 3b25c36538..51edf0bd12 100644 --- a/web_src/js/features/repo-legacy.js +++ b/web_src/js/features/repo-legacy.js @@ -150,7 +150,7 @@ export function initRepoCommentForm() { if ($(this).hasClass('checked')) { $(this).removeClass('checked'); - $(this).find('.octicon-check').addClass('invisible'); + $(this).find('.octicon-check').addClass('gt-invisible'); if (hasUpdateAction) { if (!($(this).data('id') in items)) { items[$(this).data('id')] = { @@ -164,7 +164,7 @@ export function initRepoCommentForm() { } } else { $(this).addClass('checked'); - $(this).find('.octicon-check').removeClass('invisible'); + $(this).find('.octicon-check').removeClass('gt-invisible'); if (hasUpdateAction) { if (!($(this).data('id') in items)) { items[$(this).data('id')] = { @@ -215,7 +215,7 @@ export function initRepoCommentForm() { $(this).parent().find('.item').each(function () { $(this).removeClass('checked'); - $(this).find('.octicon-check').addClass('invisible'); + $(this).find('.octicon-check').addClass('gt-invisible'); }); if (selector === 'select-reviewers-modify' || selector === 'select-assignees-modify') { -- cgit v1.2.3