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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
21e6c7ac
Commit
21e6c7ac
authored
Jan 08, 2018
by
Takuya Noguchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor CSS to eliminate vertical misalignment of login nav
parent
9fc2493b
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
21 additions
and
32 deletions
+21
-32
app/assets/javascripts/pages/sessions/new/signin_tabs_memoizer.js
...ts/javascripts/pages/sessions/new/signin_tabs_memoizer.js
+1
-1
app/assets/stylesheets/pages/login.scss
app/assets/stylesheets/pages/login.scss
+2
-18
app/views/devise/shared/_tab_single.html.haml
app/views/devise/shared/_tab_single.html.haml
+1
-1
app/views/devise/shared/_tabs_ldap.html.haml
app/views/devise/shared/_tabs_ldap.html.haml
+1
-1
app/views/devise/shared/_tabs_normal.html.haml
app/views/devise/shared/_tabs_normal.html.haml
+1
-1
changelogs/unreleased/41748-vertical-misalignment-login-box.yml
...logs/unreleased/41748-vertical-misalignment-login-box.yml
+5
-0
spec/features/users/login_spec.rb
spec/features/users/login_spec.rb
+1
-1
spec/javascripts/fixtures/linked_tabs.html.haml
spec/javascripts/fixtures/linked_tabs.html.haml
+1
-1
spec/javascripts/fixtures/signin_tabs.html.haml
spec/javascripts/fixtures/signin_tabs.html.haml
+4
-4
spec/javascripts/signin_tabs_memoizer_spec.js
spec/javascripts/signin_tabs_memoizer_spec.js
+4
-4
No files found.
app/assets/javascripts/pages/sessions/new/signin_tabs_memoizer.js
View file @
21e6c7ac
...
...
@@ -5,7 +5,7 @@ import AccessorUtilities from '~/lib/utils/accessor';
* Does that setting the current selected tab in the localStorage
*/
export
default
class
SigninTabsMemoizer
{
constructor
({
currentTabKey
=
'
current_signin_tab
'
,
tabSelector
=
'
ul.n
av
-tabs
'
}
=
{})
{
constructor
({
currentTabKey
=
'
current_signin_tab
'
,
tabSelector
=
'
ul.n
ew-session
-tabs
'
}
=
{})
{
this
.
currentTabKey
=
currentTabKey
;
this
.
tabSelector
=
tabSelector
;
this
.
isLocalStorageAvailable
=
AccessorUtilities
.
isLocalStorageAccessSafe
();
...
...
app/assets/stylesheets/pages/login.scss
View file @
21e6c7ac
...
...
@@ -154,26 +154,10 @@
a
{
width
:
100%
;
font-size
:
18px
;
margin-right
:
0
;
&
:hover
{
border
:
1px
solid
transparent
;
}
}
&
.active
{
border-bottom
:
1px
solid
$border-color
;
a
{
border
:
0
;
border-bottom
:
2px
solid
$link-underline-blue
;
margin-right
:
0
;
color
:
$black
;
&
:hover
{
border-bottom
:
2px
solid
$link-underline-blue
;
}
}
&
.active
>
a
{
cursor
:
default
;
}
}
}
...
...
app/views/devise/shared/_tab_single.html.haml
View file @
21e6c7ac
%ul
.nav-links.n
av-tabs.n
ew-session-tabs.single-tab
%ul
.nav-links.new-session-tabs.single-tab
%li
.active
%a
=
tab_title
app/views/devise/shared/_tabs_ldap.html.haml
View file @
21e6c7ac
%ul
.n
ew-session-tabs.nav-links.nav
-tabs
{
class:
(
'custom-provider-tabs'
if
form_based_providers
.
any?
)
}
%ul
.n
av-links.new-session
-tabs
{
class:
(
'custom-provider-tabs'
if
form_based_providers
.
any?
)
}
-
if
crowd_enabled?
%li
.active
=
link_to
"Crowd"
,
"#crowd"
,
'data-toggle'
=>
'tab'
...
...
app/views/devise/shared/_tabs_normal.html.haml
View file @
21e6c7ac
%ul
.nav-links.new-session-tabs
.nav-tabs
{
role:
'tablist'
}
%ul
.nav-links.new-session-tabs
{
role:
'tablist'
}
%li
.active
{
role:
'presentation'
}
%a
{
href:
'#login-pane'
,
data:
{
toggle:
'tab'
},
role:
'tab'
}
Sign in
-
if
allow_signup?
...
...
changelogs/unreleased/41748-vertical-misalignment-login-box.yml
0 → 100644
View file @
21e6c7ac
---
title
:
Refactor CSS to eliminate vertical misalignment of login nav
merge_request
:
16275
author
:
Takuya Noguchi
type
:
fixed
spec/features/users/login_spec.rb
View file @
21e6c7ac
...
...
@@ -392,7 +392,7 @@ feature 'Login' do
end
def
ensure_one_active_tab
expect
(
page
).
to
have_selector
(
'
.nav
-tabs > li.active'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'
ul.new-session
-tabs > li.active'
,
count:
1
)
end
def
ensure_one_active_pane
...
...
spec/javascripts/fixtures/linked_tabs.html.haml
View file @
21e6c7ac
%ul
.nav
.nav
-tabs.linked-tabs
%ul
.nav
-links.new-session
-tabs.linked-tabs
%li
%a
{
href:
'foo/bar/1'
,
data:
{
target:
'div#tab1'
,
action:
'tab1'
,
toggle:
'tab'
}
}
Tab 1
...
...
spec/javascripts/fixtures/signin_tabs.html.haml
View file @
21e6c7ac
%ul
.nav-tabs
%ul
.nav-links.new-session-tabs
%li
.active
%a
{
href:
'#ldap'
}
LDAP
%li
%a
.active
{
id:
'standard'
,
href:
'#standard'
}
Standard
%li
%a
{
id:
'ldap'
,
href:
'#ldap'
}
Ldap
%a
{
href:
'#login-pane'
}
Standard
spec/javascripts/signin_tabs_memoizer_spec.js
View file @
21e6c7ac
...
...
@@ -4,7 +4,7 @@ import SigninTabsMemoizer from '~/pages/sessions/new/signin_tabs_memoizer';
(()
=>
{
describe
(
'
SigninTabsMemoizer
'
,
()
=>
{
const
fixtureTemplate
=
'
static/signin_tabs.html.raw
'
;
const
tabSelector
=
'
ul.n
av
-tabs
'
;
const
tabSelector
=
'
ul.n
ew-session
-tabs
'
;
const
currentTabKey
=
'
current_signin_tab
'
;
let
memo
;
...
...
@@ -27,7 +27,7 @@ import SigninTabsMemoizer from '~/pages/sessions/new/signin_tabs_memoizer';
it
(
'
does nothing if no tab was previously selected
'
,
()
=>
{
createMemoizer
();
expect
(
document
.
querySelector
(
'
li a.active
'
).
getAttribute
(
'
id
'
)).
toEqual
(
'
standard
'
);
expect
(
document
.
querySelector
(
`
${
tabSelector
}
> li.active a`
).
getAttribute
(
'
href
'
)).
toEqual
(
'
#ldap
'
);
});
it
(
'
shows last selected tab on boot
'
,
()
=>
{
...
...
@@ -48,9 +48,9 @@ import SigninTabsMemoizer from '~/pages/sessions/new/signin_tabs_memoizer';
it
(
'
saves last selected tab on change
'
,
()
=>
{
createMemoizer
();
document
.
getElementById
(
'
standard
'
).
click
();
document
.
querySelector
(
'
a[href="#login-pane"]
'
).
click
();
expect
(
memo
.
readData
()).
toEqual
(
'
#
standard
'
);
expect
(
memo
.
readData
()).
toEqual
(
'
#
login-pane
'
);
});
it
(
'
overrides last selected tab with hash tag when given
'
,
()
=>
{
...
...
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