Skip to content

Commit

Permalink
testing changes
Browse files Browse the repository at this point in the history
  • Loading branch information
VanshikaSabharwal committed Dec 4, 2024
2 parents da04be8 + 5be01a6 commit 557c203
Show file tree
Hide file tree
Showing 14 changed files with 83 additions and 19,534 deletions.
5 changes: 5 additions & 0 deletions .dockerfilelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"skipShellCheck": false,
"skipCritical": false,
"disableLineBreaks": false
}
49 changes: 25 additions & 24 deletions CODE_STYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ code style should not be changed and must be followed.

- Typescript

- React.js
- React.js

- CSS module

Expand All @@ -43,7 +43,6 @@ code style should not be changed and must be followed.

- Should make use of React hooks where appropriate


## Code Style and Naming Conventions

- All React components *must* be written in PascalCase, with their file names, and associated CSS modules being written in PascalCase
Expand All @@ -55,13 +54,15 @@ code style should not be changed and must be followed.
- Use of custom classes directly are refrained, use of modular css is encouraged along with bootstrap classes

**Wrong way ❌**

```
<div className="myCustomClass">...</div>
<div className={`${styles.myCustomClass1} myCustomClass2`}>...</div> // No using personal custom classes directly, here you should not use myCustomClass2
.container{...} // No changing the property of already existing classes reserved by boostrap directly in css files
```

**Correct ways ✅**
**Correct ways ✅**

