From 6a3c69ce0379f3563c08332a8f472d6e4811c240 Mon Sep 17 00:00:00 2001 From: samshara Date: Fri, 26 Jul 2024 17:20:54 +0545 Subject: [PATCH 1/5] feat: add collaboration guide --- COLLABORATING.md | 18 ++++++++- README.md | 2 +- collaborating/developing.md | 34 ++++++++++++++++ collaborating/issues-and-pull-requests.md | 47 +++++++++++++++++++++++ collaborating/linting.md | 42 ++++++++++++++++++++ collaborating/repository-structure.md | 41 ++++++++++++++++++++ collaborating/technology.md | 34 ++++++++++++++++ 7 files changed, 215 insertions(+), 3 deletions(-) create mode 100644 collaborating/developing.md create mode 100644 collaborating/issues-and-pull-requests.md create mode 100644 collaborating/linting.md create mode 100644 collaborating/repository-structure.md create mode 100644 collaborating/technology.md diff --git a/COLLABORATING.md b/COLLABORATING.md index 3f7b2a4170..c2ac65e3c8 100644 --- a/COLLABORATING.md +++ b/COLLABORATING.md @@ -1,3 +1,17 @@ -### TODO +# IFRC GO Collaborator Guide -- [ ] Add collaboration guide +This document offers guidelines for collaborators on codebase maintenance, testing, building and deployment, and issue management. + +## Repository +- [Issues and Pull Requests](./collaborating/issues-and-pull-requests.md) +- [Structure](./collaborating/repository-structure.md) +- [Linting](./collaborating/linting.md) +- [Technology Used](./collaborating/technology.md) + +## Development +- [Developing](./collaborating/developing.md) +- [Translation]() +- [Building]() +- [Testing]() +- [Storybook]() +- [Release]() diff --git a/README.md b/README.md index 146208b37a..dd21d4a8ba 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ ## Getting started -Below are the steps to guide you through preparing your local environment for the IFRC GO Web application development. The repository is set up as a [monorepo](https://monorepo.tools/). The app directory houses the application code, while the packages directory contains related packages, including the [IFRC GO UI](https://www.npmjs.com/package/@ifrc-go/ui) components library. Please review the [Contribution Guidelines](./CONTRIBUTING.md) and [Collaboration Guidelines](./COLLABORATING.md) to gain a deeper understanding of the repository's structure. +Below are the steps to guide you through preparing your local environment for the IFRC GO Web application development. The repository is set up as a [monorepo](https://monorepo.tools/). The app directory houses the application code, while the packages directory contains related packages, including the [IFRC GO UI](https://www.npmjs.com/package/@ifrc-go/ui) components library. Please review the [Contribution Guidelines](./CONTRIBUTING.md) and [Collaboration Guidelines](./COLLABORATING.md) to gain a deeper understanding of the repository's structure and ensure a smooth experience while contributing to the project. ### Prerequisites diff --git a/collaborating/developing.md b/collaborating/developing.md new file mode 100644 index 0000000000..305cb1de64 --- /dev/null +++ b/collaborating/developing.md @@ -0,0 +1,34 @@ +## Development + +The stable branch for IFRC Go application is `develop`. All the PR's that needs to be merged for deployment should target the `develop` branch. + +For long running features, the specific `project/project-x` should be targeted when creating a PR for a particular feature related to the project. + +### Prerequisites + +To begin, ensure you have network access. Then, you'll need the following +1. [Git](https://git-scm.com/) +2. [Node.JS](https://nodejs.org/en/) version >=18 / 20+ +3. [Yarn 1](https://classic.yarnpkg.com/en/) +4. Alternatively, you can use [Docker](https://www.docker.com/) to build the application. + +### Local development + +1. Clone the repository using HTTPS, SSH, or Github CLI +```bash +git clone https://github.com/IFRCGo/go-web-app.git #HTTPS +git clone git@github.com:IFRCGo/go-web-app.git #SSH +gh repo clone IFRCGo/go-web-app #Github CLI +``` +2. Install the dependencies +```bash +yarn install +``` +3. Copy `app/.env.example` to `app/.env` and update the variables +```bash +cp app/.env.example app/.env +``` +4. Start the development server +```bash +yarn start:app +``` diff --git a/collaborating/issues-and-pull-requests.md b/collaborating/issues-and-pull-requests.md new file mode 100644 index 0000000000..c1e0a3763f --- /dev/null +++ b/collaborating/issues-and-pull-requests.md @@ -0,0 +1,47 @@ +## Issues +Use the repository's [Issues](https://github.com/IFRCGo/go-web-app/issues) tab to report bugs, suggest features, and track tasks. Provide clear and detailed descriptions, including steps to reproduce bugs if applicable. + +## Pull Requests +Before you submit your Pull Request (PR) consider the following guidelines. + +Please make your changes in a new Git branch following our branch naming conventions. We should use prefixes in branch names: +- **Project branches**: Prefixed with `project/`, these branches are for long-running features. +- **Feature branches**: Prefixed with `feature/`, these branches are used to develop new features. +- **Bugfix branches**: Prefixed with `fix/`, these branches are used to make fixes. +- **Release branches**: Prefixed with `release/`, these branches prepare the codebase for new releases. +- **Hotfix branches**: Prefixed with `hotfix/`, these branches address urgent issues in production. + +> [!IMPORTANT]\ +> The name of the branch should be descriptive, concise and consistent. We should use lowercase letters and dashes instead of spaces in branch names to ensure compatibility across different operating systems and Git hosting platforms. + +```bash +git checkout -b feature/new-feature-a develop +``` + +Add your changes, ensuring they follow code style guidelines. Run linting, perform type checking, and ensure the build passes. + +Run `yarn changeset` in the root of the repository and describe your changes. The resulting files should be committed as they will be used during release. + +Commit your changes with a clear and descriptive message that adheres to our commit message conventions. + +Push your branch to GitHub following our branch naming conventions. +```bash +git push origin feature/new-feature-a +``` + +On GitHub, open a pull request targeting the `develop` branch or, for changes related to a long-running project, the specific `project/project-a` branch. + +If we suggest changes, then make the required updates. + +Rebase your branch and force push with `force-with-lease`. + +If the target branch is `develop` +```bash +git rebase develop +git push --force-with-lease +``` +If the target branch is a `project` branch +```bash +git rebase project/project-a +git push --force-with-lease +``` diff --git a/collaborating/linting.md b/collaborating/linting.md new file mode 100644 index 0000000000..aa611b5129 --- /dev/null +++ b/collaborating/linting.md @@ -0,0 +1,42 @@ +## Linting + +The app repository runs [ESLint](https://eslint.org/), [Stylelint](https://stylelint.io/) to lint and format the code. + +## ESLint +The configuration is defined in [eslint.config.js](../app/eslint.config.js) file. +To lint the code, you can use the following command: +```bash +yarn lint:js +``` +If you encounter errors, you can automatically fix those that are fixable by running: +```bash +yarn lint:js --fix +``` + +## Stylelint +The configuration is defined in [stylelint.config.cjs](../app/stylelint.config.cjs) file. +To lint CSS files, use the following command: +```bash +yarn lint:css +``` +If any errors are found, you can automatically fix those that are fixable by running: +```bash +yarn lint:css --fix +``` + +To fix auto fixable `ESLint` and `Stylelint` errors, run the following command: +```bash +yarn lint:fix +``` + +## Type Checking +To verify and enforce TypeScript type constraints in your code, use the following command: +```bash +yarn typecheck +``` + +## Lint Translation files +To check for translation file errors: +```bash +yarn lint:translation +``` diff --git a/collaborating/repository-structure.md b/collaborating/repository-structure.md new file mode 100644 index 0000000000..b45d556189 --- /dev/null +++ b/collaborating/repository-structure.md @@ -0,0 +1,41 @@ +## Repository Structure +The repository is set up as a [monorepo](https://monorepo.tools/). + +The monorepo is organized as follows: + +[app/](../app/) contains the web application code for the IFRC Go project. + +[packages/ui/](../packages/ui/) contains the IFRC Go UI library. This component library powers the IFRC Go project's user interface. + +[packages/go-ui-storybook/](../packages/go-ui-storybook/) contains the Storybook configuration and stories for the IFRC Go UI library. + +### `app` Directory +The `app` directory contains the main codebase for the web application of the IFRC Go project. It is structured as below: + +- **`app/generated/`** contains the API endpoint type definitions generated by `openapi-typescript`. +- **`app/scripts/`** contains scripts executed as part of the project. + - **`app/scripts/translate/`** contains scripts for synchronizing translations between the application code and the server. + +- **`app/src/`** houses the core web application code. + - **`app/src/App/`** contains the base application logic for IFRC Go, including authentication handling, routing, and React context setup. + - **`app/src/assets/`** contains static assets used throughout the project. + - **`app/src/components/`** contains components designed specifically for the IFRC Go project. + - **`app/src/contexts/`** contains React context providers used within the application. + - **`app/src/hooks/`** contains custom React hooks used across the project. + - **`app/src/utils/`** contains utility functions and helpers used in the project. + - **`app/src/views/`** contains different web views and their associated components. + - Each view may include + - **`index.tsx`** The main application code for the view. + - **`styles.css`** Styles specific to the view or component. + - **`i18n.json`** Defines the strings used in the view or component for internationalization. + + +### `packages/ui` Directory +The `packages/ui` directory contains the IFRC Go UI components library. The library is built using Vite, React, PostCSS. It is structured as below: + +- **`src/components/`** contains all the UI components. +- **`src/contexts/`** contains React context providers for the components in the UI library. +- **`src/hooks/`** contains custom React hooks. +- **`src/utils/`** contains utility functions. +- **`index.css`** contains global CSS styles. +- **`index.tsx`** contains the main entry point for the UI library. diff --git a/collaborating/technology.md b/collaborating/technology.md new file mode 100644 index 0000000000..76b6a5e4a4 --- /dev/null +++ b/collaborating/technology.md @@ -0,0 +1,34 @@ +## Technologies Used to Build the IFRC Go Website + +The IFRC Go web application is built using [React](https://react.dev/) and [Vite](https://vitejs.dev/), with [TypeScript](https://www.typescriptlang.org/) as the primary programming language. + +### Libraries and Tools + +- **Styling** + - [PostCSS](https://postcss.org/) with CSS Modules + +- **Maps** + - [@mapbox-gl](https://www.npmjs.com/package/mapbox-gl) for rendering maps + - [@togglecorp/re-map](https://www.npmjs.com/package/@togglecorp/re-map), a thin wrapper around MapboxGL, for easier integration with React + +- **Icons and UI** + - [@ifrc-go/icons](https://www.npmjs.com/package/@ifrc-go/icons), the IFRC Go icons library + - [@ifrc-go/ui](https://www.npmjs.com/package/@ifrc-go/ui), the UI library powering the IFRC Go platform + +- **Routing** + - [React Router](https://www.npmjs.com/package/react-router-dom) for client-side routing + +- **Excel Exports** + - [exceljs](https://www.npmjs.com/package/exceljs) for generating and importing Excel files + +- **Data Fetching** + - [@togglecorp/toggle-request](https://www.npmjs.com/package/@togglecorp/toggle-request), a hooks-based request library + +- **Form Handling** + - [@togglecorp/toggle-form](https://www.npmjs.com/package/@togglecorp/toggle-form), a hooks-based form library for managing complex forms with validation and type support + +- **Testing and Monitoring** + - [Storybook](https://storybook.js.org/) for manual testing and visual regression tests of React components + - [Sentry](https://sentry.io/welcome/) for reporting exceptions and monitoring application performance and reliability + - [Playwright](https://playwright.dev/) for end-to-end testing + - [Vitest](https://vitest.dev/) for unit testing From 43b14a73d3f16926e06a387d1da871d011be7b25 Mon Sep 17 00:00:00 2001 From: samshara Date: Fri, 2 Aug 2024 17:04:57 +0545 Subject: [PATCH 2/5] chore: add collaboration guide for building, developing, testing, and deploying --- COLLABORATING.md | 9 +-- CONTRIBUTING.md | 56 +++++++------- collaborating/building.md | 20 +++++ collaborating/developing.md | 83 +++++++++++++++++---- collaborating/linting.md | 40 ++++++---- collaborating/release.md | 94 ++++++++++++++++++++++++ collaborating/repository-structure.md | 8 +- collaborating/testing.md | 36 +++++++++ collaborating/translation.md | 5 ++ package.json | 2 +- packages/go-ui-storybook/CONTRIBUTING.md | 1 + packages/go-ui-storybook/README.md | 1 + 12 files changed, 288 insertions(+), 67 deletions(-) create mode 100644 collaborating/building.md create mode 100644 collaborating/release.md create mode 100644 collaborating/testing.md create mode 100644 collaborating/translation.md create mode 100644 packages/go-ui-storybook/CONTRIBUTING.md create mode 100644 packages/go-ui-storybook/README.md diff --git a/COLLABORATING.md b/COLLABORATING.md index c2ac65e3c8..a325debfa1 100644 --- a/COLLABORATING.md +++ b/COLLABORATING.md @@ -10,8 +10,7 @@ This document offers guidelines for collaborators on codebase maintenance, testi ## Development - [Developing](./collaborating/developing.md) -- [Translation]() -- [Building]() -- [Testing]() -- [Storybook]() -- [Release]() +- [Translation](./collaborating/translation.md) +- [Building](./collaborating/building.md) +- [Testing](./collaborating/testing.md) +- [Release](./collaborating/release.md) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e22645ec23..0ca8d71417 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -111,37 +111,37 @@ To begin, ensure you have network access. Then, you'll need the following ### Local development 1. Clone the repository using HTTPS, SSH, or Github CLI -```bash -git clone https://github.com/IFRCGo/go-web-app.git #HTTPS -git clone git@github.com:IFRCGo/go-web-app.git #SSH -gh repo clone IFRCGo/go-web-app #Github CLI -``` + ```bash + git clone https://github.com/IFRCGo/go-web-app.git #HTTPS + git clone git@github.com:IFRCGo/go-web-app.git #SSH + gh repo clone IFRCGo/go-web-app #Github CLI + ``` 2. Install the dependencies -```bash -yarn install -``` + ```bash + yarn install + ``` 3. Copy `app/.env.example` to `app/.env` and update the variables -```bash -cp app/.env.example app/.env -``` + ```bash + cp app/.env.example app/.env + ``` 4. Start the development server -```bash -yarn start:app -``` + ```bash + yarn start:app + ``` > [!NOTE]\ > To work on a specific development task, ensure you have the backend setup appropriately and configured properly. 5. Create a new branch for your work. -```bash -git checkout -b name-of-your-branch -``` + ```bash + git checkout -b name-of-your-branch + ``` > [!IMPORTANT]\ > Ensure there are no lint errors before pushing the changes. Ensure the commit message is clear and concise, summarizing the changes made in the commit. Avoid vague and generic messages. Instead, provide specific details that describe the purpose or impact of the changes. 6. Once you're happy with your changes, add and commit them to your branch, then push the branch to origin. -```bash -git add . -git commit -m "some message" -git push -u origin name-of-your-branch -``` + ```bash + git add . + git commit -m "some message" + git push -u origin name-of-your-branch + ``` > [!NOTE]\ > Before committing and opening a Pull Request, please ensure there are no lint errors. Also please create a pull request only when the feature is ready to be merged. @@ -150,13 +150,13 @@ git push -u origin name-of-your-branch ### Build for Production 1. To build the application for production -```bash -yarn build -``` + ```bash + yarn build + ``` 2. To locally preview the production build -```bash -yarn preview -``` + ```bash + yarn preview + ``` ### CLI Commands diff --git a/collaborating/building.md b/collaborating/building.md new file mode 100644 index 0000000000..aa72f0dc87 --- /dev/null +++ b/collaborating/building.md @@ -0,0 +1,20 @@ +### Building + +> [!NOTE]\ +> Ensure all the packages have been installed before building the project. +To build different components of the IFRC Go project, use the following commands. + +**IFRC Go Web Application** + ```bash + yarn build + ``` + +**IFRC Go UI Library** + ```bash + yarn build:ui + ``` + +**UI Library Storybook** + ```bash + yarn build:storybook + ``` diff --git a/collaborating/developing.md b/collaborating/developing.md index 305cb1de64..3f4b16ddea 100644 --- a/collaborating/developing.md +++ b/collaborating/developing.md @@ -1,8 +1,8 @@ ## Development -The stable branch for IFRC Go application is `develop`. All the PR's that needs to be merged for deployment should target the `develop` branch. +The stable branch for the IFRC Go application is `develop`. All PRs intended for deployment should be merged into the `develop` branch. -For long running features, the specific `project/project-x` should be targeted when creating a PR for a particular feature related to the project. +For long-running features, create PRs targeting the specific `project/project-x` branch when working on features related to that project. ### Prerequisites @@ -15,20 +15,75 @@ To begin, ensure you have network access. Then, you'll need the following ### Local development 1. Clone the repository using HTTPS, SSH, or Github CLI -```bash -git clone https://github.com/IFRCGo/go-web-app.git #HTTPS -git clone git@github.com:IFRCGo/go-web-app.git #SSH -gh repo clone IFRCGo/go-web-app #Github CLI -``` + ```bash + git clone https://github.com/IFRCGo/go-web-app.git #HTTPS + git clone git@github.com:IFRCGo/go-web-app.git #SSH + gh repo clone IFRCGo/go-web-app #Github CLI + ``` 2. Install the dependencies -```bash -yarn install -``` + ```bash + yarn install + ``` 3. Copy `app/.env.example` to `app/.env` and update the variables -```bash -cp app/.env.example app/.env -``` + ```bash + cp app/.env.example app/.env + ``` 4. Start the development server + ```bash + yarn start:app + ``` + +``` +> [!NOTE]\ +> To work on a specific development task, ensure you have the backend setup appropriately and configured properly. +5. Create a new branch for your work. + ```bash + git checkout -b name-of-your-branch + ``` +> [!IMPORTANT]\ +> Ensure there are no lint errors before pushing the changes. Ensure the commit message is clear and concise, summarizing the changes made in the commit. Avoid vague and generic messages. Instead, provide specific details that describe the purpose or impact of the changes. +6. Once you're happy with your changes, add and commit them to your branch, then push the branch to origin. ```bash -yarn start:app +git add . +git commit -m "some message" +git push -u origin name-of-your-branch ``` +> [!NOTE]\ +> Before committing and opening a Pull Request, please ensure there are no lint errors. Also please create a pull request only when the feature is ready to be merged. + +Please read the [Issues and Pull Requests](./issues-and-pull-requests.md) guide for further information. + +### CLI Commands + +This repository contains several scripts and commands for performing tasks. The most relevant ones are described below. + +
+ Commands for Running & Building the Web Application + +- `yarn start:app` runs the Local Development Server, listening by default on `http://localhost:3000/`. +- `yarn build` builds the Application in Production mode. The output is by default within the `build` folder. + - This is used for Deployments (Preview & Production). +- `yarn preview` previews the production build of the Application. +- `yarn generate:type` generates the Typescript types for the API using `openapi-typescript`. The output is by default within the `generated` folder within the `app` workspace. +- `yarn storybook` starts Storybook's local server for the `@ifrc-go/ui` components library, listening by default on `http://localhost:6006/`. +- `yarn build:storybook` builds Storybook as a static web application for publishing. +- `yarn build:ui` builds the `@ifrc-go/ui` components library. To reflect any new changes in the components library we must ensure that it is built beforehand. +
+ +
+ Commands for Maintenance Tasks +Execute the following commands within the `app` workspace. + +- `yarn lint` runs the linter for all the css, js, ts, and translation files. + - `yarn lint:fix` attempts to fix any linting errors for css, js and ts files. +- `yarn translatte:generate` generates translation migration file. +- `yarn surge:deploy` builds and deploys the web application to [surge](https://surge.sh/). +
+ + +### UI components library +Please read the [README](../packages/ui/README.md) and [CONTRIBUTING](../packages/ui/CONTRIBUTING.md) guide for IFRC Go UI. + +### Storybook +Please read the [README](../packages/go-ui-storybook/README.md) and [CONTRIBUTING](../packages/go-ui-storybook/CONTRIBUTING.md) guide. + diff --git a/collaborating/linting.md b/collaborating/linting.md index aa611b5129..980bc54666 100644 --- a/collaborating/linting.md +++ b/collaborating/linting.md @@ -1,42 +1,52 @@ -## Linting +## Linting and Type Checking -The app repository runs [ESLint](https://eslint.org/), [Stylelint](https://stylelint.io/) to lint and format the code. +IFRC Go Web App repository utilizes [ESLint](https://eslint.org/) and [Stylelint](https://stylelint.io/) for linting and formatting the code, as well as TypeScript for type checking. -## ESLint -The configuration is defined in [eslint.config.js](../app/eslint.config.js) file. -To lint the code, you can use the following command: +### ESLint + +Configuration for ESLint can be found in the [eslint.config.js](../app/eslint.config.js) file. + +To lint your code ```bash yarn lint:js ``` -If you encounter errors, you can automatically fix those that are fixable by running: + +To automatically fix fixable errors ```bash yarn lint:js --fix ``` -## Stylelint -The configuration is defined in [stylelint.config.cjs](../app/stylelint.config.cjs) file. -To lint CSS files, use the following command: +### Stylelint + +Configuration for Stylelint is located in the [stylelint.config.cjs](../app/stylelint.config.cjs) file. + +To lint your CSS files ```bash yarn lint:css ``` -If any errors are found, you can automatically fix those that are fixable by running: + +To automatically fix fixable errors ```bash yarn lint:css --fix ``` -To fix auto fixable `ESLint` and `Stylelint` errors, run the following command: +### Fixing Lint Errors + +To fix auto-fixable errors in both ESLint and Stylelint ```bash yarn lint:fix ``` -## Type Checking -To verify and enforce TypeScript type constraints in your code, use the following command: +### Type Checking + +To verify and enforce TypeScript type constraints in your code ```bash yarn typecheck ``` -## Lint Translation files -To check for translation file errors: +### Linting Translation Files + +To check for errors in translation files ```bash yarn lint:translation ``` diff --git a/collaborating/release.md b/collaborating/release.md new file mode 100644 index 0000000000..45d60c906d --- /dev/null +++ b/collaborating/release.md @@ -0,0 +1,94 @@ +## IFRC Go Release Workflow + +The IFRC Go web application deployment occurs across nightly, staging, and production instances via [Azure Pipelines](https://azure.microsoft.com/en-us/products/devops/pipelines). The environment variables must be properly configured for the deployment workflow to run smoothly. + +We use [changesets](https://github.com/changesets/changesets) to manage versioning and generate changelogs for each release. The version must be updated with each release, and the deployment is carried out through the `develop` branch. + +### Before Release + +1. Ensure all changes have been merged into the `develop` branch. +2. Checkout the latest `develop` branch + ```bash + git checkout develop + git pull --rebase + ``` +3. Verify that changesets have been created. +4. Update the version by running + ```bash + yarn changeset version + ``` + This command consumes all changesets and updates the version according to semantic versioning. It also writes changelog entries for each consumed changeset. Review the changelog entries and version changes for packages. Make any necessary adjustments to the changelogs. + +5. Commit the changes with the new version number as the commit message + ```bash + git commit -m "v{go-web-app-version-number}" + ``` +6. Push the commit to the origin + ```bash + git push origin develop + ``` +> [!IMPORTANT]\ +> Make sure you have the necessary permissions to push to the develop branch. If you don't have the credentials, push to a different branch and send a PR targeting the develop branch. +7. Generate a git tag for the current version of all packages + ```bash + yarn changeset tag + ``` +8. Push the generated tags to the origin + ```bash + git push --follow-tags + ``` + +### Nightly/Staging/Production Release using Azure Pipelines +TODO Add azure pipelines deployment documentation + +## IFRC Go UI Release Workflow + +To release the IFRC Go UI to [NPM](https://www.npmjs.com/) using [changesets](https://github.com/changesets/changesets), follow these steps. Ensure you have the necessary credentials and publishing rights to the [ifrc-go/ui](https://www.npmjs.com/org/ifrc-go) package. + +### NPM Release Steps + +1. Ensure Changes Are Merged + - Make sure all changes have been merged into the `develop` branch. + +2. Checkout `develop` Branch + ```bash + git checkout develop + ``` + +3. Verify Changesets + - Confirm that changesets have been created. + +4. Update the Version + ```bash + yarn changeset version + ``` +5. Commit Version Update + ```bash + git commit -m "v{go-web-app-version-number}" + ``` +6. Push Commit to Origin + ```bash + git push origin develop + ``` +> [!NOTE]\ +> Ensure you have the necessary permissions to push to the `develop` branch. If not, push to a different branch and create a PR targeting the `develop` branch. +7. Login to NPM + ```bash + npm login + ``` +> [!NOTE]\ +>Ensure you have the appropriate rights to publish the package. +8. Publish the Package + ```bash + yarn changeset publish + ``` +9. Push Tags to origin + ```bash + git push --follow-tags + ``` + +## IFRC Go UI Storybook Release Workflow + +The Go UI Storybook is deployed to [Chromatic](https://www.chromatic.com/) using the [Publish to Chromatic](https://github.com/marketplace/actions/publish-to-chromatic) GitHub action. This action is configured to detect changes in the `packages/ui` or `packages/go-ui-storybook` directories and deploy only when modifications are found. + +The Storybook can be accessed [here](https://66557be6b68dacbf0a96db23-jsfajnuhcv.chromatic.com/). diff --git a/collaborating/repository-structure.md b/collaborating/repository-structure.md index b45d556189..19648b8302 100644 --- a/collaborating/repository-structure.md +++ b/collaborating/repository-structure.md @@ -1,13 +1,13 @@ ## Repository Structure The repository is set up as a [monorepo](https://monorepo.tools/). -The monorepo is organized as follows: +The monorepo is organized as follows -[app/](../app/) contains the web application code for the IFRC Go project. +- [app/](../app/) contains the web application code for the IFRC Go project. -[packages/ui/](../packages/ui/) contains the IFRC Go UI library. This component library powers the IFRC Go project's user interface. +- [packages/ui/](../packages/ui/) contains the IFRC Go UI library. This component library powers the IFRC Go project's user interface. -[packages/go-ui-storybook/](../packages/go-ui-storybook/) contains the Storybook configuration and stories for the IFRC Go UI library. +- [packages/go-ui-storybook/](../packages/go-ui-storybook/) contains the Storybook configuration and stories for the IFRC Go UI library. ### `app` Directory The `app` directory contains the main codebase for the web application of the IFRC Go project. It is structured as below: diff --git a/collaborating/testing.md b/collaborating/testing.md new file mode 100644 index 0000000000..36469836bc --- /dev/null +++ b/collaborating/testing.md @@ -0,0 +1,36 @@ +## Testing the IFRC Go Project + +### Unit Testing with Vitest + +We use [Vitest](https://vitest.dev/) for running unit tests. To run the unit tests, navigate to the `app` folder and run the following command: + +```bash +yarn test +``` + +### End-to-End Testing with Playwright + +For end-to-end testing, we use [Playwright](https://playwright.dev/). The test scripts are located in the `e2e-tests` folder under the `packages` directory. For further information, please refer to the [Playwright documentation](https://playwright.dev/docs/intro). + +> [!NOTE]\ +> Ensure all environment variables are correctly configured before running the tests. Make sure all necessary packages are installed. + +To run the Playwright tests, use the following commands: + +- To run the tests + ```bash + yarn playwright test + ``` + +- To run the tests in UI mode + ```bash + yarn playwright test --ui + ``` + +- To run the tests in headed mode + ```bash + yarn playwright test --headed + ``` + +For more information on running and debugging tests, refer to the [Playwright documentation](https://playwright.dev/docs/running-tests). + diff --git a/collaborating/translation.md b/collaborating/translation.md new file mode 100644 index 0000000000..ac94595193 --- /dev/null +++ b/collaborating/translation.md @@ -0,0 +1,5 @@ +## IFRC Go Translation + +The IFRC Go application supports the four official languages of the IFRC: English, French, Spanish, and Arabic. + +TODO: Add documentation regarding translations diff --git a/package.json b/package.json index 473b244033..d6449aa951 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "generate:type": "yarn workspace go-web-app generate:type", "preview": "yarn workspace go-web-app preview", "storybook": "yarn workspace go-ui-storybook storybook", - "build-storybook": "yarn workspace go-ui-storybook build-storybook", + "build:storybook": "yarn workspace go-ui-storybook build-storybook", "chromatic": "yarn workspace go-ui-storybook chromatic" }, "devDependencies": { diff --git a/packages/go-ui-storybook/CONTRIBUTING.md b/packages/go-ui-storybook/CONTRIBUTING.md new file mode 100644 index 0000000000..5851eb9c94 --- /dev/null +++ b/packages/go-ui-storybook/CONTRIBUTING.md @@ -0,0 +1 @@ +TODO Add Contributing diff --git a/packages/go-ui-storybook/README.md b/packages/go-ui-storybook/README.md new file mode 100644 index 0000000000..7ffe957b2c --- /dev/null +++ b/packages/go-ui-storybook/README.md @@ -0,0 +1 @@ +TODO Add readme From 37bba312d89c50a58dd1dabbb72f5e6cd067ebe4 Mon Sep 17 00:00:00 2001 From: samshara Date: Fri, 9 Aug 2024 13:57:16 +0545 Subject: [PATCH 3/5] chore: Rename IFRC Go to IFRC GO --- .changeset/fifty-ants-crash.md | 5 +++++ .github/workflows/chromatic.yml | 2 +- collaborating/building.md | 6 +++--- collaborating/developing.md | 16 +++++++--------- collaborating/linting.md | 15 ++++++++++++--- collaborating/release.md | 6 +++--- collaborating/repository-structure.md | 14 +++++++------- collaborating/technology.md | 8 ++++---- collaborating/testing.md | 2 +- collaborating/translation.md | 4 ++-- package.json | 2 +- packages/go-ui-storybook/package.json | 2 +- .../go-ui-storybook/src/stories/Introduction.mdx | 6 +++--- 13 files changed, 50 insertions(+), 38 deletions(-) create mode 100644 .changeset/fifty-ants-crash.md diff --git a/.changeset/fifty-ants-crash.md b/.changeset/fifty-ants-crash.md new file mode 100644 index 0000000000..1c83d82f01 --- /dev/null +++ b/.changeset/fifty-ants-crash.md @@ -0,0 +1,5 @@ +--- +"go-web-app": patch +--- + +Add collaboration guide diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index b466dffe5e..12a691f9e3 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -86,6 +86,6 @@ jobs: - uses: bitovi/github-actions-storybook-to-github-pages@v1.0.3 with: install_command: yarn install - build_command: yarn build-storybook + build_command: yarn build:storybook path: packages/go-ui-storybook/storybook-static checkout: false diff --git a/collaborating/building.md b/collaborating/building.md index aa72f0dc87..763c42076c 100644 --- a/collaborating/building.md +++ b/collaborating/building.md @@ -2,14 +2,14 @@ > [!NOTE]\ > Ensure all the packages have been installed before building the project. -To build different components of the IFRC Go project, use the following commands. +To build different components of the IFRC GO project, use the following commands. -**IFRC Go Web Application** +**IFRC GO Web Application** ```bash yarn build ``` -**IFRC Go UI Library** +**IFRC GO UI Library** ```bash yarn build:ui ``` diff --git a/collaborating/developing.md b/collaborating/developing.md index 3f4b16ddea..b47b14df48 100644 --- a/collaborating/developing.md +++ b/collaborating/developing.md @@ -1,6 +1,6 @@ ## Development -The stable branch for the IFRC Go application is `develop`. All PRs intended for deployment should be merged into the `develop` branch. +The stable branch for the IFRC GO application is `develop`. All PRs intended for deployment should be merged into the `develop` branch. For long-running features, create PRs targeting the specific `project/project-x` branch when working on features related to that project. @@ -32,8 +32,6 @@ To begin, ensure you have network access. Then, you'll need the following ```bash yarn start:app ``` - -``` > [!NOTE]\ > To work on a specific development task, ensure you have the backend setup appropriately and configured properly. 5. Create a new branch for your work. @@ -43,11 +41,11 @@ To begin, ensure you have network access. Then, you'll need the following > [!IMPORTANT]\ > Ensure there are no lint errors before pushing the changes. Ensure the commit message is clear and concise, summarizing the changes made in the commit. Avoid vague and generic messages. Instead, provide specific details that describe the purpose or impact of the changes. 6. Once you're happy with your changes, add and commit them to your branch, then push the branch to origin. -```bash -git add . -git commit -m "some message" -git push -u origin name-of-your-branch -``` + ```bash + git add . + git commit -m "some message" + git push -u origin name-of-your-branch + ``` > [!NOTE]\ > Before committing and opening a Pull Request, please ensure there are no lint errors. Also please create a pull request only when the feature is ready to be merged. @@ -82,7 +80,7 @@ Execute the following commands within the `app` workspace. ### UI components library -Please read the [README](../packages/ui/README.md) and [CONTRIBUTING](../packages/ui/CONTRIBUTING.md) guide for IFRC Go UI. +Please read the [README](../packages/ui/README.md) and [CONTRIBUTING](../packages/ui/CONTRIBUTING.md) guide for IFRC GO UI. ### Storybook Please read the [README](../packages/go-ui-storybook/README.md) and [CONTRIBUTING](../packages/go-ui-storybook/CONTRIBUTING.md) guide. diff --git a/collaborating/linting.md b/collaborating/linting.md index 980bc54666..2deb338ce4 100644 --- a/collaborating/linting.md +++ b/collaborating/linting.md @@ -1,9 +1,11 @@ ## Linting and Type Checking -IFRC Go Web App repository utilizes [ESLint](https://eslint.org/) and [Stylelint](https://stylelint.io/) for linting and formatting the code, as well as TypeScript for type checking. +IFRC GO Web App repository utilizes [ESLint](https://eslint.org/) and [Stylelint](https://stylelint.io/) for linting and formatting the code, as well as TypeScript for type checking. -### ESLint +> [!NOTE]\ +> Run the following commands withing the [app](../app/) folder +### ESLint Configuration for ESLint can be found in the [eslint.config.js](../app/eslint.config.js) file. To lint your code @@ -38,8 +40,15 @@ yarn lint:fix ``` ### Type Checking +> [!IMPORTANT]\ +> Before running the type check, make sure to generate the types. +> To do this, define the API endpoints in the environment variables first. -To verify and enforce TypeScript type constraints in your code +To generate the TypeScript types for API endpoints +```bash +yarn generate:type +``` +To verify and enforce TypeScript type constraints ```bash yarn typecheck ``` diff --git a/collaborating/release.md b/collaborating/release.md index 45d60c906d..8f48dc1be3 100644 --- a/collaborating/release.md +++ b/collaborating/release.md @@ -1,4 +1,4 @@ -## IFRC Go Release Workflow +## IFRC GO Release Workflow The IFRC Go web application deployment occurs across nightly, staging, and production instances via [Azure Pipelines](https://azure.microsoft.com/en-us/products/devops/pipelines). The environment variables must be properly configured for the deployment workflow to run smoothly. @@ -41,7 +41,7 @@ We use [changesets](https://github.com/changesets/changesets) to manage versioni ### Nightly/Staging/Production Release using Azure Pipelines TODO Add azure pipelines deployment documentation -## IFRC Go UI Release Workflow +## IFRC GO UI Release Workflow To release the IFRC Go UI to [NPM](https://www.npmjs.com/) using [changesets](https://github.com/changesets/changesets), follow these steps. Ensure you have the necessary credentials and publishing rights to the [ifrc-go/ui](https://www.npmjs.com/org/ifrc-go) package. @@ -87,7 +87,7 @@ To release the IFRC Go UI to [NPM](https://www.npmjs.com/) using [changesets](ht git push --follow-tags ``` -## IFRC Go UI Storybook Release Workflow +## IFRC GO UI Storybook Release Workflow The Go UI Storybook is deployed to [Chromatic](https://www.chromatic.com/) using the [Publish to Chromatic](https://github.com/marketplace/actions/publish-to-chromatic) GitHub action. This action is configured to detect changes in the `packages/ui` or `packages/go-ui-storybook` directories and deploy only when modifications are found. diff --git a/collaborating/repository-structure.md b/collaborating/repository-structure.md index 19648b8302..7c224c9f31 100644 --- a/collaborating/repository-structure.md +++ b/collaborating/repository-structure.md @@ -3,23 +3,23 @@ The repository is set up as a [monorepo](https://monorepo.tools/). The monorepo is organized as follows -- [app/](../app/) contains the web application code for the IFRC Go project. +- [app/](../app/) contains the web application code for the IFRC GO project. -- [packages/ui/](../packages/ui/) contains the IFRC Go UI library. This component library powers the IFRC Go project's user interface. +- [packages/ui/](../packages/ui/) contains the IFRC GO UI library. This component library powers the IFRC GO project's user interface. -- [packages/go-ui-storybook/](../packages/go-ui-storybook/) contains the Storybook configuration and stories for the IFRC Go UI library. +- [packages/go-ui-storybook/](../packages/go-ui-storybook/) contains the Storybook configuration and stories for the IFRC GO UI library. ### `app` Directory -The `app` directory contains the main codebase for the web application of the IFRC Go project. It is structured as below: +The `app` directory contains the main codebase for the web application of the IFRC GO project. It is structured as below: - **`app/generated/`** contains the API endpoint type definitions generated by `openapi-typescript`. - **`app/scripts/`** contains scripts executed as part of the project. - **`app/scripts/translate/`** contains scripts for synchronizing translations between the application code and the server. - **`app/src/`** houses the core web application code. - - **`app/src/App/`** contains the base application logic for IFRC Go, including authentication handling, routing, and React context setup. + - **`app/src/App/`** contains the base application logic for IFRC GO, including authentication handling, routing, and React context setup. - **`app/src/assets/`** contains static assets used throughout the project. - - **`app/src/components/`** contains components designed specifically for the IFRC Go project. + - **`app/src/components/`** contains components designed specifically for the IFRC GO project. - **`app/src/contexts/`** contains React context providers used within the application. - **`app/src/hooks/`** contains custom React hooks used across the project. - **`app/src/utils/`** contains utility functions and helpers used in the project. @@ -31,7 +31,7 @@ The `app` directory contains the main codebase for the web application of the IF ### `packages/ui` Directory -The `packages/ui` directory contains the IFRC Go UI components library. The library is built using Vite, React, PostCSS. It is structured as below: +The `packages/ui` directory contains the IFRC GO UI components library. The library is built using Vite, React, PostCSS. It is structured as below: - **`src/components/`** contains all the UI components. - **`src/contexts/`** contains React context providers for the components in the UI library. diff --git a/collaborating/technology.md b/collaborating/technology.md index 76b6a5e4a4..2bab364dc6 100644 --- a/collaborating/technology.md +++ b/collaborating/technology.md @@ -1,6 +1,6 @@ -## Technologies Used to Build the IFRC Go Website +## Technologies Used to Build the IFRC GO Website -The IFRC Go web application is built using [React](https://react.dev/) and [Vite](https://vitejs.dev/), with [TypeScript](https://www.typescriptlang.org/) as the primary programming language. +The IFRC GO web application is built using [React](https://react.dev/) and [Vite](https://vitejs.dev/), with [TypeScript](https://www.typescriptlang.org/) as the primary programming language. ### Libraries and Tools @@ -12,8 +12,8 @@ The IFRC Go web application is built using [React](https://react.dev/) and [Vite - [@togglecorp/re-map](https://www.npmjs.com/package/@togglecorp/re-map), a thin wrapper around MapboxGL, for easier integration with React - **Icons and UI** - - [@ifrc-go/icons](https://www.npmjs.com/package/@ifrc-go/icons), the IFRC Go icons library - - [@ifrc-go/ui](https://www.npmjs.com/package/@ifrc-go/ui), the UI library powering the IFRC Go platform + - [@ifrc-go/icons](https://www.npmjs.com/package/@ifrc-go/icons), the IFRC GO icons library + - [@ifrc-go/ui](https://www.npmjs.com/package/@ifrc-go/ui), the UI library powering the IFRC GO platform - **Routing** - [React Router](https://www.npmjs.com/package/react-router-dom) for client-side routing diff --git a/collaborating/testing.md b/collaborating/testing.md index 36469836bc..73f94e63f3 100644 --- a/collaborating/testing.md +++ b/collaborating/testing.md @@ -1,4 +1,4 @@ -## Testing the IFRC Go Project +## Testing the IFRC GO Project ### Unit Testing with Vitest diff --git a/collaborating/translation.md b/collaborating/translation.md index ac94595193..de9d9bc73f 100644 --- a/collaborating/translation.md +++ b/collaborating/translation.md @@ -1,5 +1,5 @@ -## IFRC Go Translation +## IFRC GO Translation -The IFRC Go application supports the four official languages of the IFRC: English, French, Spanish, and Arabic. +The IFRC GO application supports the four official languages of the IFRC: English, French, Spanish, and Arabic. TODO: Add documentation regarding translations diff --git a/package.json b/package.json index d6449aa951..7d168d2ddd 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "generate:type": "yarn workspace go-web-app generate:type", "preview": "yarn workspace go-web-app preview", "storybook": "yarn workspace go-ui-storybook storybook", - "build:storybook": "yarn workspace go-ui-storybook build-storybook", + "build:storybook": "yarn workspace go-ui-storybook build:storybook", "chromatic": "yarn workspace go-ui-storybook chromatic" }, "devDependencies": { diff --git a/packages/go-ui-storybook/package.json b/packages/go-ui-storybook/package.json index 98f8b8102a..e6ecba6dc9 100644 --- a/packages/go-ui-storybook/package.json +++ b/packages/go-ui-storybook/package.json @@ -15,7 +15,7 @@ "lint": "eslint src", "preview": "vite preview", "storybook": "storybook dev -p 6006", - "build-storybook": "storybook build", + "build:storybook": "storybook build", "chromatic": "dotenv -- cross-var chromatic --project-token=%CHROMATIC_PROJECT_TOKEN%" }, "dependencies": { diff --git a/packages/go-ui-storybook/src/stories/Introduction.mdx b/packages/go-ui-storybook/src/stories/Introduction.mdx index 1c046948fe..51674a1942 100644 --- a/packages/go-ui-storybook/src/stories/Introduction.mdx +++ b/packages/go-ui-storybook/src/stories/Introduction.mdx @@ -4,10 +4,10 @@ import pkg from '@togglecorp/fujs/package.json';

- IFRC Go UI + IFRC GO UI

-IFRC Go logo +IFRC GO logo

Overview @@ -27,4 +27,4 @@ The design system aims to streamline the design and development process, providi [@ifrc-go/ui npm package](https://www.npmjs.com/package/@ifrc-go/ui) --- -Reach out to the IFRC Go team on [Github](https://github.com/IFRCGo/) +Reach out to the IFRC GO team on [Github](https://github.com/IFRCGo/) From 239dd0eb924d7a220a38c1fb3ac2ce4c1ca52f7a Mon Sep 17 00:00:00 2001 From: Sameer Rai Date: Thu, 5 Sep 2024 14:36:44 +0545 Subject: [PATCH 4/5] feat: add more information on changesets --- CONTRIBUTING.md | 15 +++++++++-- collaborating/developing.md | 16 ++++++++++-- collaborating/issues-and-pull-requests.md | 3 +++ collaborating/release.md | 31 ++++++++++++++++++++++- 4 files changed, 60 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0ca8d71417..962988ca2e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -136,13 +136,24 @@ To begin, ensure you have network access. Then, you'll need the following ``` > [!IMPORTANT]\ > Ensure there are no lint errors before pushing the changes. Ensure the commit message is clear and concise, summarizing the changes made in the commit. Avoid vague and generic messages. Instead, provide specific details that describe the purpose or impact of the changes. -6. Once you're happy with your changes, add and commit them to your branch, then push the branch to origin. +6. Once you're happy with your changes, add and commit them to your branch.If your workflow requires changesets (e.g., when changes will impact versioning or are part of a release), create one before committing. Then push the branch to origin. ```bash + # Stage all changes git add . + # Create a changeset (if changes will affect versioning, like new features or bug fixes) + yarn changeset + + # Commit your changes with a message git commit -m "some message" + + # Push your branch to origin git push -u origin name-of-your-branch ``` -> [!NOTE]\ + +>[!NOTE]\ +>Review the [Changesets documentation](./collaborating/release.md#changesets) and the [versioning guidelines](./collaborating/release.md#versioning-guidelines-for-ifrc-go-project) for more details on versioning and tracking changes. + +> [!IMPORTANT]\ > Before committing and opening a Pull Request, please ensure there are no lint errors. Also please create a pull request only when the feature is ready to be merged. 7. Create a Pull Request. diff --git a/collaborating/developing.md b/collaborating/developing.md index b47b14df48..cfcddef56a 100644 --- a/collaborating/developing.md +++ b/collaborating/developing.md @@ -40,15 +40,27 @@ To begin, ensure you have network access. Then, you'll need the following ``` > [!IMPORTANT]\ > Ensure there are no lint errors before pushing the changes. Ensure the commit message is clear and concise, summarizing the changes made in the commit. Avoid vague and generic messages. Instead, provide specific details that describe the purpose or impact of the changes. -6. Once you're happy with your changes, add and commit them to your branch, then push the branch to origin. +6. Once you're happy with your changes, add and commit them to your branch.If your workflow requires changesets (e.g., when changes will impact versioning or are part of a release), create one before committing. Then push the branch to origin. ```bash + # Stage all changes git add . + # Create a changeset (if changes will affect versioning, like new features or bug fixes) + yarn changeset + + # Commit your changes with a message git commit -m "some message" + + # Push your branch to origin git push -u origin name-of-your-branch ``` -> [!NOTE]\ + +>[!NOTE]\ +>Review the [Changesets documentation](./release.md#changesets) and the [versioning guidelines](./release.md#versioning-guidelines-for-ifrc-go-project) for more details on versioning and tracking changes. + +> [!IMPORTANT]\ > Before committing and opening a Pull Request, please ensure there are no lint errors. Also please create a pull request only when the feature is ready to be merged. +7. Create a Pull Request. Please read the [Issues and Pull Requests](./issues-and-pull-requests.md) guide for further information. ### CLI Commands diff --git a/collaborating/issues-and-pull-requests.md b/collaborating/issues-and-pull-requests.md index c1e0a3763f..d041233ad3 100644 --- a/collaborating/issues-and-pull-requests.md +++ b/collaborating/issues-and-pull-requests.md @@ -22,6 +22,9 @@ Add your changes, ensuring they follow code style guidelines. Run linting, perfo Run `yarn changeset` in the root of the repository and describe your changes. The resulting files should be committed as they will be used during release. +>[!NOTE]\ +>Review the [Changesets documentation](./release.md#changesets) and the [versioning guidelines](./release.md#versioning-guidelines-for-ifrc-go-project) for more details. + Commit your changes with a clear and descriptive message that adheres to our commit message conventions. Push your branch to GitHub following our branch naming conventions. diff --git a/collaborating/release.md b/collaborating/release.md index 8f48dc1be3..8f253d4a13 100644 --- a/collaborating/release.md +++ b/collaborating/release.md @@ -4,11 +4,37 @@ The IFRC Go web application deployment occurs across nightly, staging, and produ We use [changesets](https://github.com/changesets/changesets) to manage versioning and generate changelogs for each release. The version must be updated with each release, and the deployment is carried out through the `develop` branch. +### Changesets +[changesets](https://github.com/changesets/changesets) is used to manage versioning and changelogs across different packages within IFRC GO. + +#### When is changesets required in IFRC GO? +- **New Features**: When you add new functionality that users can interact with. This requires version bumping to signal a feature addition. +- **Bug Fixes**: For resolving issues that affect existing functionality, ensuring a version bump and clear changelog entries. +- **Breaking Changes**: When changes may disrupt existing workflows or integrations, reflecting this with a major version increment. + +changesets isn't required for internal-only updates, minor refactoring, or documentation changes that don't impact functionality. + +### Versioning Guidelines for IFRC GO Project +In the IFRC GO project, we follow [SemVer](https://semver.org/) (Semantic Versioning) to maintain consistency and clarity. Here's a quick guide to determine whether your changes should be categorized as a patch, minor, or major version update + +1. **Patch Version (x.y.*patch*)** + - Bug fixes, small tweaks, or performance improvements. + +2. **Minor Version (x.*minor*.z)** + - Adding new features. + +3. **Major Version (*major*.y.z)** + - Introducing breaking changes or significant new features. + +>[!TIP]\ +> When in doubt, favor **patch** or **minor** updates to avoid unnecessary major releases. + ### Before Release 1. Ensure all changes have been merged into the `develop` branch. -2. Checkout the latest `develop` branch +2. Fetch and checkout the latest `develop` branch ```bash + git fetch git checkout develop git pull --rebase ``` @@ -33,6 +59,9 @@ We use [changesets](https://github.com/changesets/changesets) to manage versioni ```bash yarn changeset tag ``` +> [!IMPORTANT]\ +> Ensure all existing tags are fetched from the remote repository before generating new tags with `yarn changeset tag`. This can be done using `git fetch --tags` to ensure you have the latest tags in your local repository, which helps avoid potential conflicts or issues with tag generation. + 8. Push the generated tags to the origin ```bash git push --follow-tags From f58c6b6cebd02ba4a1df1d3caabed9a464910af6 Mon Sep 17 00:00:00 2001 From: samshara Date: Fri, 9 Aug 2024 13:57:16 +0545 Subject: [PATCH 5/5] chore: Rename IFRC Go to IFRC GO --- collaborating/repository-structure.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/collaborating/repository-structure.md b/collaborating/repository-structure.md index 7c224c9f31..be6f5866ad 100644 --- a/collaborating/repository-structure.md +++ b/collaborating/repository-structure.md @@ -39,3 +39,11 @@ The `packages/ui` directory contains the IFRC GO UI components library. The libr - **`src/utils/`** contains utility functions. - **`index.css`** contains global CSS styles. - **`index.tsx`** contains the main entry point for the UI library. + + +### `packages/go-ui-storybook` Directory + +The `packages/go-ui-storybook` directory contains the stories for the IFRC GO UI components library. Its structure is as follows: + +- **`src/stories/`**: Houses all the UI component stories. +- **`.storybook/`**: Contains the configuration for Storybook.