From 5b46970e80ea1ab0d7d7a02660c8b98162c5865a Mon Sep 17 00:00:00 2001
From: Helmi Akermi <70575401+hakermi@users.noreply.github.com>
Date: Thu, 19 Dec 2024 10:00:36 +0100
Subject: [PATCH] feat: Remove MIP-161 feature flags - EXO-76014 -
Meeds-io/MIPs#161 (#1258)
Remove MIP-161 feature flags
---
.../conf/wiki/feature-flags-configuration.xml | 51 -------------------
.../webui/workspace/UINotesHeadTemplate.gtmpl | 10 ----
.../notes-publication/initComponents.js | 9 ++++
.../components/NoteFullRichEditor.vue | 8 +--
.../notes/components/NotesOverview.vue | 4 --
5 files changed, 11 insertions(+), 71 deletions(-)
delete mode 100644 notes-webapp/src/main/webapp/WEB-INF/conf/wiki/feature-flags-configuration.xml
delete mode 100644 notes-webapp/src/main/webapp/groovy/webui/workspace/UINotesHeadTemplate.gtmpl
diff --git a/notes-webapp/src/main/webapp/WEB-INF/conf/wiki/feature-flags-configuration.xml b/notes-webapp/src/main/webapp/WEB-INF/conf/wiki/feature-flags-configuration.xml
deleted file mode 100644
index d7f415e4a3..0000000000
--- a/notes-webapp/src/main/webapp/WEB-INF/conf/wiki/feature-flags-configuration.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
- NoteFeatureProperties
- org.exoplatform.container.ExtendedPropertyConfigurator
-
-
- NoteFeatureProperties
- Note Feature enablement flag
-
-
-
-
-
- org.exoplatform.groovyscript.text.TemplateService
-
- UIPortalApplication-head
- addTemplateExtension
- org.exoplatform.groovyscript.text.TemplateExtensionPlugin
-
-
- templates
- The list of templates to include in HTML Page Header with UIPortalApplication.gtmpl
- war:/groovy/webui/workspace/UINotesHeadTemplate.gtmpl
-
-
-
-
-
diff --git a/notes-webapp/src/main/webapp/groovy/webui/workspace/UINotesHeadTemplate.gtmpl b/notes-webapp/src/main/webapp/groovy/webui/workspace/UINotesHeadTemplate.gtmpl
deleted file mode 100644
index 180a6e0e5a..0000000000
--- a/notes-webapp/src/main/webapp/groovy/webui/workspace/UINotesHeadTemplate.gtmpl
+++ /dev/null
@@ -1,10 +0,0 @@
-<%
- import org.exoplatform.commons.api.settings.ExoFeatureService;
- def rcontext = _ctx.getRequestContext();
- ExoFeatureService featureService = uicomponent.getApplicationComponent(ExoFeatureService.class);
- def userName = rcontext.getRemoteUser();
-%>
-
-
diff --git a/notes-webapp/src/main/webapp/vue-app/notes-publication/initComponents.js b/notes-webapp/src/main/webapp/vue-app/notes-publication/initComponents.js
index 0a52aa0c10..f1e6cbca0a 100644
--- a/notes-webapp/src/main/webapp/vue-app/notes-publication/initComponents.js
+++ b/notes-webapp/src/main/webapp/vue-app/notes-publication/initComponents.js
@@ -6,6 +6,8 @@ import NotePublicationTargetList from './components/publish-option/NotePublicati
import NoteScheduleOption from './components/schedule-option/NoteScheduleOption.vue';
import NotePublicationAdvancedOption from './components/advanced-option/NotePublicationAdvancedOption.vue';
+import * as notesService from '../../javascript/eXo/wiki/notesService.js';
+
const components = {
'note-publication-drawer': NotePublicationDrawer,
'note-metadata-properties-form': NoteMetadataPropertiesForm,
@@ -19,3 +21,10 @@ const components = {
for (const key in components) {
Vue.component(key, components[key]);
}
+
+
+if (!Vue.prototype.$notesService) {
+ window.Object.defineProperty(Vue.prototype, '$notesService', {
+ value: notesService,
+ });
+}
diff --git a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue
index 7911341206..b44a8b900e 100644
--- a/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue
+++ b/notes-webapp/src/main/webapp/vue-app/notes-rich-editor/components/NoteFullRichEditor.vue
@@ -284,9 +284,6 @@ export default {
},
isTranslation() {
return !!this.noteObject?.lang;
- },
- newPublicationDrawerEnabled() {
- return eXo?.env?.portal?.newPublicationDrawerEnabled;
}
},
created() {
@@ -402,15 +399,14 @@ export default {
}
},
postNote() {
- if (this.newPublicationDrawerEnabled && this.publicationParams
- && !this.isTranslation && !this.editMode) {
+ if (this.publicationParams && !this.isTranslation && !this.editMode) {
this.openPublicationDrawer(this.noteObject);
return;
}
this.postAndPublishNote();
},
postAndPublishNote(publicationSettings, note) {
- if (this.newPublicationDrawerEnabled && this.publicationParams) {
+ if (this.publicationParams) {
this.noteObject = note;
this.updateData();
}
diff --git a/notes-webapp/src/main/webapp/vue-app/notes/components/NotesOverview.vue b/notes-webapp/src/main/webapp/vue-app/notes/components/NotesOverview.vue
index 45d0515459..ff74163f35 100644
--- a/notes-webapp/src/main/webapp/vue-app/notes/components/NotesOverview.vue
+++ b/notes-webapp/src/main/webapp/vue-app/notes/components/NotesOverview.vue
@@ -314,7 +314,6 @@
:has-featured-image="hasFeaturedImage" />