Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit Contentlet: Implement feature flag #26163

Closed
Tracked by #25445
fmontes opened this issue Sep 18, 2023 · 6 comments · Fixed by #26242
Closed
Tracked by #25445

Edit Contentlet: Implement feature flag #26163

fmontes opened this issue Sep 18, 2023 · 6 comments · Fixed by #26242

Comments

@fmontes
Copy link
Member

fmontes commented Sep 18, 2023

Parent

#25445

User Story

As a stakeholder, I want you to implement the feature flags for the new edit contentlet screen.

Acceptance Criteria

  • White list a feature flag DOT_CONTENT.EDITOR2.ENABLE=true and DOT_CONTENT.EDITOR2.CONTENT_TYPE=* here
  • Create a new Nx library for edit content in libs/edit-content and make the structure like this:

Image

  • Load the new library main component when the feature flag is true. The events in from the JSP are here in core-web/apps/dotcms-ui/src/app/api/services/dot-custom-event-handler/dot-custom-event-handler.service.ts and the sections where it should load are:
- Content search
  - Add
  - Edit
- Pages
  - Create new page
  - Contextual menu
  - Bookmarks > Edit page
- Site browser
  - Create new page
  - Page properties
  - Create new file
- Tasks
  - Detail

Proposed Objective

Core Features

Proposed Priority

Priority 3 - Average

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

  • Here is the entry point to listen for the events to start edit: create-contentlet, edit-page and edit-contentlet I think are the one we are going to need.
  • In the router we need to check here

Assumptions & Initiation Needs

  • We need to research Angular 14 or 15 new router feature because there might be something we can use.
  • The Angular router has the capability to load different components based on specific criteria.

Quality Assurance Notes & Workarounds

  • QA should test the new feature flag to ensure it can enable or disable the redesigned edit contentlet screen.
  • QA should validate that when both flags are true and the content belongs to the specified content types, the new design is displayed.
  • Potential workarounds could include reverting to the old design if issues arise with the new design, while these issues are addressed.

Sub-Tasks & Estimates:

  • Implement feature flag in code
  • Create the Custom Event for Angular to pick up
  • Configure Angular router to load the new component
  • Design and implement the new edit contentlet screen component
  • Test the redesigned screen in different scenarios and sections
@fmontes fmontes changed the title Enable Feature Flag to Edit Contentlets Edit Contentlet: Implement feature flag from router Sep 18, 2023
@fmontes fmontes moved this to Next 1-3 Sprints in dotCMS - Product Planning Sep 18, 2023
@fmontes fmontes changed the title Edit Contentlet: Implement feature flag from router Edit Contentlet: Implement feature flag Sep 20, 2023
@zJaaal zJaaal self-assigned this Sep 22, 2023
@zJaaal zJaaal moved this from Next 1-3 Sprints to In Progress in dotCMS - Product Planning Sep 22, 2023
@zJaaal zJaaal linked a pull request Sep 22, 2023 that will close this issue
9 tasks
@rjvelazco rjvelazco linked a pull request Sep 27, 2023 that will close this issue
fmontes pushed a commit that referenced this issue Oct 2, 2023
#26242)

* dev (general): add new library and route

* dev (configuration resource Java): Add Feature Flags to WhiteList

* copywritting (edit-content routing): change name to match standard

* dev (edit content guard): add guard to prevent navigation without feature flag

* dev (app routing): add guard to edit content and move pages route to angular

* fix (general): add guard to providers and fix bad use of inject

* dev (custom event handler): add feature flag to redirect to new form instead of jsp old dialog

* fix (general test): test were broken by bad import in providers

* fix (form component test): missing import

* dev (general): add routing for creating contentlet

* dev (dot custom event handler): add re routing for edit task

* dev (dot pages store): add redirect to new portlet when feature flag is on

* fix (pages portlet): some tests were broken

* dev (dot edit page nav): Add redirect to new edit contentlet

* fix (pages create dialog): route were wrong

* Revert "dev (dot edit page nav): Add redirect to new edit contentlet"

This reverts commit d9a3f9f.

* dev (jsp): add contentType to event

* dev (dot custom event handler service): add event for create contentlet from edit page

* dev (general): final replace of the route to content

* dev (general): solve feedback

* feedback (edit content guard): change the approach to be functional guard

* feedback (general): add tests and small refactor

* feedback (general): small refactor

* feedback (feature flags): fix content editor 2 value

* dev (dot properties service): add methods to get feature flags values directly

* dev (jsp): edit redirects now sends the content type in the event

* dev (host jsp): now host emits a different event to go to legacy portlet

* dev (custom event handler): refactor to handle new feature flag method and verify content types

