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

FTM: Create Feature Flag to enable New Preview Mode #30459

Closed
Tracked by #30598
KevinDavilaDotCMS opened this issue Oct 25, 2024 · 6 comments · Fixed by #30623 or #30654
Closed
Tracked by #30598

FTM: Create Feature Flag to enable New Preview Mode #30459

KevinDavilaDotCMS opened this issue Oct 25, 2024 · 6 comments · Fixed by #30623 or #30654

Comments

@KevinDavilaDotCMS
Copy link
Contributor

KevinDavilaDotCMS commented Oct 25, 2024

Parent Issue

#30598

User Story

As a user, I want to enable or disable the Preview Mode feature through a Feature Flag. If the Feature Flag is not enabled, I want my UVE to remain unchanged, retaining all existing functionality.

Task

Develop a new Feature Flag to enable the Preview Mode in our application. The new Feature Flag should follow the existing format of the FeatureFlag object, defined within the FeaturedFlags enum

export const enum FeaturedFlags {
    LOAD_FRONTEND_EXPERIMENTS = 'FEATURE_FLAG_EXPERIMENTS',
    DOTFAVORITEPAGE_FEATURE_ENABLE = 'DOTFAVORITEPAGE_FEATURE_ENABLE',
    FEATURE_FLAG_TEMPLATE_BUILDER = 'FEATURE_FLAG_TEMPLATE_BUILDER_2',
    FEATURE_FLAG_SEO_IMPROVEMENTS = 'FEATURE_FLAG_SEO_IMPROVEMENTS',
    FEATURE_FLAG_SEO_PAGE_TOOLS = 'FEATURE_FLAG_SEO_PAGE_TOOLS',
    FEATURE_FLAG_EDIT_URL_CONTENT_MAP = 'FEATURE_FLAG_EDIT_URL_CONTENT_MAP',
    FEATURE_FLAG_CONTENT_EDITOR2_ENABLED = 'CONTENT_EDITOR2_ENABLED',
    FEATURE_FLAG_CONTENT_EDITOR2_CONTENT_TYPE = 'CONTENT_EDITOR2_CONTENT_TYPE',
    FEATURE_FLAG_ANNOUNCEMENTS = 'FEATURE_FLAG_ANNOUNCEMENTS',
    FEATURE_FLAG_NEW_EDIT_PAGE = 'FEATURE_FLAG_NEW_EDIT_PAGE',
    //
    FEATURE_FLAG_UVE_PREVIEW_MODE = 'FEATURE_FLAG_NEW_EDIT_PAGE'
}

Additionally, this Feature Flag should be accessible through the getFeatureFlags method located in core/core-web/libs/data-access/src/lib/dot-properties/dot-properties.service.ts

Acceptance Criteria

  • A new constant for the Preview Mode Feature Flag is added to the FeaturedFlags enum. The new flag follows the naming conventions and structure of existing Feature Flags within this enum.
  • The Preview Mode Feature Flag is integrated into the getFeatureFlags method in dot-properties.service.ts, allowing it to be fetched and managed centrally.
  • Verify that toggling the Feature Flag correctly enables or disables the Preview Mode. Ensure no side effects or regressions on existing Feature Flags
@zJaaal
Copy link
Contributor

zJaaal commented Nov 11, 2024

Note to QA

The name decided for this FF is FEATURE_FLAG_UVE_PREVIEW_MODE

@zJaaal zJaaal moved this from Current Sprint Backlog to In Progress in dotCMS - Product Planning Nov 11, 2024
@zJaaal zJaaal linked a pull request Nov 11, 2024 that will close this issue
Copy link

github-actions bot commented Nov 11, 2024

@github-project-automation github-project-automation bot moved this from In Progress to Internal QA in dotCMS - Product Planning Nov 12, 2024
@nollymar nollymar reopened this Nov 13, 2024
@github-project-automation github-project-automation bot moved this from Internal QA to Current Sprint Backlog in dotCMS - Product Planning Nov 13, 2024
@nollymar nollymar moved this from Current Sprint Backlog to Internal QA in dotCMS - Product Planning Nov 13, 2024
@oidacra
Copy link
Member

oidacra commented Nov 13, 2024

When the FF does not exist return NOT_FOUND

{
    "FEATURE_FLAG_UVE_PREVIEW_MODE": "NOT_FOUND"
}

And show the empty component
CleanShot 2024-11-13 at 16 10 39@2x
Using trunk_b1ba6db docker image.

@zJaaal zJaaal linked a pull request Nov 13, 2024 that will close this issue
@zJaaal
Copy link
Contributor

zJaaal commented Nov 13, 2024

Addressed on #30653 #30654

@zJaaal zJaaal linked a pull request Nov 13, 2024 that will close this issue
@zJaaal zJaaal reopened this Nov 14, 2024
@github-project-automation github-project-automation bot moved this from Internal QA to Current Sprint Backlog in dotCMS - Product Planning Nov 14, 2024
@zJaaal zJaaal moved this from Current Sprint Backlog to Internal QA in dotCMS - Product Planning Nov 14, 2024
@rjvelazco rjvelazco self-assigned this Nov 18, 2024
@rjvelazco
Copy link
Contributor

Passed IQA

  • Tested on docker image: [dotcms/dotcms:trunk_3d77285]

FEATURE_FLAG_UVE_PREVIEW_MODE disable

30459-ftm-create-feature-flag-to-enable-new-preview-mode-disabled.mov

FEATURE_FLAG_UVE_PREVIEW_MODE enable

30459-ftm-create-feature-flag-to-enable-new-preview-mode-enabled.mov

@rjvelazco rjvelazco removed their assignment Nov 18, 2024
@rjvelazco rjvelazco moved this from Internal QA to QA - Backlog in dotCMS - Product Planning Nov 18, 2024
@bryanboza
Copy link
Member

Fixed, feature flag now is working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment