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
4eca9329
Commit
4eca9329
authored
Jun 23, 2021
by
Mauricio Gonzalez
Committed by
Paul Slaughter
Jul 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch from @pslaughter
parent
0ac46aa6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
56 deletions
+21
-56
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+1
-4
app/assets/javascripts/nav/components/responsive_app.vue
app/assets/javascripts/nav/components/responsive_app.vue
+1
-13
app/assets/javascripts/nav/event_hub.js
app/assets/javascripts/nav/event_hub.js
+0
-5
app/assets/javascripts/nav/utils/has_menu_expanded.js
app/assets/javascripts/nav/utils/has_menu_expanded.js
+0
-2
app/assets/javascripts/nav/utils/index.js
app/assets/javascripts/nav/utils/index.js
+0
-1
app/assets/stylesheets/framework/header.scss
app/assets/stylesheets/framework/header.scss
+19
-31
No files found.
app/assets/javascripts/main.js
View file @
4eca9329
...
...
@@ -203,10 +203,7 @@ $body.on('ajax:complete, ajax:beforeSend, submit', 'form', function ajaxComplete
});
$
(
'
.navbar-toggler
'
).
on
(
'
click
'
,
()
=>
{
// The order is important. The `menu-expanded` is used as a source of truth for now.
// This can be simplified when the :combined_menu feature flag is removed.
// https://gitlab.com/gitlab-org/gitlab/-/issues/333180
navEventHub
.
$emit
(
EVENT_RESPONSIVE_TOGGLE
);
document
.
body
.
classList
.
toggle
(
'
top-nav-responsive-open
'
);
});
/**
...
...
app/assets/javascripts/nav/components/responsive_app.vue
View file @
4eca9329
...
...
@@ -2,8 +2,7 @@
import
{
FREQUENT_ITEMS_PROJECTS
,
FREQUENT_ITEMS_GROUPS
}
from
'
~/frequent_items/constants
'
;
import
{
BV_DROPDOWN_SHOW
,
BV_DROPDOWN_HIDE
}
from
'
~/lib/utils/constants
'
;
import
KeepAliveSlots
from
'
~/vue_shared/components/keep_alive_slots.vue
'
;
import
eventHub
,
{
EVENT_RESPONSIVE_TOGGLE
}
from
'
../event_hub
'
;
import
{
resetMenuItemsActive
,
hasMenuExpanded
}
from
'
../utils
'
;
import
{
resetMenuItemsActive
}
from
'
../utils
'
;
import
ResponsiveHeader
from
'
./responsive_header.vue
'
;
import
ResponsiveHome
from
'
./responsive_home.vue
'
;
import
TopNavContainerView
from
'
./top_nav_container_view.vue
'
;
...
...
@@ -33,25 +32,14 @@ export default {
},
},
created
()
{
eventHub
.
$on
(
EVENT_RESPONSIVE_TOGGLE
,
this
.
updateResponsiveOpen
);
this
.
$root
.
$on
(
BV_DROPDOWN_SHOW
,
this
.
showMobileOverlay
);
this
.
$root
.
$on
(
BV_DROPDOWN_HIDE
,
this
.
hideMobileOverlay
);
this
.
updateResponsiveOpen
();
},
beforeDestroy
()
{
eventHub
.
$off
(
EVENT_RESPONSIVE_TOGGLE
,
this
.
onToggle
);
this
.
$root
.
$off
(
BV_DROPDOWN_SHOW
,
this
.
showMobileOverlay
);
this
.
$root
.
$off
(
BV_DROPDOWN_HIDE
,
this
.
hideMobileOverlay
);
},
methods
:
{
updateResponsiveOpen
()
{
if
(
hasMenuExpanded
())
{
document
.
body
.
classList
.
add
(
'
top-nav-responsive-open
'
);
}
else
{
document
.
body
.
classList
.
remove
(
'
top-nav-responsive-open
'
);
}
},
onMenuItemClick
({
view
})
{
if
(
view
)
{
this
.
activeView
=
view
;
...
...
app/assets/javascripts/nav/event_hub.js
deleted
100644 → 0
View file @
0ac46aa6
import
eventHubFactory
from
'
~/helpers/event_hub_factory
'
;
export
const
EVENT_RESPONSIVE_TOGGLE
=
'
top-nav-responsive-toggle
'
;
export
default
eventHubFactory
();
app/assets/javascripts/nav/utils/has_menu_expanded.js
deleted
100644 → 0
View file @
0ac46aa6
export
const
hasMenuExpanded
=
()
=>
Boolean
(
document
.
querySelector
(
'
.header-content.menu-expanded
'
));
app/assets/javascripts/nav/utils/index.js
View file @
4eca9329
export
*
from
'
./has_menu_expanded
'
;
export
*
from
'
./reset_menu_items_active
'
;
app/assets/stylesheets/framework/header.scss
View file @
4eca9329
...
...
@@ -27,17 +27,6 @@ $top-nav-hover-bg: var(--indigo-900-alpha-008, $indigo-900-alpha-008) !important
display
:
none
;
}
.menu-expanded
{
.more-icon
{
display
:
none
;
}
.close-icon
{
display
:
block
;
margin
:
auto
;
}
}
.header-content
{
width
:
100%
;
display
:
flex
;
...
...
@@ -103,18 +92,6 @@ $top-nav-hover-bg: var(--indigo-900-alpha-008, $indigo-900-alpha-008) !important
.navbar-collapse
>
ul
.nav
>
li
:not
(
.d-none
)
{
margin
:
0
2px
;
}
&
.menu-expanded
{
@include
media-breakpoint-down
(
xs
)
{
.hide-when-top-nav-responsive-open
{
display
:
none
;
}
.navbar-collapse
{
display
:
flex
;
}
}
}
}
.navbar-collapse
{
...
...
@@ -673,19 +650,30 @@ $top-nav-hover-bg: var(--indigo-900-alpha-008, $indigo-900-alpha-008) !important
}
.top-nav-responsive-open
{
.hide-when-top-nav-responsive-open
{
@include
media-breakpoint-down
(
xs
)
{
.more-icon
{
display
:
none
;
}
.close-icon
{
display
:
block
;
margin
:
auto
;
}
@include
media-breakpoint-down
(
xs
)
{
.navbar-collapse
{
display
:
flex
;
}
.hide-when-top-nav-responsive-open
{
display
:
none
!
important
;
}
}
.top-nav-responsive
{
@include
media-breakpoint-down
(
xs
)
{
.top-nav-responsive
{
@include
gl-display-block
;
}
}
.navbar-gitlab
.header-content
.title-container
{
flex
:
0
;
.navbar-gitlab
.header-content
.title-container
{
flex
:
0
;
}
}
}
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