File tree Expand file tree Collapse file tree 11 files changed +109
-62
lines changed
templates/repo/issue/view_content Expand file tree Collapse file tree 11 files changed +109
-62
lines changed Original file line number Diff line number Diff line change 43
43
"vue" : " 3.2.47" ,
44
44
"vue-bar-graph" : " 2.0.0" ,
45
45
"vue-loader" : " 17.0.1" ,
46
- "vue3-calendar-heatmap" : " 2.0.0 " ,
46
+ "vue3-calendar-heatmap" : " 2.0.2 " ,
47
47
"webpack" : " 5.76.2" ,
48
48
"webpack-cli" : " 5.0.1" ,
49
49
"workbox-routing" : " 6.5.4" ,
Original file line number Diff line number Diff line change 661
661
{{if and (not (eq .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName)) .CanWriteToHeadRepo}}
662
662
<div class="ui divider"></div>
663
663
<div class="inline field">
664
- <div class="ui checkbox" id="allow-edits-from-maintainers"
664
+ <div class="ui checkbox tooltip " id="allow-edits-from-maintainers"
665
665
data-url="{{.Issue.Link}}"
666
- data-prompt-tip ="{{.locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}"
666
+ data-tooltip-content ="{{.locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}"
667
667
data-prompt-error="{{.locale.Tr "repo.pulls.allow_edits_from_maintainers_err"}}"
668
668
>
669
669
<label><strong>{{.locale.Tr "repo.pulls.allow_edits_from_maintainers"}}</strong></label>
Original file line number Diff line number Diff line change 147
147
<script >
148
148
import {createApp , nextTick } from ' vue' ;
149
149
import $ from ' jquery' ;
150
- import {initTooltip } from ' ../modules/tippy.js' ;
151
150
import {SvgIcon } from ' ../svg.js' ;
152
151
153
152
const {appSubUrl , assetUrlPrefix , pageData } = window .config ;
@@ -238,9 +237,6 @@ const sfc = {
238
237
mounted () {
239
238
const el = document .getElementById (' dashboard-repo-list' );
240
239
this .changeReposFilter (this .reposFilter );
241
- for (const elTooltip of el .querySelectorAll (' .tooltip' )) {
242
- initTooltip (elTooltip);
243
- }
244
240
$ (el).find (' .dropdown' ).dropdown ();
245
241
nextTick (() => {
246
242
this .$refs .search .focus ();
Original file line number Diff line number Diff line change 21
21
</template >
22
22
23
23
<script >
24
- import {initTooltip } from ' ../modules/tippy.js' ;
25
24
import {doLoadMoreFiles } from ' ../features/repo-diff.js' ;
26
25
27
26
const {pageData } = window .config ;
@@ -30,17 +29,6 @@ export default {
30
29
data : () => {
31
30
return pageData .diffFileInfo ;
32
31
},
33
- watch: {
34
- fileListIsVisible (newValue ) {
35
- if (newValue === true ) {
36
- this .$nextTick (() => {
37
- for (const el of this .$refs .root .querySelectorAll (' .tooltip' )) {
38
- initTooltip (el);
39
- }
40
- });
41
- }
42
- }
43
- },
44
32
mounted () {
45
33
document .getElementById (' show-file-list-btn' ).addEventListener (' click' , this .toggleFileList );
46
34
},
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import {createDropzone} from './dropzone.js';
5
5
import { initCompColorPicker } from './comp/ColorPicker.js' ;
6
6
import { showGlobalErrorMessage } from '../bootstrap.js' ;
7
7
import { handleGlobalEnterQuickSubmit } from './comp/QuickSubmit.js' ;
8
- import { initTooltip } from '../modules/tippy.js' ;
9
8
import { svg } from '../svg.js' ;
10
9
import { hideElem , showElem , toggleElem } from '../utils/dom.js' ;
11
10
@@ -66,12 +65,6 @@ export function initGlobalButtonClickOnEnter() {
66
65
} ) ;
67
66
}
68
67
69
- export function initGlobalTooltips ( ) {
70
- for ( const el of document . getElementsByClassName ( 'tooltip' ) ) {
71
- initTooltip ( el ) ;
72
- }
73
- }
74
-
75
68
export function initGlobalCommon ( ) {
76
69
// Undo Safari emoji glitch fix at high enough zoom levels
77
70
if ( navigator . userAgent . match ( 'Safari' ) ) {
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ export function initContextPopups() {
30
30
31
31
createTippy ( this , {
32
32
content : el ,
33
+ placement : 'top-start' ,
33
34
interactive : true ,
34
35
interactiveBorder : 5 ,
35
36
onShow : ( ) => {
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import {initCompReactionSelector} from './comp/ReactionSelector.js';
3
3
import { initRepoIssueContentHistory } from './repo-issue-content.js' ;
4
4
import { validateTextareaNonEmpty } from './comp/EasyMDE.js' ;
5
5
import { initViewedCheckboxListenerFor , countAndUpdateViewedFiles } from './pull-view-file.js' ;
6
- import { initTooltip } from '../modules/tippy.js' ;
7
6
8
7
const { csrfToken} = window . config ;
9
8
@@ -60,10 +59,6 @@ export function initRepoDiffConversationForm() {
60
59
const $newConversationHolder = $ ( await $ . post ( $form . attr ( 'action' ) , formDataString ) ) ;
61
60
const { path, side, idx} = $newConversationHolder . data ( ) ;
62
61
63
- $newConversationHolder . find ( '.tooltip' ) . each ( function ( ) {
64
- initTooltip ( this ) ;
65
- } ) ;
66
-
67
62
$form . closest ( '.conversation-holder' ) . replaceWith ( $newConversationHolder ) ;
68
63
if ( $form . closest ( 'tr' ) . data ( 'line-type' ) === 'same' ) {
69
64
$ ( `[data-path="${ path } "] a.add-code-comment[data-idx="${ idx } "]` ) . addClass ( 'invisible' ) ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import {attachTribute} from './tribute.js';
4
4
import { createCommentEasyMDE , getAttachedEasyMDE } from './comp/EasyMDE.js' ;
5
5
import { initEasyMDEImagePaste } from './comp/ImagePaste.js' ;
6
6
import { initCompMarkupContentPreviewTab } from './comp/MarkupContentPreview.js' ;
7
- import { initTooltip , showTemporaryTooltip , createTippy } from '../modules/tippy.js' ;
7
+ import { showTemporaryTooltip , createTippy } from '../modules/tippy.js' ;
8
8
import { hideElem , showElem , toggleElem } from '../utils/dom.js' ;
9
9
import { setFileFolding } from './file-fold.js' ;
10
10
@@ -280,10 +280,7 @@ export function initRepoPullRequestAllowMaintainerEdit() {
280
280
const $checkbox = $ ( '#allow-edits-from-maintainers' ) ;
281
281
if ( ! $checkbox . length ) return ;
282
282
283
- const promptTip = $checkbox . attr ( 'data-prompt-tip' ) ;
284
283
const promptError = $checkbox . attr ( 'data-prompt-error' ) ;
285
-
286
- initTooltip ( $checkbox [ 0 ] , { content : promptTip } ) ;
287
284
$checkbox . checkbox ( {
288
285
'onChange' : ( ) => {
289
286
const checked = $checkbox . checkbox ( 'is checked' ) ;
Original file line number Diff line number Diff line change @@ -56,7 +56,6 @@ import {
56
56
initGlobalFormDirtyLeaveConfirm ,
57
57
initGlobalLinkActions ,
58
58
initHeadNavbarContentToggle ,
59
- initGlobalTooltips ,
60
59
} from './features/common-global.js' ;
61
60
import { initRepoTopicBar } from './features/repo-home.js' ;
62
61
import { initAdminEmails } from './features/admin/emails.js' ;
@@ -91,6 +90,7 @@ import {initCaptcha} from './features/captcha.js';
91
90
import { initRepositoryActionView } from './components/RepoActionView.vue' ;
92
91
import { initAriaCheckboxPatch } from './modules/aria/checkbox.js' ;
93
92
import { initAriaDropdownPatch } from './modules/aria/dropdown.js' ;
93
+ import { initGlobalTooltips } from './modules/tippy.js' ;
94
94
95
95
// Run time-critical code as soon as possible. This is safe to do because this
96
96
// script appears at the end of <body> and rendered HTML is accessible at that point.
You can’t perform that action at this time.
0 commit comments