Skip to content

Commit

Permalink
refactor: change semantics on component name and remove extra space
Browse files Browse the repository at this point in the history
  • Loading branch information
YUUU23 committed Jul 9, 2024
1 parent 3639294 commit aa91bf4
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 19 deletions.
3 changes: 1 addition & 2 deletions docs/assets/center_img.jsx → docs/assets/CenteredImage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import React from "react";
* imgStyle: object, any image styles (props can be passed in as: `imgStyle={{ maxHeight: "600px", border: "solid" }}`)
* @returns a component for uniformally centering images in the doc
*/

export default function CenterImg(props) {
export default function CenteredImage(props) {
let imgStyleString;
if (props.imgStyle != undefined && Object.keys(props.imgStyle).length === 0) {
imgStyleString = {};
Expand Down
18 changes: 12 additions & 6 deletions docs/deployments/firebase.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import firebaseConsoleSettings from "../assets/firebase/firebase-console-setting
import firebaseWebCredentials from "../assets/firebase/firebase-web-credentials.png";
import firestoreCreateStudy from "../assets/firebase/firestore-create-study.png";
import firestoreExampleStudy from "../assets/firebase/firestore-example-study.png";
import CenterImg from "../assets/center_img.jsx";
import CenteredImage from "../assets/CenteredImage.jsx";

Honeycomb comes with methods and configurations to deploy tasks with [Firebase](https://firebase.google.com/). These tools make it possible to reach a wider audience by hosting your task online.

Expand Down Expand Up @@ -68,14 +68,17 @@ _A `command not found` error usually indicates firebase-tools has not been insta
1. Return to your project on the [Firebase console](https://console.firebase.google.com/)
2. Navigate to your project setting

<CenterImg
<CenteredImage
src={firebaseConsoleSettings}
alt="Firebase project settings"
/>

3. Scroll down and copy the auto-generated values from the Firebase console to the corresponding variables in the `.env.firebase` file in the `env` folder of your Honeycomb task repo

<CenterImg src={firebaseWebCredentials} alt="Firebase web credentials" />
<CenteredImage
src={firebaseWebCredentials}
alt="Firebase web credentials"
/>
<br />
<br />

Expand Down Expand Up @@ -149,7 +152,10 @@ Honeycomb ships with a CLI script for managing data in Firebase. A local service
Service accounts are accounts that are not attached to a human user. They authorize access to a Firebase project without someone physically logging in online. We use a service account to give the download script access to the Firestore database automatically.

1. Return to the project settings your project on the [Firebase console](https://console.firebase.google.com/)
<CenterImg src={firebaseConsoleSettings} alt="Firebase project settings" />
<CenteredImage
src={firebaseConsoleSettings}
alt="Firebase project settings"
/>
2. Click on the "Service accounts" tab
3. Near the bottom, click "Generate new Private key" and "Generate Key"

Expand Down Expand Up @@ -247,14 +253,14 @@ Firestore rules define every valid path for data in your project. Attempting to
5. Click "Add Field".
6. Enter `registered_participants` as the field name, and set the type "array"
7. Add the id of each study participant to the array as type "string"
<CenterImg
<CenteredImage
src={firestoreCreateStudy}
alt="Create a study"
imgStyle={{ maxHeight: "600px" }}
/>

The study should look like this when you're finished:

<CenterImg src={firestoreExampleStudy} alt="Example study" />
<CenteredImage src={firestoreExampleStudy} alt="Example study" />

**Additional studies are created as documents inside the `registered_studies` collection**
10 changes: 5 additions & 5 deletions docs/further_reading/version_control.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@ import gitBasics from "../assets/further_reading/git_basics.png";
import gitBranch from "../assets/further_reading/git_branch.png";
import createPR from "../assets/further_reading/create_pull_request.png";
import addReviewers from "../assets/further_reading/add_reviewers.png";
import CenterImg from "../assets/center_img.jsx";
import CenteredImage from "../assets/CenteredImage.jsx";

## Git Overview

Git is a version control system that enables you to track changes to files. With Git, you are able to revert files back to previous versions, restore deleted files, remove added files and even track down where a particular line of code was introduced.

Nearly all operations that are performed by Git are in your local computing environment, with the exception of a few used to synchronize with the GitHub remote host. Some of the most common git operations are depicted below.

<CenterImg src={gitBasics} alt="Git basics" />
<CenteredImage src={gitBasics} alt="Git basics" />

If you would like to make any changes to current repository, it is always good to start with creating a feature branch, where you can save all the changes.

<CenterImg src={gitBranch} alt="Example branches diagram" />
<CenteredImage src={gitBranch} alt="Example branches diagram" />

## Create a Pull Request

Pull requests are useful before you merge your branch with the main branch. You can request a review from your colleagues and check for any conflicts with the main branch. After you pushed all the changes to your branch, you can go to the original GitHub repository and click on the pull request.

<CenterImg src={createPR} alt="Create a pull request" />
<CenterImg src={addReviewers} alt="Add reviewers to a pull request" />
<CenteredImage src={createPR} alt="Create a pull request" />
<CenteredImage src={addReviewers} alt="Add reviewers to a pull request" />

## Best Practices

Expand Down
12 changes: 6 additions & 6 deletions docs/quick_start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import template1 from "./assets/template_1.png";
import workflowPermissions from "./assets/workflow-permissions.png";
import powershellAdmin from "./assets/powershell_admin.png";

import CenterImg from "./assets/center_img.jsx";
import CenteredImage from "./assets/CenteredImage.jsx";

## Creating Your Task Repository

Expand All @@ -24,11 +24,11 @@ The Honeycomb repository is a template and serves as the starting point for all
1. Go to the [Honeycomb repository](https://github.com/brown-ccv/honeycomb)
2. Click on `Use this template` and select `Create a new repository`.

<CenterImg src={template0} alt="Use this template" />
<CenteredImage src={template0} alt="Use this template" />

3. Enter the owner, name, and description of your repository and click on `Create repository from template`.

<CenterImg src={template1} alt="Create the repository" />
<CenteredImage src={template1} alt="Create the repository" />

:::note
We recommend creating a public repository and leaving `Include all branches` unchecked
Expand All @@ -38,7 +38,7 @@ The Honeycomb repository is a template and serves as the starting point for all

_`Settings -> Actions -> General -> Workflow permissions`_

<CenterImg
<CenteredImage
src={workflowPermissions}
alt="GitHub workflow permissions settings"
/>
Expand All @@ -52,7 +52,7 @@ With the repository now setup it can be cloned onto your computer.
1. Navigate to the repository on [GitHub](https://github.com).
2. Click the `Code` button and copy the URL

<CenterImg src={cloneCodeButton} alt="GitHub clone repo button" />
<CenteredImage src={cloneCodeButton} alt="GitHub clone repo button" />

3. Open a terminal and navigate to where you want the cloned directory

Expand Down Expand Up @@ -113,7 +113,7 @@ See [Prerequisites](prerequisites) for more information about these programs.

1. Run Powershell as an admin from the start menu

<CenterImg src={powershellAdmin} alt="Powershell admin launcher" />
<CenteredImage src={powershellAdmin} alt="Powershell admin launcher" />

2. Navigate to the root directory of your cloned repository
3. Paste the following command and follow the prompts to install the listed programs:
Expand Down

0 comments on commit aa91bf4

Please sign in to comment.