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
101d8922
Commit
101d8922
authored
Aug 17, 2020
by
Doug Stull
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add anchors to profile preferences
- to enable easy linking from other pages.
parent
2e75bb50
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
6 deletions
+41
-6
app/views/profiles/preferences/_sourcegraph.html.haml
app/views/profiles/preferences/_sourcegraph.html.haml
+1
-1
app/views/profiles/preferences/show.html.haml
app/views/profiles/preferences/show.html.haml
+3
-3
changelogs/unreleased/235858-add-anchors-to-profile-preferences.yml
.../unreleased/235858-add-anchors-to-profile-preferences.yml
+5
-0
spec/views/profiles/preferences/show.html.haml_spec.rb
spec/views/profiles/preferences/show.html.haml_spec.rb
+32
-2
No files found.
app/views/profiles/preferences/_sourcegraph.html.haml
View file @
101d8922
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
.col-sm-12
.col-sm-12
%hr
%hr
.col-lg-4.profile-settings-sidebar
.col-lg-4.profile-settings-sidebar
#integrations
%h4
.gl-mt-0
%h4
.gl-mt-0
=
s_
(
'Preferences|Integrations'
)
=
s_
(
'Preferences|Integrations'
)
%p
%p
...
...
app/views/profiles/preferences/show.html.haml
View file @
101d8922
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
@content_class
=
"limit-container-width"
unless
fluid_layout
=
form_for
@user
,
url:
profile_preferences_path
,
remote:
true
,
method: :put
,
html:
{
class:
'row gl-mt-3 js-preferences-form'
}
do
|
f
|
=
form_for
@user
,
url:
profile_preferences_path
,
remote:
true
,
method: :put
,
html:
{
class:
'row gl-mt-3 js-preferences-form'
}
do
|
f
|
.col-lg-4.application-theme
.col-lg-4.application-theme
#navigation-theme
%h4
.gl-mt-0
%h4
.gl-mt-0
=
s_
(
'Preferences|Navigation theme'
)
=
s_
(
'Preferences|Navigation theme'
)
%p
%p
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
.col-sm-12
.col-sm-12
%hr
%hr
.col-lg-4.profile-settings-sidebar
.col-lg-4.profile-settings-sidebar
#syntax-highlighting-theme
%h4
.gl-mt-0
%h4
.gl-mt-0
=
s_
(
'Preferences|Syntax highlighting theme'
)
=
s_
(
'Preferences|Syntax highlighting theme'
)
%p
%p
...
@@ -92,7 +92,7 @@
...
@@ -92,7 +92,7 @@
.col-sm-12
.col-sm-12
%hr
%hr
.col-lg-4.profile-settings-sidebar
.col-lg-4.profile-settings-sidebar
#localization
%h4
.gl-mt-0
%h4
.gl-mt-0
=
_
(
'Localization'
)
=
_
(
'Localization'
)
%p
%p
...
...
changelogs/unreleased/235858-add-anchors-to-profile-preferences.yml
0 → 100644
View file @
101d8922
---
title
:
Add anchors to profile preferences
merge_request
:
39589
author
:
type
:
changed
spec/views/profiles/preferences/show.html.haml_spec.rb
View file @
101d8922
...
@@ -12,6 +12,26 @@ RSpec.describe 'profiles/preferences/show' do
...
@@ -12,6 +12,26 @@ RSpec.describe 'profiles/preferences/show' do
allow
(
controller
).
to
receive
(
:current_user
).
and_return
(
user
)
allow
(
controller
).
to
receive
(
:current_user
).
and_return
(
user
)
end
end
context
'navigation theme'
do
before
do
render
end
it
'has an id for anchoring'
do
expect
(
rendered
).
to
have_css
(
'#navigation-theme'
)
end
end
context
'syntax highlighting theme'
do
before
do
render
end
it
'has an id for anchoring'
do
expect
(
rendered
).
to
have_css
(
'#syntax-highlighting-theme'
)
end
end
context
'behavior'
do
context
'behavior'
do
before
do
before
do
render
render
...
@@ -21,7 +41,7 @@ RSpec.describe 'profiles/preferences/show' do
...
@@ -21,7 +41,7 @@ RSpec.describe 'profiles/preferences/show' do
expect
(
rendered
).
to
have_unchecked_field
(
'Render whitespace characters in the Web IDE'
)
expect
(
rendered
).
to
have_unchecked_field
(
'Render whitespace characters in the Web IDE'
)
end
end
it
'has an id for anchoring
on behavior
'
do
it
'has an id for anchoring'
do
expect
(
rendered
).
to
have_css
(
'#behavior'
)
expect
(
rendered
).
to
have_css
(
'#behavior'
)
end
end
...
@@ -31,13 +51,23 @@ RSpec.describe 'profiles/preferences/show' do
...
@@ -31,13 +51,23 @@ RSpec.describe 'profiles/preferences/show' do
end
end
end
end
context
'localization'
do
before
do
render
end
it
'has an id for anchoring'
do
expect
(
rendered
).
to
have_css
(
'#localization'
)
end
end
context
'sourcegraph'
do
context
'sourcegraph'
do
def
have_sourcegraph_field
(
*
args
)
def
have_sourcegraph_field
(
*
args
)
have_field
(
'user_sourcegraph_enabled'
,
*
args
)
have_field
(
'user_sourcegraph_enabled'
,
*
args
)
end
end
def
have_integrations_section
def
have_integrations_section
have_css
(
'.profile-settings-sidebar'
,
{
text:
'Integrations'
})
have_css
(
'
#integrations
.profile-settings-sidebar'
,
{
text:
'Integrations'
})
end
end
before
do
before
do
...
...
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