Uploaded image for project: 'Magnolia Frontend Helpers'
  1. Magnolia Frontend Helpers
  2. MGNLFE-155

SSR | It should not be necessary to tell FEHelpers if it is in the page editor

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 1.4
    • None
    • None
    • None
    • Yes
    • DevX 38, DevX 39, DevX 40, DevX 41, DevX 42
    • 0.5
    • Yes

      Proposal

      I thnk this can maybe be addressed once https://jira.magnolia-cms.com/browse/MGNLFE-232 is merged in.

      Explanation

      Currently it is necessary to tell the fehelper libraries whether the app is running in the page editor. Developers need to set global.mgnlInPageEditor to true in case rendering green bars for SSR.

      The current approach was chosen in the interest of time and to ensure that  the developer had the control to set this information no matter what type of environment they are running in.

      Now, with this ticket,  we invest the time to find a good solution that works with all key anticipated use cases. At least with SSR/Preview on Next, Gatsby, Scully and Nuxt.

      See the ticket whhere behavirou was introduced: https://jira.magnolia-cms.com/browse/MGNLFE-118

      Key comments:
      "I think it's risky to remove the inIframe check now. On nodejs we have the global object that we can add something like mgnlEditMode=true"

      "As long as it works in next js (or any other SSR) it's perfect.
      We make it work, then we can make it better"

        Acceptance criteria

              rsiska Robert Šiška
              czimmermann Christopher Zimmermann
              DeveloperX
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved:
                Work Started:

                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 22.25d
                    22.25d