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
aa29ece0
Commit
aa29ece0
authored
Jan 05, 2022
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab master
parents
b2708669
43b6f69c
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
365 additions
and
343 deletions
+365
-343
.gitlab/CODEOWNERS
.gitlab/CODEOWNERS
+155
-155
Gemfile.lock
Gemfile.lock
+5
-5
app/assets/javascripts/content_editor/services/track_input_rules_and_shortcuts.js
...ontent_editor/services/track_input_rules_and_shortcuts.js
+25
-23
app/views/registrations/welcome/show.html.haml
app/views/registrations/welcome/show.html.haml
+1
-1
ee/spec/features/registrations/welcome_spec.rb
ee/spec/features/registrations/welcome_spec.rb
+21
-2
package.json
package.json
+23
-23
spec/frontend/content_editor/extensions/link_spec.js
spec/frontend/content_editor/extensions/link_spec.js
+1
-1
yarn.lock
yarn.lock
+134
-133
No files found.
.gitlab/CODEOWNERS
View file @
aa29ece0
This diff is collapsed.
Click to expand it.
Gemfile.lock
View file @
aa29ece0
...
...
@@ -124,14 +124,14 @@ GEM
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.1)
aws-eventstream (~> 1, >= 1.0.2)
azure-storage-blob (2.0.
1
)
azure-storage-blob (2.0.
3
)
azure-storage-common (~> 2.0)
nokogiri (~> 1
.11.0.rc2
)
azure-storage-common (2.0.
2
)
nokogiri (~> 1
, >= 1.10.8
)
azure-storage-common (2.0.
4
)
faraday (~> 1.0)
faraday_middleware (~> 1.0.0.rc1)
faraday_middleware (~> 1.0
, >= 1.0
.0.rc1)
net-http-persistent (~> 4.0)
nokogiri (~> 1
.11.0.rc2
)
nokogiri (~> 1
, >= 1.10.8
)
babosa (1.0.4)
backport (1.2.0)
base32 (0.3.2)
...
...
app/assets/javascripts/content_editor/services/track_input_rules_and_shortcuts.js
View file @
aa29ece0
...
...
@@ -35,31 +35,33 @@ const trackInputRule = (contentType, inputRule) => {
};
const
trackInputRulesAndShortcuts
=
(
tiptapExtension
)
=>
{
return
tiptapExtension
.
extend
({
addKeyboardShortcuts
()
{
const
shortcuts
=
this
.
parent
?.()
||
{};
const
{
name
}
=
this
;
/**
* We don’t want to track keyboard shortcuts
* that are not deliberately executed to create
* new types of content
*/
const
dotNotTrackKeys
=
[
ENTER_KEY
,
BACKSPACE_KEY
];
const
decorated
=
mapValues
(
shortcuts
,
(
commandFn
,
shortcut
)
=>
dotNotTrackKeys
.
includes
(
shortcut
)
?
commandFn
:
trackKeyboardShortcut
(
name
,
commandFn
,
shortcut
),
);
return
tiptapExtension
.
extend
({
addKeyboardShortcuts
()
{
const
shortcuts
=
this
.
parent
?.()
||
{};
const
{
name
}
=
this
;
/**
* We don’t want to track keyboard shortcuts
* that are not deliberately executed to create
* new types of content
*/
const
dotNotTrackKeys
=
[
ENTER_KEY
,
BACKSPACE_KEY
];
const
decorated
=
mapValues
(
shortcuts
,
(
commandFn
,
shortcut
)
=>
dotNotTrackKeys
.
includes
(
shortcut
)
?
commandFn
:
trackKeyboardShortcut
(
name
,
commandFn
,
shortcut
),
);
return
decorated
;
},
addInputRules
()
{
const
inputRules
=
this
.
parent
?.()
||
[];
const
{
name
}
=
this
;
return
decorated
;
},
addInputRules
()
{
const
inputRules
=
this
.
parent
?.()
||
[];
const
{
name
}
=
this
;
return
inputRules
.
map
((
inputRule
)
=>
trackInputRule
(
name
,
inputRule
));
},
});
return
inputRules
.
map
((
inputRule
)
=>
trackInputRule
(
name
,
inputRule
));
},
})
.
configure
(
tiptapExtension
.
options
);
};
export
default
trackInputRulesAndShortcuts
;
app/views/registrations/welcome/show.html.haml
View file @
aa29ece0
...
...
@@ -22,7 +22,7 @@
.row
.form-group.col-sm-12
=
f
.
label
:role
,
_
(
'Role'
),
class:
'label-bold'
=
f
.
select
:role
,
::
User
.
roles
.
keys
.
map
{
|
role
|
[
role
.
titleize
,
role
]
},
{
},
class:
'form-control js-user-role-dropdown'
,
autofocus
:
true
=
f
.
select
:role
,
::
User
.
roles
.
keys
.
map
{
|
role
|
[
role
.
titleize
,
role
]
},
{
include_blank:
_
(
'Select a role'
)
},
class:
'form-control js-user-role-dropdown'
,
autofocus:
true
,
required
:
true
-
if
Feature
.
enabled?
(
:user_other_role_details
)
.row
.form-group.col-sm-12.js-other-role-group.hidden
...
...
ee/spec/features/registrations/welcome_spec.rb
View file @
aa29ece0
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
RSpec
.
describe
'Welcome screen'
,
:js
do
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:user
)
{
create
(
:user
,
role:
nil
)
}
context
'when on GitLab.com'
do
before
do
...
...
@@ -18,9 +18,24 @@ RSpec.describe 'Welcome screen', :js do
it
'shows the welcome page'
do
expect
(
page
).
to
have_content
(
'Welcome to GitLab'
)
expect
(
page
).
to
have_content
(
'Select a role'
)
expect
(
page
).
to
have_content
(
'Continue'
)
end
it
'has validations'
do
click_button
'Continue'
expect
(
page
).
to
have_field
(
"user_role"
,
valid:
false
)
expect
(
page
).
to
have_field
(
"user_setup_for_company_true"
,
valid:
false
)
page
.
select
(
'Software Developer'
,
from:
'user_role'
)
choose
'user_setup_for_company_true'
click_button
'Continue'
expect
(
page
).
not_to
have_selector
(
'#user_role'
)
end
it
'allows specifying other for jobs_to_be_done'
do
expect
(
page
).
not_to
have_content
(
'Why are you signing up? (Optional)'
)
...
...
@@ -32,9 +47,12 @@ RSpec.describe 'Welcome screen', :js do
end
context
'email opt in'
do
let
(
:user
)
{
create
(
:user
,
email_opted_in:
false
)
}
it
'does not show the email opt in checkbox when setting up for a company'
do
expect
(
page
).
not_to
have_selector
(
'input[name="user[email_opted_in]'
,
visible:
true
)
page
.
select
(
'Software Developer'
,
from:
'user_role'
)
choose
'user_setup_for_company_true'
expect
(
page
).
not_to
have_selector
(
'input[name="user[email_opted_in]'
,
visible:
true
)
...
...
@@ -44,9 +62,10 @@ RSpec.describe 'Welcome screen', :js do
expect
(
user
.
reload
.
email_opted_in
).
to
eq
(
true
)
end
it
'shows the email opt
checkbox in
when setting up for just me'
do
it
'shows the email opt
in checkbox
when setting up for just me'
do
expect
(
page
).
not_to
have_selector
(
'input[name="user[email_opted_in]'
,
visible:
true
)
page
.
select
(
'Software Developer'
,
from:
'user_role'
)
choose
'user_setup_for_company_false'
expect
(
page
).
to
have_selector
(
'input[name="user[email_opted_in]'
,
visible:
true
)
...
...
package.json
View file @
aa29ece0
...
...
@@ -63,36 +63,36 @@
"
@rails/ujs
"
:
"
6.1.4-1
"
,
"
@sentry/browser
"
:
"
5.30.0
"
,
"
@sourcegraph/code-host-integration
"
:
"
0.0.60
"
,
"
@tiptap/core
"
:
"
^2.0.0-beta.1
43
"
,
"
@tiptap/extension-blockquote
"
:
"
^2.0.0-beta.2
5
"
,
"
@tiptap/extension-bold
"
:
"
^2.0.0-beta.2
4
"
,
"
@tiptap/extension-bullet-list
"
:
"
^2.0.0-beta.2
3
"
,
"
@tiptap/extension-code
"
:
"
^2.0.0-beta.2
5
"
,
"
@tiptap/extension-code-block-lowlight
"
:
"
2.0.0-beta.
57
"
,
"
@tiptap/core
"
:
"
^2.0.0-beta.1
60
"
,
"
@tiptap/extension-blockquote
"
:
"
^2.0.0-beta.2
6
"
,
"
@tiptap/extension-bold
"
:
"
^2.0.0-beta.2
5
"
,
"
@tiptap/extension-bullet-list
"
:
"
^2.0.0-beta.2
6
"
,
"
@tiptap/extension-code
"
:
"
^2.0.0-beta.2
6
"
,
"
@tiptap/extension-code-block-lowlight
"
:
"
2.0.0-beta.
63
"
,
"
@tiptap/extension-document
"
:
"
^2.0.0-beta.15
"
,
"
@tiptap/extension-dropcursor
"
:
"
^2.0.0-beta.25
"
,
"
@tiptap/extension-gapcursor
"
:
"
^2.0.0-beta.3
3
"
,
"
@tiptap/extension-gapcursor
"
:
"
^2.0.0-beta.3
4
"
,
"
@tiptap/extension-hard-break
"
:
"
^2.0.0-beta.30
"
,
"
@tiptap/extension-heading
"
:
"
^2.0.0-beta.2
3
"
,
"
@tiptap/extension-heading
"
:
"
^2.0.0-beta.2
4
"
,
"
@tiptap/extension-history
"
:
"
^2.0.0-beta.21
"
,
"
@tiptap/extension-horizontal-rule
"
:
"
^2.0.0-beta.30
"
,
"
@tiptap/extension-image
"
:
"
^2.0.0-beta.24
"
,
"
@tiptap/extension-italic
"
:
"
^2.0.0-beta.2
4
"
,
"
@tiptap/extension-link
"
:
"
^2.0.0-beta.
28
"
,
"
@tiptap/extension-list-item
"
:
"
^2.0.0-beta.
19
"
,
"
@tiptap/extension-ordered-list
"
:
"
^2.0.0-beta.2
4
"
,
"
@tiptap/extension-paragraph
"
:
"
^2.0.0-beta.2
2
"
,
"
@tiptap/extension-strike
"
:
"
^2.0.0-beta.2
6
"
,
"
@tiptap/extension-subscript
"
:
"
^2.0.0-beta.
9
"
,
"
@tiptap/extension-superscript
"
:
"
^2.0.0-beta.
9
"
,
"
@tiptap/extension-table
"
:
"
^2.0.0-beta.4
3
"
,
"
@tiptap/extension-italic
"
:
"
^2.0.0-beta.2
5
"
,
"
@tiptap/extension-link
"
:
"
^2.0.0-beta.
34
"
,
"
@tiptap/extension-list-item
"
:
"
^2.0.0-beta.
20
"
,
"
@tiptap/extension-ordered-list
"
:
"
^2.0.0-beta.2
7
"
,
"
@tiptap/extension-paragraph
"
:
"
^2.0.0-beta.2
3
"
,
"
@tiptap/extension-strike
"
:
"
^2.0.0-beta.2
7
"
,
"
@tiptap/extension-subscript
"
:
"
^2.0.0-beta.
10
"
,
"
@tiptap/extension-superscript
"
:
"
^2.0.0-beta.
10
"
,
"
@tiptap/extension-table
"
:
"
^2.0.0-beta.4
6
"
,
"
@tiptap/extension-table-cell
"
:
"
^2.0.0-beta.20
"
,
"
@tiptap/extension-table-header
"
:
"
^2.0.0-beta.22
"
,
"
@tiptap/extension-table-row
"
:
"
^2.0.0-beta.19
"
,
"
@tiptap/extension-task-item
"
:
"
^2.0.0-beta.
29
"
,
"
@tiptap/extension-task-list
"
:
"
^2.0.0-beta.2
3
"
,
"
@tiptap/extension-task-item
"
:
"
^2.0.0-beta.
30
"
,
"
@tiptap/extension-task-list
"
:
"
^2.0.0-beta.2
6
"
,
"
@tiptap/extension-text
"
:
"
^2.0.0-beta.15
"
,
"
@tiptap/vue-2
"
:
"
^2.0.0-beta.
69
"
,
"
@tiptap/vue-2
"
:
"
^2.0.0-beta.
74
"
,
"
@toast-ui/editor
"
:
"
^2.5.2
"
,
"
@toast-ui/vue-editor
"
:
"
^2.5.2
"
,
"
apollo-cache-inmemory
"
:
"
^1.6.6
"
,
...
...
@@ -162,11 +162,11 @@
"
popper.js
"
:
"
^1.16.1
"
,
"
portal-vue
"
:
"
^2.1.7
"
,
"
prismjs
"
:
"
^1.21.0
"
,
"
prosemirror-markdown
"
:
"
^
1.6.0
"
,
"
prosemirror-model
"
:
"
^1.1
5.0
"
,
"
prosemirror-markdown
"
:
"
1.6.0
"
,
"
prosemirror-model
"
:
"
^1.1
6.1
"
,
"
prosemirror-state
"
:
"
^1.3.4
"
,
"
prosemirror-tables
"
:
"
^1.1.1
"
,
"
prosemirror-view
"
:
"
^1.23.
3
"
,
"
prosemirror-view
"
:
"
^1.23.
5
"
,
"
raphael
"
:
"
^2.2.7
"
,
"
raw-loader
"
:
"
^4.0.2
"
,
"
scrollparent
"
:
"
^2.0.1
"
,
...
...
spec/frontend/content_editor/extensions/link_spec.js
View file @
aa29ece0
...
...
@@ -33,7 +33,7 @@ describe('content_editor/extensions/link', () => {
${
'
documentation](readme.md
'
}
|
${()
=>
p
(
'
documentation](readme.md
'
)}
${
'
http://example.com
'
}
|
${()
=>
p
(
link
({
href
:
'
http://example.com
'
},
'
http://example.com
'
))}
${
'
https://example.com
'
}
|
${()
=>
p
(
link
({
href
:
'
https://example.com
'
},
'
https://example.com
'
))}
${
'
www.example.com
'
}
|
${()
=>
p
(
link
({
href
:
'
www.example.com
'
},
'
www.example.com
'
))}
${
'
www.example.com
'
}
|
${()
=>
p
(
link
({
href
:
'
http://
www.example.com
'
},
'
www.example.com
'
))}
${
'
example.com/ab.html
'
}
|
${()
=>
p
(
'
example.com/ab.html
'
)}
${
'
https://www.google.com
'
}
|
${()
=>
p
(
link
({
href
:
'
https://www.google.com
'
},
'
https://www.google.com
'
))}
`
(
'
with input=$input, then should insert a $insertedNode
'
,
({
input
,
insertedNode
})
=>
{
...
...
yarn.lock
View file @
aa29ece0
This diff is collapsed.
Click to expand it.
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