-
Notifications
You must be signed in to change notification settings - Fork 393
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
feat: in container mode, disable LWC preview with error #4983
Conversation
show error if container mode - WIP BREAKING CHANGE: WIP
04ce2ba
to
2e9aad1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ryannmcq Looks Good! Have posted a clarifying question and waiting for doc review on error message.
packages/salesforcedx-vscode-lwc/src/commands/forceLightningLwcPreview.ts
Show resolved
Hide resolved
packages/salesforcedx-vscode-lwc/test/jest/commands/forceLightningLwcPreview.test.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QA Notes:
✅ SFDX: Preview Components Locally runs successfully on desktop
✅ Compiling and launching extensions
Have not tested with SFDX_CONTAINER_MODE set to true. Considering the video in Functionality After for the same.
What does this PR do?
Disables the LWC preview command when the extension is running in a container (e.g. Code Builder) by displaying an error toast that explains why the command is unavailable.
Note: there's a directive from product not to hide the command entirely in this situation because it results in support calls from customers that a command is missing.
What issues does this PR fix or reference?
@W-13579717@
Functionality Before
In a container, LWC preview command results in an error with instructions that won't work in a container:
Screen.Recording.2023-07-17.at.4.16.22.PM.mov
Functionality After
In a container, LWC preview command results in an error message explaining the command is unavailable in a container:
Screen.Recording.2023-07-17.at.4.25.34.PM.mov