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
ebb81c6f
Commit
ebb81c6f
authored
Jan 12, 2022
by
Jacques
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix sourcegraph integration
Add missing decorator + selectors to fix sourcegraoh ingtegration
parent
4f1e3e52
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
3 deletions
+9
-3
app/assets/javascripts/blob/components/blob_header.vue
app/assets/javascripts/blob/components/blob_header.vue
+1
-1
app/assets/javascripts/repository/components/blob_controls.vue
...ssets/javascripts/repository/components/blob_controls.vue
+5
-0
app/assets/javascripts/vue_shared/components/source_viewer.vue
...ssets/javascripts/vue_shared/components/source_viewer.vue
+0
-1
app/controllers/projects/tree_controller.rb
app/controllers/projects/tree_controller.rb
+1
-0
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+1
-0
spec/frontend/blob/components/__snapshots__/blob_header_spec.js.snap
...nd/blob/components/__snapshots__/blob_header_spec.js.snap
+1
-1
No files found.
app/assets/javascripts/blob/components/blob_header.vue
View file @
ebb81c6f
...
@@ -81,7 +81,7 @@ export default {
...
@@ -81,7 +81,7 @@ export default {
</blob-filepath>
</blob-filepath>
</div>
</div>
<div
class=
"gl-display-none gl-sm-display-flex"
>
<div
class=
"gl-display-none gl-sm-display-flex
file-actions
"
>
<viewer-switcher
v-if=
"showViewerSwitcher"
v-model=
"viewer"
/>
<viewer-switcher
v-if=
"showViewerSwitcher"
v-model=
"viewer"
/>
<slot
name=
"actions"
></slot>
<slot
name=
"actions"
></slot>
...
...
app/assets/javascripts/repository/components/blob_controls.vue
View file @
ebb81c6f
...
@@ -3,6 +3,7 @@ import { GlButton } from '@gitlab/ui';
...
@@ -3,6 +3,7 @@ import { GlButton } from '@gitlab/ui';
import
{
__
}
from
'
~/locale
'
;
import
{
__
}
from
'
~/locale
'
;
import
createFlash
from
'
~/flash
'
;
import
createFlash
from
'
~/flash
'
;
import
getRefMixin
from
'
~/repository/mixins/get_ref
'
;
import
getRefMixin
from
'
~/repository/mixins/get_ref
'
;
import
initSourcegraph
from
'
~/sourcegraph
'
;
import
{
updateElementsVisibility
}
from
'
../utils/dom
'
;
import
{
updateElementsVisibility
}
from
'
../utils/dom
'
;
import
blobControlsQuery
from
'
../queries/blob_controls.query.graphql
'
;
import
blobControlsQuery
from
'
../queries/blob_controls.query.graphql
'
;
...
@@ -76,6 +77,9 @@ export default {
...
@@ -76,6 +77,9 @@ export default {
showBlobControls
(
shouldShow
)
{
showBlobControls
(
shouldShow
)
{
updateElementsVisibility
(
'
.tree-controls
'
,
!
shouldShow
);
updateElementsVisibility
(
'
.tree-controls
'
,
!
shouldShow
);
},
},
blobInfo
()
{
initSourcegraph
();
},
},
},
};
};
</
script
>
</
script
>
...
@@ -97,6 +101,7 @@ export default {
...
@@ -97,6 +101,7 @@ export default {
data-testid=
"permalink"
data-testid=
"permalink"
:href=
"blobInfo.permalinkPath"
:href=
"blobInfo.permalinkPath"
:class=
"$options.buttonClassList"
:class=
"$options.buttonClassList"
class=
"js-data-file-blob-permalink-url"
>
>
{{
$options
.
i18n
.
permalink
}}
{{
$options
.
i18n
.
permalink
}}
</gl-button>
</gl-button>
...
...
app/assets/javascripts/vue_shared/components/source_viewer.vue
View file @
ebb81c6f
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
import
{
GlSafeHtmlDirective
}
from
'
@gitlab/ui
'
;
import
{
GlSafeHtmlDirective
}
from
'
@gitlab/ui
'
;
import
LineNumbers
from
'
~/vue_shared/components/line_numbers.vue
'
;
import
LineNumbers
from
'
~/vue_shared/components/line_numbers.vue
'
;
import
{
sanitize
}
from
'
~/lib/dompurify
'
;
import
{
sanitize
}
from
'
~/lib/dompurify
'
;
import
'
~/sourcegraph/load
'
;
const
LINE_SELECT_CLASS_NAME
=
'
hll
'
;
const
LINE_SELECT_CLASS_NAME
=
'
hll
'
;
...
...
app/controllers/projects/tree_controller.rb
View file @
ebb81c6f
...
@@ -6,6 +6,7 @@ class Projects::TreeController < Projects::ApplicationController
...
@@ -6,6 +6,7 @@ class Projects::TreeController < Projects::ApplicationController
include
CreatesCommit
include
CreatesCommit
include
ActionView
::
Helpers
::
SanitizeHelper
include
ActionView
::
Helpers
::
SanitizeHelper
include
RedirectsForMissingPathOnTree
include
RedirectsForMissingPathOnTree
include
SourcegraphDecorator
around_action
:allow_gitaly_ref_name_caching
,
only:
[
:show
]
around_action
:allow_gitaly_ref_name_caching
,
only:
[
:show
]
...
...
app/controllers/projects_controller.rb
View file @
ebb81c6f
...
@@ -10,6 +10,7 @@ class ProjectsController < Projects::ApplicationController
...
@@ -10,6 +10,7 @@ class ProjectsController < Projects::ApplicationController
include
ImportUrlParams
include
ImportUrlParams
include
FiltersEvents
include
FiltersEvents
include
WorkItemsHierarchy
include
WorkItemsHierarchy
include
SourcegraphDecorator
prepend_before_action
(
only:
[
:show
])
{
authenticate_sessionless_user!
(
:rss
)
}
prepend_before_action
(
only:
[
:show
])
{
authenticate_sessionless_user!
(
:rss
)
}
...
...
spec/frontend/blob/components/__snapshots__/blob_header_spec.js.snap
View file @
ebb81c6f
...
@@ -17,7 +17,7 @@ exports[`Blob Header Default Actions rendering matches the snapshot 1`] = `
...
@@ -17,7 +17,7 @@ exports[`Blob Header Default Actions rendering matches the snapshot 1`] = `
</div>
</div>
<div
<div
class="gl-display-none gl-sm-display-flex"
class="gl-display-none gl-sm-display-flex
file-actions
"
>
>
<viewer-switcher-stub
<viewer-switcher-stub
value="simple"
value="simple"
...
...
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