```
<div className={styles.myCustomClass}>...</div> // Use custom class defined in modular css file
<div className={`${styles.myCustomClass} relative bg-danger`}>...</div> // Use classes already defined in Bootstrap
Expand All @@ -74,7 +75,8 @@ code style should not be changed and must be followed.

**Wrong way ❌**

Using plain Bootstrap classes and attributes without leveraging the React-Bootstrap library should be refrained. While it may work for basic functionality, it doesn't fully integrate with React and may cause issues when dealing with more complex state management or component interactions.
Using plain Bootstrap classes and attributes without leveraging the React-Bootstrap library should be refrained. While it may work for basic functionality, it doesn't fully integrate with React and may cause issues when dealing with more complex state management or component interactions.

```
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
Expand All @@ -87,11 +89,11 @@ Using plain Bootstrap classes and attributes without leveraging the React-Bootst
</ul>
</div>
```


**Correct way ✅**

It's recommended to use the React-Bootstrap library for seamless integration of Bootstrap components in a React application.

```
import Dropdown from 'react-bootstrap/Dropdown';
Expand All @@ -114,27 +116,27 @@ function BasicExample() {
export default BasicExample;
```

## Test and Code Linting

## Test and Code Linting

Unit tests must be written for *all* code submissions to the repository,
Unit tests must be written for *all* code submissions to the repository,
the code submitted must also be linted ESLint and formatted with Prettier.

## Folder/Directory Structure

### Sub Directories of `src`

`assets` - This houses all of the static assets used in the project
- `css` - This houses all of the css files used in the project
- `images` - This houses all of the images used in the project
- `scss` - This houses all of the scss files used in the project
- `components -` All Sass files for components
- `content -` All Sass files for content
- `forms -` All Sass files for forms
- `_talawa.scss` - Partial Sass file for Talawa
- `_utilities.scss` - Partial Sass file for utilities
- `_variables.scss` - Partial Sass file for variables
- `app.scss` - Main Sass file for the app, imports all other partial Sass files

- `css` - This houses all of the css files used in the project
- `images` - This houses all of the images used in the project
- `scss` - This houses all of the scss files used in the project
- `components -` All Sass files for components
- `content -` All Sass files for content
- `forms -` All Sass files for forms
- `_talawa.scss` - Partial Sass file for Talawa
- `_utilities.scss` - Partial Sass file for utilities
- `_variables.scss` - Partial Sass file for variables
- `app.scss` - Main Sass file for the app, imports all other partial Sass files

`components` - The directory for base components that will be used in the various views/screens

Expand All @@ -148,7 +150,6 @@ the code submitted must also be linted ESLint and formatted with Prettier.

`utils` - This holds the utility functions that do not fall into any of the other categories


## Imports

Absolute imports have been set up for the project, so imports may be done directly from `src`.
Expand All @@ -161,10 +162,9 @@ import Navbar from 'components/Navbar/Navbar';

Imports should be grouped in the following order:

- React imports
- Third party imports
- Local imports

- React imports
- Third party imports
- Local imports

If there is more than one import from a single library, they should be grouped together

Expand Down Expand Up @@ -213,7 +213,6 @@ Follow this [link](https://getbootstrap.com/docs/5.3/customize/sass/) to learn h
- **_table.scss**
- **_typography.scss**


- `src/assets/scss/forms/{'{partialFile}'}.scss` - where the {'{partialFile}'} are the following files
- **_check-radios.scss**
- **_floating-label.scss**
Expand Down Expand Up @@ -245,9 +244,11 @@ To watch the Sass file for changes and compile it automatically, run the followi
```
npx sass src/assets/scss/app.scss src/assets/css/app.css --watch
```

The `src/assets/css/app.css.map` file associates the generated CSS code with the original SCSS code. It allows you to see your SCSS code in the browser's developer tools for debugging.

To skip generating the map file, run

```
npx sass --no-source-map src/assets/scss/app.scss src/assets/css/app.css
```
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,24 +125,30 @@ The process of proposing a change to Talawa Admin can be summarized as:
1. _General Information_
1. The current code coverage of the repo is: [![codecov](https://codecov.io/gh/PalisadoesFoundation/talawa-admin/branch/develop/graph/badge.svg?token=II0R0RREES)](https://codecov.io/gh/PalisadoesFoundation/talawa-admin)
2. You can determine the percentage test coverage of your code by running these two commands in sequence:
```
npm install
npm run test --watchAll=false --coverage
genhtml coverage/lcov.info -o coverage
```
3. The output of the `npm run test` command will give you a tablular coverage report per file
4. The overall coverage rate will be visible on the penultimate line of the `genhtml` command's output.
5. The `genhtml` command is part of the Linux `lcov` package. Similar packages can be found for Windows and MacOS.
6. The currently acceptable coverage rate can be found in the [GitHub Pull Request file](.github/workflows/pull-requests.yml). Search for the value below the line containing `min_coverage`.
2. _Testing Individual Files_
1. You can test an individual file by running this command:
```
npm run test --watchAll=false /path/to/test/file
```
2. You can get the test coverage report for that file by running this command. The report will list all tests in the suite. Those tests that are not run will have zero values. You will need to look for the output line relevant to your test file.
```
npm run test --watchAll=false --coverage /path/to/test/file
```
3. _Creating your code coverage account_
1. You can also see your code coverage online for your fork of the repo. This is provided by `codecov.io`
Expand Down
12 changes: 8 additions & 4 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Documentation

Welcome to our documentation guide. Here are some useful tips you need to know!

# Table of Contents
Expand All @@ -15,18 +16,21 @@ Welcome to our documentation guide. Here are some useful tips you need to know!

Our documentation can be found in ONLY TWO PLACES:

1. ***Inline within the repository's code files***: We have automated processes to extract this information and place it in our Talawa documentation site [docs.talawa.io](https://docs.talawa.io/).
1. ***Inline within the repository's code files***: We have automated processes to extract this information and place it in our Talawa documentation site [docs.talawa.io](https://docs.talawa.io/).
1. ***In our `talawa-docs` repository***: Our [Talawa-Docs](https://github.com/PalisadoesFoundation/talawa-docs) repository contains user edited markdown files that are automatically integrated into our Talawa documentation site [docs.talawa.io](https://docs.talawa.io/) using the [Docusaurus](https://docusaurus.io/) package.

## How to use Docusaurus

The process in easy:

1. Install `talawa-docs` on your system
1. Launch docusaurus on your system according to the `talawa-docs`documentation.
- A local version of `docs.talawa.io` should automatically launched in your browser at http://localhost:3000/
1. Launch docusaurus on your system according to the `talawa-docs`documentation.
- A local version of `docs.talawa.io` should automatically launched in your browser at <http://localhost:3000/>
1. Add/modify the markdown documents to the `docs/` directory of the `talawa-docs` repository
1. If adding a file, then you will also need to edit the `sidebars.js` which is used to generate the [docs.talawa.io](https://docs.talawa.io/) menus.
1. Always monitor the local website in your brower to make sure the changes are acceptable.
1. Always monitor the local website in your brower to make sure the changes are acceptable.
- You'll be able to see errors that you can use for troubleshooting in the CLI window you used to launch the local website.

## Other information

***PLEASE*** do not add markdown files in this repository. Add them to `talawa-docs`!
20 changes: 11 additions & 9 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ First you need a local copy of `talawa-admin`. Run the following command in the
![Image of user's clone](public/markdown/images/install2.png)

1. Clone the repository to your local computer (replacing the values in `{{}}`):

```bash
$ git clone https://github.com/{{YOUR GITHUB USERNAME}}/talawa-admin.git
cd talawa-admin
git checkout develop
```

- **Note:** Make sure to check out the `develop` branch
1. You now have a local copy of the code files. For more detailed instructions on contributing code, and managing the versions of this repository with `git`, checkout our [CONTRIBUTING.md](./CONTRIBUTING.md) file.

Expand All @@ -76,7 +78,7 @@ First you need a local copy of `talawa-admin`. Run the following command in the
1. Clone the repository to your local computer using this command:

```bash
$ git clone https://github.com/PalisadoesFoundation/talawa-admin.git
git clone https://github.com/PalisadoesFoundation/talawa-admin.git
```

## Install node.js
Expand All @@ -86,7 +88,7 @@ Best way to install and manage `node.js` is making use of node version managers.
Follow these steps to install the `node.js` packages in Windows, Linux and MacOS.

1. For Windows:
1. first install `node.js` from their website at https://nodejs.org
1. first install `node.js` from their website at <https://nodejs.org>
1. When installing, don't click the option to install the `necessary tools`. These are not needed in our case.
2. then install [fnm](https://github.com/Schniz/fnm). Please read all the steps in this section first.
1. All the commands listed on this page will need to be run in a Windows terminal session in the `talawa-admin` directory.
Expand Down Expand Up @@ -141,9 +143,9 @@ The prerequisites are now installed. The next step will be to get the app up and
If you prefer to use Docker, you can install the app using the following command:
1. Create a `.env` file as described in the Configuration section
1. Create a `.env` file as described in the Configuration section
2. Build the Docker Image:
2. Build the Docker Image:
Run the following command to build the Docker image:
Expand Down Expand Up @@ -225,23 +227,23 @@ Add the endpoint for accessing talawa-api graphql service to the variable named
```
REACT_APP_TALAWA_URL="http://API-IP-ADRESS:4000/graphql/"
REACT_APP_TALAWA_URL="<http://API-IP-ADRESS:4000/graphql/>"
```
If you are a software developer working on your local system, then the URL would be:
```
REACT_APP_TALAWA_URL="http://localhost:4000/graphql/"
REACT_APP_TALAWA_URL="<http://localhost:4000/graphql/>"
```
If you are trying to access Talawa Admin from a remote host with the API URL containing "localhost", You will have to change the API URL to
```
REACT_APP_TALAWA_URL="http://YOUR-REMOTE-ADDRESS:4000/graphql/"
REACT_APP_TALAWA_URL="<http://YOUR-REMOTE-ADDRESS:4000/graphql/>"
```
Expand Down Expand Up @@ -317,15 +319,15 @@ By default `talawa-admin` runs on port `4321` on your system's localhost. It is
```
http://localhost:4321/
<http://localhost:4321/>
```
If you have specified a custom port number in your `.env` file, Talawa-Admin will run on the following endpoint:
```
http://localhost:${{customPort}}/
<http://localhost:${{customPort}}/>
```
Expand Down
10 changes: 7 additions & 3 deletions ISSUE_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
In order to give everyone a chance to submit a issues reports and contribute to the Talawa project, we have put restrictions in place. This section outlines the guidelines that should be imposed upon issue reports in the Talawa project.

___

## Table of Contents

<!-- toc -->
Expand All @@ -19,14 +20,16 @@ ___
<!-- tocstop -->

___

## Issue Management

In all cases please use the [GitHub open issue search](https://github.com/PalisadoesFoundation/talawa-admin/issues) to check whether the issue has already been reported.

### New Issues

To create new issues follow these steps:

1. Your issue may have already been created. Search for duplicate open issues before submitting yours.for similar deficiencies in the code.duplicate issues are created.
1. Your issue may have already been created. Search for duplicate open issues before submitting yours.for similar deficiencies in the code.duplicate issues are created.
1. Verify whether the issue has been fixed by trying to reproduce it using the latest master or development branch in the repository.
1. Click on the [`New Issue`](https://github.com/PalisadoesFoundation/talawa-admin/issues/new/choose) button
1. Use the templates to create a standardized report of what needs to be done and why.
Expand All @@ -49,11 +52,12 @@ Working on these types of existing issues is a good way of getting started with

Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the mentors of the merits of this feature. Please provide as much detail and context as possible.

### Monitoring the Creation of New Issues
### Monitoring the Creation of New Issues

1. Join our `#talawa-github` slack channel for automatic issue and pull request updates.

## General Guidelines

1. Discuss issues in our various slack channels when necessary
2. Please do not derail or troll issues.
2. Please do not derail or troll issues.
3. Keep the discussion on topic and respect the opinions of others.
1 change: 1 addition & 0 deletions PR_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ npm run format:check
1. Please read our [CONTRIBUTING.md](CONTRIBUTING.md) document for details on our testing policy.

## Pull Request Processing

These are key guidelines for the procedure:

### Only submit PRs against our `develop` branch, not the default `main` branch
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ Talawa is a modular open source project to manage group activities of both non-p

Core features include:

1. Membership management
2. Groups management
3. Event registrations
4. Recurring meetings
5. Facilities registrations
1. Membership management
2. Groups management
3. Event registrations
4. Recurring meetings
5. Facilities registrations

`talawa` is based on the original `quito` code created by the [Palisadoes Foundation][pfd] as part of its annual Calico Challenge program. Calico provides paid summer internships for Jamaican university students to work on selected open source projects. They are mentored by software professionals and receive stipends based on the completion of predefined milestones. Calico was started in 2015. Visit [The Palisadoes Foundation's website](http://www.palisadoes.org/) for more details on its origin and activities.

Expand Down Expand Up @@ -50,7 +50,7 @@ Core features include:
1. The `talawa` documentation can be found at our [docs.talawa.io](https://docs.talawa.io) site.
1. It is automatically generated from the markdown files stored in our [Talawa-Docs GitHub repository](https://github.com/PalisadoesFoundation/talawa-docs). This makes it easy for you to update our documenation.

# Videos
# Videos

1. Visit our [YouTube Channel playlists](https://www.youtube.com/@PalisadoesOrganization/playlists) for more insights
1. The "[Getting Started - Developers](https://www.youtube.com/watch?v=YpBUoHxEeyg&list=PLv50qHwThlJUIzscg9a80a9-HmAlmUdCF&index=1)" videos are extremely helpful for new open source contributors.
Loading

0 comments on commit 557c203

Please sign in to comment.