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
c7cef92d
Commit
c7cef92d
authored
Jan 12, 2021
by
Denys Mishunov
Committed by
Natalia Tepluhina
Jan 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored Editor Lite extensions
Moved those into the dedicated folder
parent
3b662c77
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
13 additions
and
13 deletions
+13
-13
app/assets/javascripts/blob_edit/edit_blob.js
app/assets/javascripts/blob_edit/edit_blob.js
+2
-2
app/assets/javascripts/editor/extensions/editor_ci_schema_ext.js
...ets/javascripts/editor/extensions/editor_ci_schema_ext.js
+1
-1
app/assets/javascripts/editor/extensions/editor_file_template_ext.js
...javascripts/editor/extensions/editor_file_template_ext.js
+0
-0
app/assets/javascripts/editor/extensions/editor_lite_extension_base.js
...vascripts/editor/extensions/editor_lite_extension_base.js
+1
-1
app/assets/javascripts/editor/extensions/editor_markdown_ext.js
...sets/javascripts/editor/extensions/editor_markdown_ext.js
+0
-0
app/assets/javascripts/pipeline_editor/components/text_editor.vue
...ts/javascripts/pipeline_editor/components/text_editor.vue
+1
-1
spec/frontend/blob_edit/edit_blob_spec.js
spec/frontend/blob_edit/edit_blob_spec.js
+4
-4
spec/frontend/editor/editor_ci_schema_ext_spec.js
spec/frontend/editor/editor_ci_schema_ext_spec.js
+1
-1
spec/frontend/editor/editor_lite_extension_base_spec.js
spec/frontend/editor/editor_lite_extension_base_spec.js
+1
-1
spec/frontend/editor/editor_lite_spec.js
spec/frontend/editor/editor_lite_spec.js
+1
-1
spec/frontend/editor/editor_markdown_ext_spec.js
spec/frontend/editor/editor_markdown_ext_spec.js
+1
-1
No files found.
app/assets/javascripts/blob_edit/edit_blob.js
View file @
c7cef92d
...
@@ -5,7 +5,7 @@ import { BLOB_EDITOR_ERROR, BLOB_PREVIEW_ERROR } from './constants';
...
@@ -5,7 +5,7 @@ import { BLOB_EDITOR_ERROR, BLOB_PREVIEW_ERROR } from './constants';
import
TemplateSelectorMediator
from
'
../blob/file_template_mediator
'
;
import
TemplateSelectorMediator
from
'
../blob/file_template_mediator
'
;
import
{
addEditorMarkdownListeners
}
from
'
~/lib/utils/text_markdown
'
;
import
{
addEditorMarkdownListeners
}
from
'
~/lib/utils/text_markdown
'
;
import
EditorLite
from
'
~/editor/editor_lite
'
;
import
EditorLite
from
'
~/editor/editor_lite
'
;
import
{
FileTemplateExtension
}
from
'
~/editor/editor_file_template_ext
'
;
import
{
FileTemplateExtension
}
from
'
~/editor/e
xtensions/e
ditor_file_template_ext
'
;
import
{
insertFinalNewline
}
from
'
~/lib/utils/text_utility
'
;
import
{
insertFinalNewline
}
from
'
~/lib/utils/text_utility
'
;
export
default
class
EditBlob
{
export
default
class
EditBlob
{
...
@@ -16,7 +16,7 @@ export default class EditBlob {
...
@@ -16,7 +16,7 @@ export default class EditBlob {
this
.
configureMonacoEditor
();
this
.
configureMonacoEditor
();
if
(
this
.
options
.
isMarkdown
)
{
if
(
this
.
options
.
isMarkdown
)
{
import
(
'
~/editor/editor_markdown_ext
'
)
import
(
'
~/editor/e
xtensions/e
ditor_markdown_ext
'
)
.
then
(({
EditorMarkdownExtension
:
MarkdownExtension
}
=
{})
=>
{
.
then
(({
EditorMarkdownExtension
:
MarkdownExtension
}
=
{})
=>
{
this
.
editor
.
use
(
new
MarkdownExtension
());
this
.
editor
.
use
(
new
MarkdownExtension
());
addEditorMarkdownListeners
(
this
.
editor
);
addEditorMarkdownListeners
(
this
.
editor
);
...
...
app/assets/javascripts/editor/editor_ci_schema_ext.js
→
app/assets/javascripts/editor/e
xtensions/e
ditor_ci_schema_ext.js
View file @
c7cef92d
import
Api
from
'
~/api
'
;
import
Api
from
'
~/api
'
;
import
{
registerSchema
}
from
'
~/ide/utils
'
;
import
{
registerSchema
}
from
'
~/ide/utils
'
;
import
{
EditorLiteExtension
}
from
'
./editor_lite_extension_base
'
;
import
{
EditorLiteExtension
}
from
'
./editor_lite_extension_base
'
;
import
{
EXTENSION_CI_SCHEMA_FILE_NAME_MATCH
}
from
'
./constants
'
;
import
{
EXTENSION_CI_SCHEMA_FILE_NAME_MATCH
}
from
'
.
.
/constants
'
;
export
class
CiSchemaExtension
extends
EditorLiteExtension
{
export
class
CiSchemaExtension
extends
EditorLiteExtension
{
/**
/**
...
...
app/assets/javascripts/editor/editor_file_template_ext.js
→
app/assets/javascripts/editor/e
xtensions/e
ditor_file_template_ext.js
View file @
c7cef92d
File moved
app/assets/javascripts/editor/editor_lite_extension_base.js
→
app/assets/javascripts/editor/e
xtensions/e
ditor_lite_extension_base.js
View file @
c7cef92d
import
{
ERROR_INSTANCE_REQUIRED_FOR_EXTENSION
}
from
'
./constants
'
;
import
{
ERROR_INSTANCE_REQUIRED_FOR_EXTENSION
}
from
'
.
.
/constants
'
;
export
class
EditorLiteExtension
{
export
class
EditorLiteExtension
{
constructor
({
instance
,
...
options
}
=
{})
{
constructor
({
instance
,
...
options
}
=
{})
{
...
...
app/assets/javascripts/editor/editor_markdown_ext.js
→
app/assets/javascripts/editor/e
xtensions/e
ditor_markdown_ext.js
View file @
c7cef92d
File moved
app/assets/javascripts/pipeline_editor/components/text_editor.vue
View file @
c7cef92d
<
script
>
<
script
>
import
EditorLite
from
'
~/vue_shared/components/editor_lite.vue
'
;
import
EditorLite
from
'
~/vue_shared/components/editor_lite.vue
'
;
import
{
CiSchemaExtension
}
from
'
~/editor/editor_ci_schema_ext
'
;
import
{
CiSchemaExtension
}
from
'
~/editor/e
xtensions/e
ditor_ci_schema_ext
'
;
export
default
{
export
default
{
components
:
{
components
:
{
...
...
spec/frontend/blob_edit/edit_blob_spec.js
View file @
c7cef92d
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
import
EditBlob
from
'
~/blob_edit/edit_blob
'
;
import
EditBlob
from
'
~/blob_edit/edit_blob
'
;
import
EditorLite
from
'
~/editor/editor_lite
'
;
import
EditorLite
from
'
~/editor/editor_lite
'
;
import
{
EditorMarkdownExtension
}
from
'
~/editor/editor_markdown_ext
'
;
import
{
EditorMarkdownExtension
}
from
'
~/editor/e
xtensions/e
ditor_markdown_ext
'
;
import
{
FileTemplateExtension
}
from
'
~/editor/editor_file_template_ext
'
;
import
{
FileTemplateExtension
}
from
'
~/editor/e
xtensions/e
ditor_file_template_ext
'
;
jest
.
mock
(
'
~/editor/editor_lite
'
);
jest
.
mock
(
'
~/editor/editor_lite
'
);
jest
.
mock
(
'
~/editor/editor_markdown_ext
'
);
jest
.
mock
(
'
~/editor/e
xtensions/e
ditor_markdown_ext
'
);
jest
.
mock
(
'
~/editor/editor_file_template_ext
'
);
jest
.
mock
(
'
~/editor/e
xtensions/e
ditor_file_template_ext
'
);
describe
(
'
Blob Editing
'
,
()
=>
{
describe
(
'
Blob Editing
'
,
()
=>
{
const
useMock
=
jest
.
fn
();
const
useMock
=
jest
.
fn
();
...
...
spec/frontend/editor/editor_ci_schema_ext_spec.js
View file @
c7cef92d
import
{
languages
}
from
'
monaco-editor
'
;
import
{
languages
}
from
'
monaco-editor
'
;
import
EditorLite
from
'
~/editor/editor_lite
'
;
import
EditorLite
from
'
~/editor/editor_lite
'
;
import
{
CiSchemaExtension
}
from
'
~/editor/editor_ci_schema_ext
'
;
import
{
CiSchemaExtension
}
from
'
~/editor/e
xtensions/e
ditor_ci_schema_ext
'
;
import
{
EXTENSION_CI_SCHEMA_FILE_NAME_MATCH
}
from
'
~/editor/constants
'
;
import
{
EXTENSION_CI_SCHEMA_FILE_NAME_MATCH
}
from
'
~/editor/constants
'
;
describe
(
'
~/editor/editor_ci_config_ext
'
,
()
=>
{
describe
(
'
~/editor/editor_ci_config_ext
'
,
()
=>
{
...
...
spec/frontend/editor/editor_lite_extension_base_spec.js
View file @
c7cef92d
import
{
ERROR_INSTANCE_REQUIRED_FOR_EXTENSION
}
from
'
~/editor/constants
'
;
import
{
ERROR_INSTANCE_REQUIRED_FOR_EXTENSION
}
from
'
~/editor/constants
'
;
import
{
EditorLiteExtension
}
from
'
~/editor/editor_lite_extension_base
'
;
import
{
EditorLiteExtension
}
from
'
~/editor/e
xtensions/e
ditor_lite_extension_base
'
;
describe
(
'
The basis for an Editor Lite extension
'
,
()
=>
{
describe
(
'
The basis for an Editor Lite extension
'
,
()
=>
{
let
ext
;
let
ext
;
...
...
spec/frontend/editor/editor_lite_spec.js
View file @
c7cef92d
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
import
{
editor
as
monacoEditor
,
languages
as
monacoLanguages
,
Uri
}
from
'
monaco-editor
'
;
import
{
editor
as
monacoEditor
,
languages
as
monacoLanguages
,
Uri
}
from
'
monaco-editor
'
;
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
import
Editor
from
'
~/editor/editor_lite
'
;
import
Editor
from
'
~/editor/editor_lite
'
;
import
{
EditorLiteExtension
}
from
'
~/editor/editor_lite_extension_base
'
;
import
{
EditorLiteExtension
}
from
'
~/editor/e
xtensions/e
ditor_lite_extension_base
'
;
import
{
DEFAULT_THEME
,
themes
}
from
'
~/ide/lib/themes
'
;
import
{
DEFAULT_THEME
,
themes
}
from
'
~/ide/lib/themes
'
;
import
{
EDITOR_LITE_INSTANCE_ERROR_NO_EL
,
URI_PREFIX
}
from
'
~/editor/constants
'
;
import
{
EDITOR_LITE_INSTANCE_ERROR_NO_EL
,
URI_PREFIX
}
from
'
~/editor/constants
'
;
...
...
spec/frontend/editor/editor_markdown_ext_spec.js
View file @
c7cef92d
import
{
Range
,
Position
}
from
'
monaco-editor
'
;
import
{
Range
,
Position
}
from
'
monaco-editor
'
;
import
EditorLite
from
'
~/editor/editor_lite
'
;
import
EditorLite
from
'
~/editor/editor_lite
'
;
import
{
EditorMarkdownExtension
}
from
'
~/editor/editor_markdown_ext
'
;
import
{
EditorMarkdownExtension
}
from
'
~/editor/e
xtensions/e
ditor_markdown_ext
'
;
describe
(
'
Markdown Extension for Editor Lite
'
,
()
=>
{
describe
(
'
Markdown Extension for Editor Lite
'
,
()
=>
{
let
editor
;
let
editor
;
...
...
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