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
Hide 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 @@
.col-sm-12
%hr
.col-lg-4.profile-settings-sidebar
.col-lg-4.profile-settings-sidebar
#integrations
%h4
.gl-mt-0
=
s_
(
'Preferences|Integrations'
)
%p
...
...
app/views/profiles/preferences/show.html.haml
View file @
101d8922
...
...
@@ -2,7 +2,7 @@
-
@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
|
.col-lg-4.application-theme
.col-lg-4.application-theme
#navigation-theme
%h4
.gl-mt-0
=
s_
(
'Preferences|Navigation theme'
)
%p
...
...
@@ -18,7 +18,7 @@
.col-sm-12
%hr
.col-lg-4.profile-settings-sidebar
.col-lg-4.profile-settings-sidebar
#syntax-highlighting-theme
%h4
.gl-mt-0
=
s_
(
'Preferences|Syntax highlighting theme'
)
%p
...
...
@@ -92,7 +92,7 @@
.col-sm-12
%hr
.col-lg-4.profile-settings-sidebar
.col-lg-4.profile-settings-sidebar
#localization
%h4
.gl-mt-0
=
_
(
'Localization'
)
%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
allow
(
controller
).
to
receive
(
:current_user
).
and_return
(
user
)
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
before
do
render
...
...
@@ -21,7 +41,7 @@ RSpec.describe 'profiles/preferences/show' do
expect
(
rendered
).
to
have_unchecked_field
(
'Render whitespace characters in the Web IDE'
)
end
it
'has an id for anchoring
on behavior
'
do
it
'has an id for anchoring'
do
expect
(
rendered
).
to
have_css
(
'#behavior'
)
end
...
...
@@ -31,13 +51,23 @@ RSpec.describe 'profiles/preferences/show' do
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
def
have_sourcegraph_field
(
*
args
)
have_field
(
'user_sourcegraph_enabled'
,
*
args
)
end
def
have_integrations_section
have_css
(
'.profile-settings-sidebar'
,
{
text:
'Integrations'
})
have_css
(
'
#integrations
.profile-settings-sidebar'
,
{
text:
'Integrations'
})
end
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