DEVREL-2693: Examples for extended app modes#49
Open
AndrewDiMola wants to merge 1 commit intoWebflow-Examples:mainfrom
Open
DEVREL-2693: Examples for extended app modes#49AndrewDiMola wants to merge 1 commit intoWebflow-Examples:mainfrom
AndrewDiMola wants to merge 1 commit intoWebflow-Examples:mainfrom
Conversation
Covers the extended app modes work on the docs side (openapi-internal PR #790): - getCurrentMode: reads the current Designer mode and logs a mode-specific message. - isMode: checks whether the Designer is in Design mode and notifies the user when it is not. - subscribeAppModesEnriched: subscribes to currentappmode using the new event argument, demonstrating how the callback can read event.mode and event.appModes without a separate canForAppMode() call. Leaves the existing checkAppMode and subscribeAppModes methods intact to preserve the legacy pattern for reference. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion examples for the docs work in webflow/openapi-internal#790.
Adds three new methods to the
Utilitiesobject insrc/examples/utilities.ts:getCurrentMode— reads the current Designer mode withwebflow.getCurrentMode()and logs a mode-specific message.isMode— checks whether the Designer is in Design mode withwebflow.isMode("design")and notifies the user when it is not.subscribeAppModesEnriched— subscribes tocurrentappmodeusing the new event argument, showing howevent.modeandevent.appModesremove the need for a separatecanForAppMode()call inside the callback.Existing
checkAppModeandsubscribeAppModesmethods are left in place to preserve the legacy pattern for reference and backward-compat demonstration.Feature-flagged behind
ff-devpl-3603-app-mode-notificationsandff-devpl-3896-app-modes-build-modeon the platform side.