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
7a3b4eac
Commit
7a3b4eac
authored
Jun 16, 2020
by
Coung Ngo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve issue sticky header code
Improved code as a result of reviewer comments
parent
f3719089
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
app/assets/javascripts/issue_show/components/app.vue
app/assets/javascripts/issue_show/components/app.vue
+4
-4
app/assets/stylesheets/pages/issues.scss
app/assets/stylesheets/pages/issues.scss
+3
-3
spec/frontend/issue_show/components/app_spec.js
spec/frontend/issue_show/components/app_spec.js
+1
-1
No files found.
app/assets/javascripts/issue_show/components/app.vue
View file @
7a3b4eac
<
script
>
<
script
>
import
{
GlIntersectionObserver
}
from
'
@gitlab/ui
'
;
import
{
GlI
con
,
GlI
ntersectionObserver
}
from
'
@gitlab/ui
'
;
import
Visibility
from
'
visibilityjs
'
;
import
Visibility
from
'
visibilityjs
'
;
import
{
__
,
s__
,
sprintf
}
from
'
~/locale
'
;
import
{
__
,
s__
,
sprintf
}
from
'
~/locale
'
;
import
createFlash
from
'
~/flash
'
;
import
createFlash
from
'
~/flash
'
;
import
{
visitUrl
}
from
'
~/lib/utils/url_utility
'
;
import
{
visitUrl
}
from
'
~/lib/utils/url_utility
'
;
import
Poll
from
'
~/lib/utils/poll
'
;
import
Poll
from
'
~/lib/utils/poll
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
eventHub
from
'
../event_hub
'
;
import
eventHub
from
'
../event_hub
'
;
import
Service
from
'
../services/index
'
;
import
Service
from
'
../services/index
'
;
import
Store
from
'
../stores
'
;
import
Store
from
'
../stores
'
;
...
@@ -19,8 +18,8 @@ import { IssuableStatus, IssuableStatusText, IssuableType } from '../constants';
...
@@ -19,8 +18,8 @@ import { IssuableStatus, IssuableStatusText, IssuableType } from '../constants';
export
default
{
export
default
{
components
:
{
components
:
{
GlIcon
,
GlIntersectionObserver
,
GlIntersectionObserver
,
Icon
,
descriptionComponent
,
descriptionComponent
,
titleComponent
,
titleComponent
,
editedComponent
,
editedComponent
,
...
@@ -422,6 +421,7 @@ export default {
...
@@ -422,6 +421,7 @@ export default {
<div
<div
v-if=
"shouldShowStickyHeader"
v-if=
"shouldShowStickyHeader"
class=
"issue-sticky-header gl-fixed gl-z-index-2 gl-bg-white gl-border-1 gl-border-b-solid gl-border-b-gray-200 gl-py-3"
class=
"issue-sticky-header gl-fixed gl-z-index-2 gl-bg-white gl-border-1 gl-border-b-solid gl-border-b-gray-200 gl-py-3"
data-testid=
"issue-sticky-header"
>
>
<div
<div
class=
"issue-sticky-header-text gl-display-flex gl-align-items-center gl-mx-auto gl-px-5"
class=
"issue-sticky-header-text gl-display-flex gl-align-items-center gl-mx-auto gl-px-5"
...
@@ -430,7 +430,7 @@ export default {
...
@@ -430,7 +430,7 @@ export default {
class=
"issuable-status-box status-box gl-my-0"
class=
"issuable-status-box status-box gl-my-0"
:class=
"[isOpenStatus ? 'status-box-open' : 'status-box-issue-closed']"
:class=
"[isOpenStatus ? 'status-box-open' : 'status-box-issue-closed']"
>
>
<icon
:name=
"statusIcon"
class=
"gl-display-block d-sm-none gl-h-6!"
/>
<
gl-
icon
:name=
"statusIcon"
class=
"gl-display-block d-sm-none gl-h-6!"
/>
<span
class=
"gl-display-none d-sm-block"
>
{{
statusText
}}
</span>
<span
class=
"gl-display-none d-sm-block"
>
{{
statusText
}}
</span>
</p>
</p>
<p
<p
...
...
app/assets/stylesheets/pages/issues.scss
View file @
7a3b4eac
...
@@ -305,9 +305,9 @@ ul.related-merge-requests > li {
...
@@ -305,9 +305,9 @@ ul.related-merge-requests > li {
}
}
.issue-sticky-header
{
.issue-sticky-header
{
left
:
0
;
@include
gl-left-0
;
@include
gl-w-full
;
top
:
$header-height
;
top
:
$header-height
;
width
:
100%
;
// collapsed right sidebar
// collapsed right sidebar
@include
media-breakpoint-up
(
sm
)
{
@include
media-breakpoint-up
(
sm
)
{
...
@@ -362,7 +362,7 @@ ul.related-merge-requests > li {
...
@@ -362,7 +362,7 @@ ul.related-merge-requests > li {
.issuable-header-slide-enter-active
,
.issuable-header-slide-enter-active
,
.issuable-header-slide-leave-active
{
.issuable-header-slide-leave-active
{
transition
:
transform
0
.5s
;
@include
gl-transition-slow
;
}
}
.issuable-header-slide-enter
,
.issuable-header-slide-enter
,
...
...
spec/frontend/issue_show/components/app_spec.js
View file @
7a3b4eac
...
@@ -26,7 +26,7 @@ describe('Issuable output', () => {
...
@@ -26,7 +26,7 @@ describe('Issuable output', () => {
let
realtimeRequestCount
=
0
;
let
realtimeRequestCount
=
0
;
let
wrapper
;
let
wrapper
;
const
findStickyHeader
=
()
=>
wrapper
.
find
(
'
.issue-sticky-header
'
);
const
findStickyHeader
=
()
=>
wrapper
.
find
(
'
[data-testid="issue-sticky-header"]
'
);
beforeEach
(()
=>
{
beforeEach
(()
=>
{
setFixtures
(
`
setFixtures
(
`
...
...
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