Repository navigation
feat(lightning-out): @W-24501804@ add CLWR site link, org-wide settings and App ID guidance - #1071
Closed
akashdhake wants to merge 3 commits into
Closed
akashdhake wants to merge 3 commits into
akashdhake wants to merge 3 commits into
Conversation
…ccess messages Remove the beta state and hidden flag so the command appears in help, docs and autocomplete and no longer prints the beta banner. Also replace em dashes in the success.app-id and success.dont-delete messages and use 'Lightning Out 2.0' consistently in the success text.
…gs and App ID guidance Add post-run guidance for the Lightning Out 2.0 scaffold: - CLWR: link the app to an Experience Cloud site on the Linked Communities Site tab in Lightning Out 2.0 App Manager. - Warn that the generated MyDomain and Security settings are org-wide. - Say where to find the App ID and to set it as the app-id attribute. Move the --runtime detail from the flag summary into its description.
… messages - Rename success.org-settings to warning.org-settings and print it before the next-step line, since it warns about the deploy that follows. - Print the CLWR site-link guidance before the App ID line. - Reword the app-id sentence to name the CSP frame-ancestors directive. - Replace string-only tests with behavior tests of run() output (CLWR-only guidance, org-wide warning).
Contributor
Author
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.
Work item: W-24501804
https://gus.lightning.force.com/lightning/r/ADM_Work__c/a07EE00002nLhYnYAK/view
What and why
After
sf template generate lightning-outfinishes, three things are missing or unclear in the output. All wording was checked against Salesforce Core (266-main, and 264 for the Setup labels).--runtimehelp said only "extra site-deployment step". A Metadata API deploy creates no site link, and the Lightning Out 2.0 App Manager UI creates it when you save on the "Linked Communities Site" tab. The CLWR runtime finds an app's components through that link. The command now says so.isFirstPartyCookieUseRequired=falseandenableOauthCorsPolicy=truefor the whole org. Nothing in the output said that. A warning now does.app-idattribute on<lightning-out-application>. For LWR_CORE,app-idis what adds the app's host domains to the allowed frame ancestors (SFDCContentSecurityPolicyFactory).Changes
--runtime: the summary is now one line ("Runtime the app targets: LWR_CORE or CLWR."). The detail moved to a newflags.runtime.description.success.clwr-site: printed for CLWR runs only, right after the deploy command and before the App ID line.warning.org-settings: printed as a warning for all runs, before the deploy command it refers to. Because it is a warning, it also appears in thewarningsarray of--jsonoutput. That is deliberate: the org-wide effect applies to automated runs too.success.app-idis reworded.run()is now exercised with the generator stubbed. They check that the CLWR guidance is shown only for CLWR, that the org-wide warning appears for every runtime, and the runtime summary/description split. I confirmed the LWR_CORE test fails if the CLWR gate is removed.Testing
lightning-outfile.yarn test(wireit): passes.yarn lint: 0 errors. 1 existing warning (sf-plugin/get-connection-with-versionindigital-experience/site.ts), not from this change.--helpoutput checked for the new--runtimetext.For copy review
Copy review requested: please review the wording in
messages/lightningOut.md. Points I'd like a second look at:success.clwr-site.Known gaps, not in this PR
success.frontdoorapplies only to authenticated CLWR. Guest CLWR usesorg-urlandsite-prefix.--host-domainshas no effect on how a CLWR app is framed.