Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
af4a7b3e
Commit
af4a7b3e
authored
Jun 13, 2021
by
Himanshu Kapoor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show tooltip on link button
parent
424c1127
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
1 deletion
+13
-1
app/assets/javascripts/content_editor/components/toolbar_link_button.vue
...scripts/content_editor/components/toolbar_link_button.vue
+7
-0
app/assets/javascripts/content_editor/components/top_toolbar.vue
...ets/javascripts/content_editor/components/top_toolbar.vue
+1
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/frontend/content_editor/components/__snapshots__/toolbar_link_button_spec.js.snap
...components/__snapshots__/toolbar_link_button_spec.js.snap
+1
-1
spec/frontend/content_editor/components/top_toolbar_spec.js
spec/frontend/content_editor/components/top_toolbar_spec.js
+1
-0
No files found.
app/assets/javascripts/content_editor/components/toolbar_link_button.vue
View file @
af4a7b3e
...
...
@@ -6,6 +6,7 @@ import {
GlFormInputGroup
,
GlDropdownDivider
,
GlDropdownItem
,
GlTooltipDirective
as
GlTooltip
,
}
from
'
@gitlab/ui
'
;
import
{
Editor
as
TiptapEditor
}
from
'
@tiptap/vue-2
'
;
import
{
hasSelection
}
from
'
../services/utils
'
;
...
...
@@ -21,6 +22,9 @@ export default {
GlDropdownItem
,
GlButton
,
},
directives
:
{
GlTooltip
,
},
props
:
{
tiptapEditor
:
{
type
:
TiptapEditor
,
...
...
@@ -68,6 +72,9 @@ export default {
</
script
>
<
template
>
<gl-dropdown
v-gl-tooltip
:aria-label=
"__('Insert link')"
:title=
"__('Insert link')"
:toggle-class=
"
{ active: isActive }"
size="small"
category="tertiary"
...
...
app/assets/javascripts/content_editor/components/top_toolbar.vue
View file @
af4a7b3e
...
...
@@ -73,6 +73,7 @@ export default {
@
execute=
"trackToolbarControlExecution"
/>
<toolbar-link-button
data-testid=
"link"
:tiptap-editor=
"contentEditor.tiptapEditor"
@
execute=
"trackToolbarControlExecution"
/>
...
...
locale/gitlab.pot
View file @
af4a7b3e
...
...
@@ -17495,6 +17495,9 @@ msgstr ""
msgid "Insert inline code"
msgstr ""
msgid "Insert link"
msgstr ""
msgid "Insert suggestion"
msgstr ""
...
...
spec/frontend/content_editor/components/__snapshots__/toolbar_link_button_spec.js.snap
View file @
af4a7b3e
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`content_editor/components/toolbar_link_button renders dropdown component 1`] = `
"<div class=\\"dropdown b-dropdown gl-new-dropdown btn-group\\">
"<div class=\\"dropdown b-dropdown gl-new-dropdown btn-group\\"
aria-label=\\"Insert link\\" title=\\"Insert link\\"
>
<!----><button aria-haspopup=\\"true\\" aria-expanded=\\"false\\" type=\\"button\\" class=\\"btn dropdown-toggle btn-default btn-sm gl-button gl-dropdown-toggle btn-default-tertiary dropdown-icon-only\\">
<!----> <svg data-testid=\\"link-icon\\" role=\\"img\\" aria-hidden=\\"true\\" class=\\"dropdown-icon gl-icon s16\\">
<use href=\\"#link\\"></use>
...
...
spec/frontend/content_editor/components/top_toolbar_spec.js
View file @
af4a7b3e
...
...
@@ -48,6 +48,7 @@ describe('content_editor/components/top_toolbar', () => {
${
'
ordered-list
'
}
|
${{
contentType
:
'
orderedList
'
,
iconName
:
'
list-numbered
'
,
label
:
'
Add a numbered list
'
,
editorCommand
:
'
toggleOrderedList
'
}
}
${
'
code-block
'
}
|
${{
contentType
:
'
codeBlock
'
,
iconName
:
'
doc-code
'
,
label
:
'
Insert a code block
'
,
editorCommand
:
'
toggleCodeBlock
'
}
}
${
'
text-styles
'
}
|
${{}}
$
{
'
link
'
}
|
${{}}
`('given a $testId toolbar control', ({ testId, controlProps }) => {
beforeEach(() => {
buildWrapper();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment