diff --git a/.drone.star b/.drone.star index 29c6776a570..69d5edea0a5 100644 --- a/.drone.star +++ b/.drone.star @@ -78,7 +78,7 @@ config = { "oC10Files1": [ "webUIFilesCopy", "webUIFavorites", - "webUISimpleEditor", + "webUITextEditor", ], "oC10Files2": [ "webUIFilesList", @@ -265,7 +265,7 @@ config = { "oC10XGAPortrait2": [ "webUISharingAcceptShares", "webUISharingAcceptSharesToRoot", - "webUISimpleEditor", + "webUITextEditor", "webUIWebdavLockProtection", "webUIWebdavLocks", "webUIMoveFilesFolders", @@ -358,7 +358,7 @@ config = { "oC10iPhone2": [ "webUISharingAcceptShares", "webUISharingAcceptSharesToRoot", - "webUISimpleEditor", + "webUITextEditor", "webUISharingInternalUsersBlacklisted", "webUIWebdavLockProtection", "webUIWebdavLocks", @@ -434,7 +434,7 @@ config = { "webUICreateFilesFolders", "webUIDeleteFilesFolders", "webUIFilesCopy", - "webUISimpleEditor", + "webUITextEditor", ], "oCISFiles2": [ "webUIFilesList", @@ -560,7 +560,7 @@ config = { "webUIRestrictSharing", "webUISharingAcceptShares", "webUISharingAcceptSharesToRoot", - "webUISimpleEditor", + "webUITextEditor", "webUISharingInternalUsersBlacklisted", "webUIWebdavLockProtection", "webUIWebdavLocks", @@ -666,7 +666,7 @@ basicTestSuites = [ "webUIFilesList", "webUIFilesSearch", "webUILogin", - "webUISimpleEditor", + "webUITextEditor", "webUIMoveFilesFolders", "webUIOperationsWithFolderShares", "webUIPreview", diff --git a/.github/settings.yml b/.github/settings.yml index dc9ca78ba75..9e63b06adec 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -16,7 +16,7 @@ labels: color: "#ccf4ff" - name: feature:files color: "#d4c5f9" - - name: feature:simple-editor + - name: feature:text-editor color: "#d4c5f9" - name: feature:pdf-viewer color: "#d4c5f9" diff --git a/changelog/unreleased/enhancement-simple-editor b/changelog/unreleased/enhancement-text-editor similarity index 73% rename from changelog/unreleased/enhancement-simple-editor rename to changelog/unreleased/enhancement-text-editor index 373edcc3ca6..cc42a0a2032 100644 --- a/changelog/unreleased/enhancement-simple-editor +++ b/changelog/unreleased/enhancement-text-editor @@ -1,6 +1,6 @@ -Enhancement: Simple Editor +Enhancement: Text Editor -Replace MarkdownEditor with SimpleEditor and add the following improvements: +Replace MarkdownEditor with Text Editor and add the following improvements: * Disable preview for non md files (configurable) * Data integrity checks (prevent exiting with unsaved changes) * Better error information to the user @@ -12,3 +12,4 @@ Replace MarkdownEditor with SimpleEditor and add the following improvements: https://github.com/owncloud/web/pull/6667 https://github.com/owncloud/web/pull/6754 +https://github.com/owncloud/web/pull/6763 diff --git a/dev/docker/oc10.web.config.json b/dev/docker/oc10.web.config.json index b8a8b4b728a..7e5874139ce 100644 --- a/dev/docker/oc10.web.config.json +++ b/dev/docker/oc10.web.config.json @@ -8,7 +8,7 @@ "apps": [ "files", "preview", - "simple-editor", + "text-editor", "pdf-viewer", "search" ], diff --git a/dev/docker/ocis.web.config.json b/dev/docker/ocis.web.config.json index cdf870cf4f9..7e4b2f6fb2b 100644 --- a/dev/docker/ocis.web.config.json +++ b/dev/docker/ocis.web.config.json @@ -16,7 +16,7 @@ }, "apps": [ "files", - "simple-editor", + "text-editor", "preview", "pdf-viewer", "search", diff --git a/package.json b/package.json index e45e48cf57c..68f39004631 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "packages/web-app-draw-io", "packages/web-app-external", "packages/web-app-files", - "packages/web-app-simple-editor", + "packages/web-app-text-editor", "packages/web-app-preview", "packages/web-app-user-management", "packages/web-app-pdf-viewer", @@ -26,7 +26,7 @@ "test:integration": "jest --config ./tests/integration/config/jest.config.js", "test:e2e:cucumber": "NODE_TLS_REJECT_UNAUTHORIZED=0 cucumber-js --profile=e2e -f json:tests/e2e/cucumber/report/cucumber_report.json", "test:unit": "NODE_OPTIONS=--unhandled-rejections=throw jest --coverage --config ./tests/unit/config/jest.config.js", - "licenses:check": "license-checker-rseidelsohn --summary --relativeLicensePath --onlyAllow 'Python-2.0;Apache*;Apache License, Version 2.0;Apache-2.0;Apache 2.0;Artistic-2.0;BSD;BSD-3-Clause;CC-BY-3.0;CC-BY-4.0;CC0-1.0;ISC;MIT;MPL-2.0;Public Domain;Unicode-TOU;Unlicense;WTFPL' --excludePackages 'draw-io;external;files;simple-editor;preview;owncloud-design-system;pdf-viewer;search;user-management;web-client;web-pkg;web-runtime'", + "licenses:check": "license-checker-rseidelsohn --summary --relativeLicensePath --onlyAllow 'Python-2.0;Apache*;Apache License, Version 2.0;Apache-2.0;Apache 2.0;Artistic-2.0;BSD;BSD-3-Clause;CC-BY-3.0;CC-BY-4.0;CC0-1.0;ISC;MIT;MPL-2.0;Public Domain;Unicode-TOU;Unlicense;WTFPL' --excludePackages 'draw-io;external;files;text-editor;preview;owncloud-design-system;pdf-viewer;search;user-management;web-client;web-pkg;web-runtime'", "licenses:csv": "license-checker-rseidelsohn --relativeLicensePath --csv --out ./third-party-licenses/third-party-licenses.csv", "licenses:save": "license-checker-rseidelsohn --relativeLicensePath --out /dev/null --files ./third-party-licenses/third-party-licenses" }, diff --git a/packages/web-app-files/tests/__fixtures__/fileActions.js b/packages/web-app-files/tests/__fixtures__/fileActions.js index 5b6b8a9321e..a1e0a23cdc2 100644 --- a/packages/web-app-files/tests/__fixtures__/fileActions.js +++ b/packages/web-app-files/tests/__fixtures__/fileActions.js @@ -14,9 +14,9 @@ const meta = { id: 'draw-io', icon: 'grid' }, - 'simple-editor': { - name: 'SimpleEditor', - id: 'simple-editor', + 'text-editor': { + name: 'Text Editor', + id: 'text-editor', icon: 'file-text' } } @@ -49,12 +49,12 @@ const editors = [ routes }, { - app: 'simple-editor', + app: 'text-editor', extension: 'md', handler: null, icon: null, newTab: false, - routeName: 'simple-editor', + routeName: 'text-editor', routes } ] @@ -131,11 +131,11 @@ const fileActions = { selector: '.oc-files-actions-delete-trigger' }, - 'simple-editor': { + 'text-editor': { handler: jest.fn(), - label: () => 'Open in Simple Editor', - class: 'oc-files-actions-simple-editor-trigger', - selector: '.oc-files-actions-simple-editor-trigger', + label: () => 'Open in Text Editor', + class: 'oc-files-actions-text-editor-trigger', + selector: '.oc-files-actions-text-editor-trigger', opensInNewWindow: true }, 'draw-io': { @@ -165,7 +165,7 @@ const fileActions = { exports.fileActions = fileActions exports.getActions = function (actions = []) { - const defaultActions = ['download', 'simple-editor', 'draw-io', 'preview', 'navigate'] + const defaultActions = ['download', 'text-editor', 'draw-io', 'preview', 'navigate'] const res = [] for (const key of actions) { diff --git a/packages/web-app-files/tests/unit/components/AppBar/CreateAndUpload.spec.js b/packages/web-app-files/tests/unit/components/AppBar/CreateAndUpload.spec.js index e312335e78d..e694e393ddf 100644 --- a/packages/web-app-files/tests/unit/components/AppBar/CreateAndUpload.spec.js +++ b/packages/web-app-files/tests/unit/components/AppBar/CreateAndUpload.spec.js @@ -36,7 +36,7 @@ const newFileHandlers = [ { ext: 'txt', action: { - app: 'simple-editor', + app: 'text-editor', newTab: false, extension: 'txt' }, @@ -45,7 +45,7 @@ const newFileHandlers = [ { ext: 'md', action: { - app: 'simple-editor', + app: 'text-editor', newTab: false, extension: 'md' }, diff --git a/packages/web-app-files/tests/unit/components/FilesList/ContextActions.spec.js b/packages/web-app-files/tests/unit/components/FilesList/ContextActions.spec.js index 9eb906dd0f4..8c777cdcf17 100644 --- a/packages/web-app-files/tests/unit/components/FilesList/ContextActions.spec.js +++ b/packages/web-app-files/tests/unit/components/FilesList/ContextActions.spec.js @@ -30,8 +30,8 @@ const mockMenuSections = [ handler: jest.fn(), label: () => 'Open in editor', componentType: 'oc-button', - selector: '.oc-files-actions-simple-editor-trigger', - class: 'oc-files-actions-simple-editor-trigger' + selector: '.oc-files-actions-text-editor-trigger', + class: 'oc-files-actions-text-editor-trigger' }, ...exampleApps.map((app) => { return { diff --git a/packages/web-app-files/tests/unit/components/FilesList/__snapshots__/ContextActions.spec.js.snap b/packages/web-app-files/tests/unit/components/FilesList/__snapshots__/ContextActions.spec.js.snap index b01c0f9fb63..c20a5e12edc 100644 --- a/packages/web-app-files/tests/unit/components/FilesList/__snapshots__/ContextActions.spec.js.snap +++ b/packages/web-app-files/tests/unit/components/FilesList/__snapshots__/ContextActions.spec.js.snap @@ -3,7 +3,7 @@ exports[`ContextActions menu items renders a list of actions for a file 1`] = `