Skip to content

fix: CLI command text review #64

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

Merged
merged 18 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 38 additions & 37 deletions messages/lightning.preview.app.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,35 @@
# summary

Preview Lightning Experience Applications.
Preview a Lightning Experience app locally and in real-time, without deploying it.

# description

Preview Lightning Experience Applications in real-time.
Enable Lightning Preview to see local changes to your app in a real-time preview that you don't have to deploy or manually refresh. To let you quickly iterate on your Lightning web components (LWCs) and pages, your app preview automatically refreshes when Lightning Preview detects source code changes.

In dev preview mode, you can edit local files and see these changes to your Lightning Web Components (LWC) within your {org name} org:
When you edit local files with Lightning Preview enabled, your LWCs reflect the following changes in your org. To apply any other local changes not listed here, you have to deploy them to your org using the `project deploy start` command.

- Basic HTML and CSS edits
- Importing new CSS-only LWC
- Importing new CSS-only LWCs
- JS edits in-service component library
- JS method changes in the LWC component that don't alter its public API.
- JS method changes that don't affect the LWC's public API

Other local changes require deployment to your org. However, changes made directly in your org (like modifying component properties and saving) are immediately live and won't show in your local files until you retrieve them from the org.

This feature enables developers to quickly iterate on their components and pages, seeing the impact of changes in real-time without needing to deploy or refresh manually. Live reload is enabled by default to automatically refresh the preview when source code changes are detected.

Use the appropriate topic to preview specific aspects of the development environment.
When you make changes directly in your org, (like saving new component properties,) they're automatically deployed to your live app. To update your local version of the app with those changes, you have to retrieve them from your org using the `project retrieve start` command.

# flags.name.summary

Name of the Lightning Experience application to preview.
Name of the Lightning Experience app to preview.

# flags.target-org.summary

Username or alias of the target org. Not required if the `target-org` configuration variable is already set.

# flags.device-type.summary

Type of device to emulate in preview.
Type of device to display the app preview.

# flags.device-id.summary

For mobile virtual devices, specify the device ID to preview. If omitted, the first available virtual device will be used.
ID of the mobile device to display the preview if device type is set to `ios` or `android`. The default value is the ID of the first available mobile device.

# error.no-project

Expand Down Expand Up @@ -85,70 +81,75 @@ Before proceeding, install the self-signed certificate on your device. The certi

`%s`

Follow the steps below to install the certificate:
To install the certificate, follow these steps:

%s

# certificate.installation.steps.ios

1. Drag and drop the file on to your booted simulator.
2. Tap `Allow` to proceed with downloading the configuration file.
3. Tap `Close` and navigate to `Settings > General > VPN & Device Management > localhost`.
4. Tap `Install` in the title bar, in the warning window, and on the install button.
5. In the `Profile Installed` view, confirm that the profile shows as `Verified` and Tap `Done`.
6. Now navigate to `Settings > General > About > Certificate Trust Settings`.
7. Toggle full trust for `localhost` to enable full trust.
8. In the warning dialog, tap `Continue`.
1. Drag and drop the file onto your booted simulator.
2. Click `Allow` to proceed with downloading the configuration file.
3. Click `Close` and navigate to `Settings > General > VPN & Device Management > localhost`.
4. Click `Install` in the title bar, in the warning window, and on the install button.
5. In the `Profile Installed` view, confirm that the profile displays `Verified` and then click `Done`.
6. Navigate to `Settings > General > About > Certificate Trust Settings`.
7. Enable full trust for `localhost`.
8. In the resulting warning pop-up, click `Continue`.

# certificate.installation.steps.android

