Skip to content

Commit 7327b97

Browse files
rachelsaundersagau4779
authored andcommitted
general wordsmithing; add section headings to PREINSTALL (#351)
* wordsmith; add Additional setup section * reformat see it in action into steps * fix formatting of code snippet in see it in action * wordsmith; add sections * wordsmith * wordsmith parameter descriptions * wordsmith; add additional setup section * h3s to h4s; remove space before bullet list reduce potential for merge conflicts * revert back the parameter descriptions * add detailed config info section; remove how you add images
1 parent ddadf93 commit 7327b97

File tree

7 files changed

+53
-24
lines changed

7 files changed

+53
-24
lines changed

firestore-send-email/POSTINSTALL.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,25 @@
11
### See it in action
22

3-
To test out this extension, add a document with a `to` field and a `message` field to the `${param:MAIL_COLLECTION}` collection in the [Firebase console][mail_collection] or using the [Firebase Admin SDK][admin_sdk]:
3+
You can test out this extension right away:
44

5+
1. Go to your [Cloud Firestore dashboard](https://console.firebase.google.com/project/${param:PROJECT_ID}/database/firestore/data).
6+
7+
1. If it doesn't already exist, create the collection you specified during installation: `${param:MAIL_COLLECTION}`.
8+
9+
1. Add a document with a `to` field and a `message` field with the following content:
10+
11+
```
12+
to: ['someone@example.com'],
13+
message: {
14+
subject: 'Hello from Firebase!',
15+
text: 'This is the plaintext section of the email body.',
16+
html: 'This is the <code>HTML</code> section of the email body.',
17+
}
18+
```
19+
20+
1. In a few seconds, you'll see a `delivery` field appear in the document. The field will update as the extension processes the email.
21+
22+
**Note:** You can also use the [Firebase Admin SDK][admin_sdk] to add a document:
523
```
624
admin.firestore().collection('${param:MAIL_COLLECTION}').add({
725
to: ['someone@example.com'],
@@ -13,7 +31,7 @@ admin.firestore().collection('${param:MAIL_COLLECTION}').add({
1331
}).then(() => console.log('Queued email for delivery!'));
1432
```
1533
16-
### Use this extension
34+
### Using this extension
1735
1836
After its installation, this extension monitors all document writes to the `${param:MAIL_COLLECTION}` collection. Email is delivered based on the contents of the document's fields. The top-level fields specify the email's sender and recipients. The `message` field contains the details of the email to deliver, including the email body.
1937
@@ -49,7 +67,6 @@ Available properties for the `message` field are:
4967
If you specified a "Templates collection" parameter during configuration of the extension, you can create and manage [Handlebars][handlebars] templates for your emails. Each document for a template should have a memorable ID that you use as the *template name* in the document that's written to your `${param:MAIL_COLLECTION}` collection.
5068
5169
The template document can include any of the following fields:
52-
5370
* **subject:** A template string for the subject of the email.
5471
* **text:** A template string for the plaintext content of the email.
5572
* **html:** A template string for the HTML content of the email.

firestore-send-email/PREINSTALL.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Use this extension to render and send emails that contain the information from documents added to Cloud Firestore.
1+
Use this extension to render and send emails that contain the information from documents added to a specified Cloud Firestore collection.
22

33
Adding a document triggers this extension to send an email built from the document's fields. The document's top-level fields specify the email sender and recipients, including `to`, `cc`, and `bcc` options (each supporting UIDs). The document's `message` field specifies the other email elements, like subject line and email body (either plaintext or HTML)
44

@@ -16,14 +16,17 @@ admin.firestore().collection('mail').add({
1616

1717
Because each email is built from a Cloud Firestore document, you can reference information stored in _other_ Cloud Firestore documents and fields, like image URLs.
1818

19-
You can also optionally configure this extension to render emails using [Handlebar](https://handlebarsjs.com/) templates. Each template is a document stored in a Cloud Firestore collection.
19+
You can also optionally configure this extension to render emails using [Handlebar](https://handlebarsjs.com/) templates. Each template must be a document stored in a Cloud Firestore collection that you specify when configuring this extension.
2020

21-
When you configure this extension, you'll need to supply your **SMTP credentials for mail delivery** and specify the Cloud Firestore collection where you'll add documents. If you want to use templates, you'll also need to specify the collection containing your template documents.
21+
When you configure this extension, you'll need to supply your **SMTP credentials for mail delivery**.
2222

23-
### Billing
23+
#### Additional setup
2424

25-
This extension uses other Firebase or Google Cloud Platform services which may have associated charges:
25+
Before installing this extension, make sure that you've [set up a Cloud Firestore database](https://firebase.google.com/docs/firestore/quickstart) in your Firebase project.
26+
27+
#### Billing
2628

29+
This extension uses other Firebase or Google Cloud Platform services which may have associated charges:
2730
- Cloud Firestore
2831
- Cloud Functions
2932

firestore-shorten-urls/POSTINSTALL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### See it in action
22

3-
To test out this extension, follow these steps:
3+
You can test out this extension right away:
44

55
1. Go to the [Cloud Firestore tab](https://console.firebase.google.com/project/${param:PROJECT_ID}/database/firestore/data).
66

@@ -14,7 +14,7 @@ To test out this extension, follow these steps:
1414

1515
This extension listens to the Cloud Firestore collection `${param:COLLECTION_PATH}`, then shortens any URL added to the field `${param:URL_FIELD_NAME}` in any document within that collection.
1616

17-
This extension shortens the URL then saves it in the `${param:SHORT_URL_FIELD_NAME}` field of the same document like so:
17+
This extension saves the shortened URL in the `${param:SHORT_URL_FIELD_NAME}` field of the same document like so:
1818

1919
```
2020
{

firestore-shorten-urls/PREINSTALL.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1-
Use this extension to create shortened URLs from URLs written to your Cloud Firestore instance. These shortened URLs are useful as display URLs.
1+
Use this extension to create shortened URLs from URLs written to Cloud Firestore. These shortened URLs are useful as display URLs.
22

3-
This extension listens to your specified Cloud Firestore collection, then shortens any URL added to a specified field in any document within that collection. This extension shortens the URL then saves it in a new field in the same document.
3+
This extension listens to your specified Cloud Firestore collection, then shortens any URL added to a specified field in any document within that collection. This extension saves the shortened URL in a new field in the same document.
44

55
If the original URL in a document is updated, then the shortened URL will be automatically updated, too.
66

77
This extension uses Bitly to shorten URLs, so you'll need to supply your Bitly access token as part of this extension's installation. You can generate this access token using [Bitly](https://bitly.com/a/oauth_apps).
88

9-
### Billing
9+
#### Additional setup
1010

11-
This extension uses other Firebase or Google Cloud Platform services which may have associated charges:
11+
Before installing this extension, make sure that you've [set up a Cloud Firestore database](https://firebase.google.com/docs/firestore/quickstart) in your Firebase project.
12+
13+
You must also have a Bit.ly account and access token before installing this extension.
1214

15+
#### Billing
16+
17+
This extension uses other Firebase or Google Cloud Platform services which may have associated charges:
1318
- Cloud Firestore
1419
- Cloud Functions
1520

firestore-shorten-urls/extension.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ params:
9090
default: urls
9191
example: urls
9292
validationRegex: "^[^/]+(/[^/]+/[^/]+)*$"
93-
validationErrorMessage: Must be a valid Cloud Firestore Collection
93+
validationErrorMessage: Must be a valid Cloud Firestore collection
9494
required: true
9595

9696
- param: URL_FIELD_NAME

firestore-translate-text/PREINSTALL.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
Use this extension to translate strings (for example, text messages) written to a Cloud Firestore collection.
22

3-
Whenever a string is written to a specified field in any document within your specified Cloud Firestore collection, this extension translates the string into your specified target language(s). The source language of the string is automatically detected. This extension adds the translated string to a separate specified field in the same document.
3+
This extension listens to your specified Cloud Firestore collection. If a string is added to a specified field in any document with that collection, this extension translates the string into your specified target language(s). The source language of the string is automatically detected. This extension adds the translation(s) of the string to a separate specified field in the same document.
44

55
You specify the desired target languages using ISO-639-1 codes. You can find a list of valid languages and their corresponding codes in the [Cloud Translate API documentation](https://cloud.google.com/translate/docs/languages).
66

77
If the original non-translated field of the document is updated, then the translations will be automatically updated, as well.
88

9-
### Billing
9+
#### Additional setup
1010

11-
This extension uses other Firebase or Google Cloud Platform services which may have associated charges:
11+
Before installing this extension, make sure that you've [set up a Cloud Firestore database](https://firebase.google.com/docs/firestore/quickstart) in your Firebase project.
12+
13+
#### Billing
1214

15+
This extension uses other Firebase or Google Cloud Platform services which may have associated charges:
1316
- Cloud Translation API
1417
- Cloud Firestore
1518
- Cloud Functions

storage-resize-images/PREINSTALL.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,21 @@ When you upload an image file to your specified Cloud Storage bucket, this exten
44

55
You can even configure the extension to create resized images of different dimensions for each original image upload. For example, you might want images that are 200x200, 400x400, and 680x680 - this extension can create these three resized images then store them in your bucket.
66

7-
To configure this extension, you specify a maximum width and a maximum height (in pixels, px). This extension keeps the aspect ratio of uploaded images constant and shrinks the image until the resized image's dimensions are at or under your specified max width and height. For example, say that you specify a max width of 200px and a max height of 100px. You upload an image that is 480px wide by 640px high, which means a 0.75 aspect ratio. The final resized image will be 75px wide by 100px high to maintain the aspect ratio while also being at or under both of your maximum specified dimensions.
7+
Another optional feature of this extension is to specify a [`Cache-Control` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control) for your resized image files.
88

9-
You can upload images using the [Cloud Storage for Firebase SDK](https://firebase.google.com/docs/storage/) for your platform (iOS, Android, or Web). Alternatively, you can upload images directly in the Firebase console's Storage dashboard.
9+
#### Detailed configuration information
1010

11-
Another optional feature of this extension is to specify a [`Cache-Control` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control) for your resized image files.
11+
To configure this extension, you specify a maximum width and a maximum height (in pixels, px). This extension keeps the aspect ratio of uploaded images constant and shrinks the image until the resized image's dimensions are at or under your specified max width and height.
1212

13-
### Additional setup
13+
For example, say that you specify a max width of 200px and a max height of 100px. You upload an image that is 480px wide by 640px high, which means a 0.75 aspect ratio. The final resized image will be 75px wide by 100px high to maintain the aspect ratio while also being at or under both of your maximum specified dimensions.
14+
15+
#### Additional setup
1416

1517
Before installing this extension, make sure that you've [set up a Cloud Storage bucket](https://firebase.google.com/docs/storage) in your Firebase project.
1618

17-
### Billing
19+
#### Billing
1820

1921
This extension uses other Firebase or Google Cloud Platform services which may have associated charges:
20-
2122
- Cloud Storage
2223
- Cloud Functions
2324

0 commit comments

Comments
 (0)