Process
- Open two windows side-by-side with the Firestore console in the samples collection
- In one window, open a sample similar to the one you want to add. You can use the filter button and filter by any field to find the right reference sample.
- In the other window, click the “Add document” button under samples
- Click the “Auto-ID” button to generate an ID for the new sample
- Copy the fields from the reference sample and fill the new values
- Click “Save”
- Confirm the new sample is present and working in the demo system UI
Reference
Sample Fields
Sample fields are type string unless otherwise specified.
These three fields define the type of demo you are creating. You need include only one of these three:
images- Only relevant for image demos. An array of image objects to display in this demo’s lightbox. Image fields:img- Filename references a file indemoslabel- Can be empty
link- Relevant for HTML demos. The filename references should be indemos.video- Relevant only for videos. The filename referenced here should be indemos/video_services.
These are the fields that apply to multiple demo types:
align-leftis fine for a default valuedescription- Can be left blank if not providedheight-numbertype. Copy value from reference sample.id- Not sure this is used anymore. I filled it to be safe. To find the last usedid, filter byidbut do not provide a condition. Sort ascending in the filter box. Browse for the highest ID.image- File name for the image for this tile. The image should be in theimagesdirectory in the demo system (corresponds topublic/imagesin the local copy)image_align- Optional. This determines thebackground-positionthat is applied to the image for this tile.launch_heightandlaunch_width-numbertype. Relevant for course demos and videos.logo- File name for the logo. The logo should be in thelogosdirectory in the demo system (corresponds topublic/logosin the local copy)show_description-booleantype. Determines whether the sample is displayed as a simple tile with the tiled overlaid (false) or as an image on one side with text description on the other (true). This is generallyfalsefor new demos.tagstitle- Overlaid on top of the tile whenshow_descriptionisfalseor placed above the description whenshow_descriptionistruewidth-numbertype. Copy value from reference sample.