* fix (custom event handler): tests were broken

* fix (dot properties service): Add missing done callback

* dev (general): apply refactor for new feature flag method

* fix (dot feature flag resolver): test were broken

* dev (dot pages): add redirect to new edit contentlet checking the content types

* fix (pages store): fix tests

* feedback (general): change name of methods

* feedback (general): fix feature flag name
@github-project-automation github-project-automation bot moved this from In Progress to Done in dotCMS - Product Planning Oct 2, 2023
@fmontes fmontes moved this from Done to Internal QA in dotCMS - Product Planning Oct 2, 2023
@fmontes
Copy link
Member Author

fmontes commented Oct 2, 2023

Note to QA:

With the flags disabled, you need to make sure that the edit content is working as usual in the following sections:

- Content search
  - Add
  - Edit
- Pages
  - Create new page
  - Contextual menu
  - Bookmarks > Edit page
- Site browser
  - Create new page
  - Page properties
  - Create new file
- Tasks
  - Detail

This includes create, edit, archive, delete, workflow actions and any other operation related to contentlets and pags (folder not included).

For sites, events, and vanity url we will be doing another issue.

Now if the feature flag is on, then you will see a new blank page with a hello world and a new url based on /content

@fmontes fmontes moved this from Internal QA to QA - Backlog in dotCMS - Product Planning Oct 2, 2023
@bryanboza bryanboza moved this from QA - Backlog to QA - In Progress in dotCMS - Product Planning Oct 2, 2023
@manuelrojas
Copy link
Contributor

image
@zJaaal Seeing this in Master ☝️

@zJaaal
Copy link
Contributor

zJaaal commented Oct 3, 2023

Working on it!

@manuelrojas
Copy link
Contributor

manuelrojas commented Oct 3, 2023

Note: Fixed by re-deploying again. @zJaaal

@zJaaal
Copy link
Contributor

zJaaal commented Oct 3, 2023

Nice!

@fmontes fmontes moved this from QA - In Progress to Internal QA in dotCMS - Product Planning Oct 3, 2023
@fmontes fmontes moved this from Internal QA to In Progress in dotCMS - Product Planning Oct 3, 2023
@fmontes fmontes moved this from In Progress to QA - Backlog in dotCMS - Product Planning Oct 3, 2023
@bryanboza bryanboza moved this from QA - Backlog to QA - In Progress in dotCMS - Product Planning Oct 3, 2023
@josemejias11
Copy link
Contributor

Approved: Tested on master_74c2a31_SNAPSHOT, Docker, macOS 13.0, FF v113.0

@josemejias11 josemejias11 moved this from QA - In Progress to Done in dotCMS - Product Planning Oct 4, 2023
manuelrojas pushed a commit that referenced this issue Oct 5, 2023
#26242)

* dev (general): add new library and route

* dev (configuration resource Java): Add Feature Flags to WhiteList

* copywritting (edit-content routing): change name to match standard

* dev (edit content guard): add guard to prevent navigation without feature flag

* dev (app routing): add guard to edit content and move pages route to angular

* fix (general): add guard to providers and fix bad use of inject

* dev (custom event handler): add feature flag to redirect to new form instead of jsp old dialog

* fix (general test): test were broken by bad import in providers

* fix (form component test): missing import

* dev (general): add routing for creating contentlet

* dev (dot custom event handler): add re routing for edit task

* dev (dot pages store): add redirect to new portlet when feature flag is on

* fix (pages portlet): some tests were broken

* dev (dot edit page nav): Add redirect to new edit contentlet

* fix (pages create dialog): route were wrong

* Revert "dev (dot edit page nav): Add redirect to new edit contentlet"

This reverts commit d9a3f9f.

* dev (jsp): add contentType to event

* dev (dot custom event handler service): add event for create contentlet from edit page

* dev (general): final replace of the route to content

* dev (general): solve feedback

* feedback (edit content guard): change the approach to be functional guard

* feedback (general): add tests and small refactor

* feedback (general): small refactor

* feedback (feature flags): fix content editor 2 value

* dev (dot properties service): add methods to get feature flags values directly

* dev (jsp): edit redirects now sends the content type in the event

* dev (host jsp): now host emits a different event to go to legacy portlet

* dev (custom event handler): refactor to handle new feature flag method and verify content types

* fix (custom event handler): tests were broken

* fix (dot properties service): Add missing done callback

* dev (general): apply refactor for new feature flag method

* fix (dot feature flag resolver): test were broken

* dev (dot pages): add redirect to new edit contentlet checking the content types

* fix (pages store): fix tests

* feedback (general): change name of methods

* feedback (general): fix feature flag name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment