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

Edt EMA: Enable Edit Mode for Customer Pages #27278

Closed
Tracked by #26644
fmontes opened this issue Jan 8, 2024 · 1 comment · Fixed by #27287
Closed
Tracked by #26644

Edt EMA: Enable Edit Mode for Customer Pages #27278

fmontes opened this issue Jan 8, 2024 · 1 comment · Fixed by #27287

Comments

@fmontes
Copy link
Member

fmontes commented Jan 8, 2024

User Story

As an admin, I want to be able to enable/disable edit mode for customer pages, so I can quickly switch between production and edit mode.

Acceptance Criteria

  • PostMessage is used to tell the customer page when to be in edit mode
  • When not in edit mode, hide all the HTML markup and don't emit any events to the window.parent

Proposed Objective

Core Feature

Proposed Priority

Priority 3 - Average

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

N/A

Assumptions & Initiation Needs

  • The customer page must be able to receive and handle postMessages

Quality Assurance Notes & Workarounds

N/A

Sub-Tasks & Estimates

  • Setup postMessage to communicate edit mode status to customer page: 2 hours
@zJaaal zJaaal self-assigned this Jan 8, 2024
@zJaaal zJaaal mentioned this issue Jan 10, 2024
github-merge-queue bot pushed a commit that referenced this issue Jan 10, 2024
#27287)

* add logic to hide UI elements for edit EMA

* change approach to handshake

* prevent hooks to execute if page is outside editor

* fix tests

* add test cases

* fix linter errors

* fix tests

* enhance documentation

* check the window parent to prevent the ping

* Update core-web/libs/sdk/react/src/lib/hooks/usePageEditor.tsx

Co-authored-by: Freddy Montes <751424+fmontes@users.noreply.github.com>

* Update core-web/libs/sdk/react/src/lib/hooks/usePageEditor.tsx

Co-authored-by: Freddy Montes <751424+fmontes@users.noreply.github.com>

* solve feedback on tests

* hot fixes for QA

---------

Co-authored-by: Freddy Montes <751424+fmontes@users.noreply.github.com>
@fmontes
Copy link
Member Author

fmontes commented Jan 10, 2024

Broken now:

image

Changes in the library with the row ref when you load the pages outside edit mode.

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

Successfully merging a pull request may close this issue.

2 participants