1. Drag and drop the file on to your booted emulator.
1. Drag and drop the file onto your booted emulator.
2. %s
3. Browse to the certificate file that you transferred from step 1 (usually under `/sdcard/download`).
3. Navigate to the certificate file from step 1. (It's usually located in `/sdcard/download`).
4. Follow the on-screen instructions to install it.
5. Tap on `User credentials` under `Credential storage` and verify that your certificate is listed there.
6. Tap on `Trusted credentials` under `Credential storage`. Then tap on `USER` and verify that your certificate is listed there.
5. Click `User credentials` under `Credential storage` and verify that your certificate is listed there.
6. Click `Trusted credentials` under `Credential storage`. Then click `USER` and verify that page lists your certificate.

# certificate.installation.steps.android.nav-target-api-24-25

Navigate to `Settings > Security` and tap on `Install from SD card` under `Credential storage`.
Navigate to `Settings > Security` and click `Install from SD card` under `Credential storage`.

# certificate.installation.steps.android.nav-target-api-26-27

Navigate to `Settings > Security & Location > Encryption & credentials` and tap on `Install from SD card` under `Credential storage`.
Navigate to `Settings > Security & Location > Encryption & credentials` and click `Install from SD card` under `Credential storage`.

# certificate.installation.steps.android.nav-target-api-28

Navigate to `Settings > Security & Location > Advanced > Encryption & credentials` and tap on `Install from SD card` under `Credential storage`.
Navigate to `Settings > Security & Location > Advanced > Encryption & credentials` and click `Install from SD card` under `Credential storage`.

# certificate.installation.steps.android.nav-target-api-29

Navigate to `Settings > Security > Encryption & credentials` and tap on `Install from SD card` under `Credential storage`.
Navigate to `Settings > Security > Encryption & credentials` and click `Install from SD card` under `Credential storage`.

# certificate.installation.steps.android.nav-target-api-30-32

Navigate to `Settings > Security > Encryption & credentials` and tap on `Install a certificate` under `Credential storage`. Now tap on `CA certificate` and on `Install anyway`.
Navigate to `Settings > Security > Encryption & credentials` and click `Install a certificate` under `Credential storage`. Click `CA certificate`, and then click `Install anyway`.

# certificate.installation.steps.android.nav-target-api-33

Navigate to `Settings > Security > More security settings > Encryption & credentials` and tap on `Install a certificate` under `Credential storage`. Now tap on `CA certificate` and on `Install anyway`.
Navigate to `Settings > Security > More security settings > Encryption & credentials` and click `Install a certificate` under `Credential storage`. Click `CA certificate`, and then click `Install anyway`.

# certificate.installation.steps.android.nav-target-api-34-up

Navigate to `Settings > Security & Privacy > More security & privacy > Encryption & credentials` and tap on `Install a certificate` under `Credential storage`. Now tap on `CA certificate` and on `Install anyway`.
Navigate to `Settings > Security & Privacy > More security & privacy > Encryption & credentials` and click `Install a certificate` under `Credential storage`. Click `CA certificate`, and then click `Install anyway`.

# certificate.waiting

After installing the certificate, press any key to continue...
After you install the certificate, press any key to continue...

# mobileapp.notfound

%s is not installed on your device.
%s isn't installed on your device.

# mobileapp.download

%s is not installed on your device. Do you want to download and install it
%s isn't installed on your device. Do you want to download and install it?

# examples

- <%= config.bin %> <%= command.id %>
- Preview the target org "myOrg" in a desktop environment:
<%= config.bin %> <%= command.id %> --target-org myOrg
- Preview the app "myApp" for the target org "myOrg" in a desktop environment:
<%= config.bin %> <%= command.id %> --name MyApp --target-org myOrg --device-type desktop
- Preview the target org "myOrg" on an iOS device:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto above comment -- try to rewrite so you're explaining the app that's being previewed.

<%= config.bin %> <%= command.id %> --target-org myOrg --device-type ios --device-id "iPhone 15 Pro Max"
37 changes: 17 additions & 20 deletions messages/lightning.preview.site.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,35 @@
# summary

Preview Experience Cloud Sites.
Preview an Experience Cloud site locally and in real-time, without deploying it.

# description

In dev preview mode, you can edit local files and see these changes to your Lightning Web Components (LWC) within your site:
Enable Lightning Preview to see local changes to your site in a real-time preview that you don't have to deploy or manually refresh. To let you quickly iterate on your Lightning web components (LWCs) and pages, your site preview automatically refreshes when Lightning Preview detects source code changes.

When you edit local files with Lightning Preview enabled, your LWCs reflect the following changes in your org. To apply any other local changes not listed here, you have to deploy them to your org using the `project deploy start` command.

- Basic HTML and CSS edits
- Importing new CSS
- Javascript edits in-service component library
- Javascript method changes in the LWC component that don't alter its public API.
- Importing new CSS-only LWCs
- JS edits in-service component library
- JS method changes that don't affect the LWC's public API

Other local changes may require deployment to your org. However, changes made directly in your org (like modifying component properties) are immediately live and won't show in your local files until you retrieve them from the org.
When you make changes directly in your org, (like saving new component properties,) they're automatically deployed to your live site. To update your local version of the site with those changes, you have to retrieve them from your org using the `project retrieve start` command.

# flags.name.summary

Specify the site name for preview.

# flags.name.description

The site name needs to match the name of a site on the current org. Example: "B2C CodeCept"
Name of the Experience Cloud site to preview. It has to match a site name from the current org.

# examples
# flags.target-org.summary

- <%= config.bin %> <%= command.id %> --name MySite
Username or alias of the target org. Not required if the `target-org` configuration variable is already set.

# flags.debug.summary

Debug SSR.
Enable Node Inspector to debug server-side rendering.

# flags.debug.description

Debug Description.

# flags.target-org.summary
# examples

undefined
- Preview the site "Partner Central" from the org "myOrg":
<%= config.bin %> <%= command.id %> --name "Partner Central" --target-org myOrg
- Preview the site "Partner Central" from the org "myOrg" with Node Inspector enabled:
<%= config.bin %> <%= command.id %> --name "Partner Central" --target-org myOrg --debug
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"external": true,
"subtopics": {
"preview": {
"description": "Preview components, applications, and sites locally without deploy."
"description": "Preview applications and sites locally and in real-time, without deploying them."
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/commands/lightning/preview/site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@ export default class LightningPreviewSite extends SfCommand<LightningPreviewSite
public static readonly flags = {
name: Flags.string({
summary: messages.getMessage('flags.name.summary'),
description: messages.getMessage('flags.name.description'),
char: 'n',
required: false,
}),
debug: Flags.boolean({
summary: messages.getMessage('flags.debug.summary'),
}),
'target-org': Flags.optionalOrg(),
'target-org': Flags.optionalOrg({ summary: messages.getMessage('flags.target-org.summary') }),
};

public async run(): Promise<LightningPreviewSiteResult> {
Expand Down