Skip to content

Commit

Permalink
Merge pull request #159 from odu-emse/development
Browse files Browse the repository at this point in the history
Release v0.4.0
  • Loading branch information
joeldesante authored Jul 6, 2023
2 parents 6b21c0c + 373314c commit 2cec2cd
Show file tree
Hide file tree
Showing 317 changed files with 577,048 additions and 40,566 deletions.
10 changes: 2 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
plugins: ['unicorn', 'cypress'],
plugins: ['unicorn'],
env: {
'cypress/globals': true,
jest: true,
},
extends: ['next', 'next/core-web-vitals', 'semistandard', 'prettier'],
rules: {
Expand All @@ -16,11 +16,5 @@ module.exports = {
'react-hooks/rules-of-hooks': 'warn',
'react/jsx-no-comment-textnodes': 'warn',
'react/no-children-prop': 'warn',
'cypress/no-assigning-return-values': 'error',
'cypress/no-unnecessary-waiting': 'error',
'cypress/assertion-before-screenshot': 'warn',
'cypress/no-force': 'warn',
'cypress/no-async-tests': 'error',
'cypress/no-pause': 'error',
},
}
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

jobs:
build-storybook:
needs: [format, lint]
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GH_ORG_PAT }}
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v2
with:
node-version: '16.x'
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ build-storybook.log
.env
.env.*
!.env.example
data
data
public/videos/
6 changes: 6 additions & 0 deletions .storybook/manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { addons } from '@storybook/manager-api';
import theme from './theme';

addons.setConfig({
theme: theme,
});
9 changes: 9 additions & 0 deletions .storybook/theme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { create } from '@storybook/theming/create'

export default create({
base: 'light',
brandTitle: 'Glance UI',
brandUrl: 'https://odu-emse.github.io/Glance-Frontend',
brandImage: 'https://raw.githubusercontent.com/odu-emse/Glance-Frontend/dfcceb573bbd40592e48d87f660489c66866838f/public/images/GLANCE_1.png',
brandTarget: '_self',
})
117 changes: 21 additions & 96 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,110 +1,35 @@
# EMSE - Asynchronous Learning Management Platform | UI
<p align="center">
<img src="https://github.com/odu-emse/frontend/blob/4081a38098aca17665812c3cbc3d672b6a06e717/public/images/GLANCE_1.png" alt="GLANCE. Education at a glance." width="500px" height="auto"/>
</p>

Hello!
---

This repository contains all the files that are required for the operation of the AMLP user interface. The UI is a web application that facilitates interactions with the API. The UI is built using ReactJS and is ran in a Docker container.
## Setting up your enviorment

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
If you are tasked with working on the Glance project, you can follow these steps to setup your development enviorment.

## Pre-requisites
1. This project is built on **NodeJS v16** so you will need to make sure your computer has this version installed and setup. https://nodejs.org/en/blog/release/v16.16.0
2. Clone the repository to your computer and then promptly run `npm install` to build the dependancies.
3. Create the `.env` file using the provided `.env.example` as reference. You must provide all of the settings.
4. Run `npm run dev` to start the testing server. Otherwise run `npm run storybook` to run the Storybook pane.

- Docker
> Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker’s methodologies for shipping, testing, and deploying code quickly, you can significantly reduce the delay between writing code and running it in production.
- [Install Docker for your OS](https://docs.docker.com/desktop/)
- make
> Make is a tool which controls the generation of executables and other non-source files of a program from the program's source files. Make gets its knowledge of how to build your program from a file called the makefile, which lists each of the non-source files and how to compute it from other files. When you write a program, you should write a makefile for it, so that it is possible to use Make to build and install the program.
- [Install GNU win32 on Windows](http://gnuwin32.sourceforge.net
---

## Environmental Variables
## Contributing to the project

After cloning the repository, create a .env file with the appropriate variables that you received from your supervisor or through documentation. This file will contain the necessary variables like, our JWT configuration and our edge functions' URL.
All of our tickets are managed via [YouTrack](https://emse.myjetbrains.com/youtrack/agiles/120-2/current).

```shell
$ cd emsePortal && touch .env
```
When creating a new branch it should be named the ticket number prefixed with the word ALMP. Ex. ALMP-123, ALMP-32, ALMP-345

## Caveats when working on UI
Pull requests should describe the changes which have been made in the title and description.

To run the UI, first please make sure you have all the necessary Pre-Requisite are installed. Without these, the application will not be able to run or compile.
All new work is to be commited to the `development` branch and **NOT** `main`.

Second, you should verify if you are working across the entire stack (need to modify both the UI and the API to complete your issue), or is it specific for only the UI. If the later, you should only run commands that have `dev` in the name. If you require to work across the entire stack, please follow the set-up steps in the API's README.md file, and use all the `local` commands.
Please keep your branches up to date with the upstream branch.

As a short hand explanation, `local` commands expect you to have the API running on your machine, while `dev` commands reach out to our staging server API.
---

## Common Commands
## Style Guide

### Start container

To start up the application using our staging API, use the following command:

```shell
$ make up-dev
```

If you want to run the application using your local instance of the API, use the following command:

```shell
$ make up-local
```

### Build image

While currently there isn't a huge difference in what these two commands do, they are here for future scaling support and to make it easier to switch between the two. In short, if you are using the staging API, you should use the `make build-dev` command, otherwise, use the `make build-local` command. Stick to either one throughout your entire development process, to avoid duplicate images and containers being built.

```shell
$ make build-dev
```

```shell
$ make build-local
```

### Remove image

```shell
$ make rm-dev
```

```shell
$ make rm-local
```

### Enter container

This command is useful when you want to look into the Docker container and it's current files that are shared across your own OS.

```shell
$ make enter-dev
```

```shell
$ make enter-local
```

## Helper Commands

### Clean system

This command should only be used if you know what you are doing. It will remove all images, containers, cached files, and other files that are not needed for Docker's basic operation.

```shell
$ make prune
```

### List containers

```shell
$ make rncn
```

### List images

```shell
$ make img
```

### Stop all containers

```shell
$ make down
```
The front end is disctated by the style guide. You can access this document here:
[Glance EMSE Style Guide](https://www.figma.com/file/vTRSf0PF69Gc6w3VC6UKnJ/Style-Guide?node-id=0%3A1&t=Wjq1q3ai1KiWNRsh-1)
101 changes: 0 additions & 101 deletions components/common/accordion/accordion.stories.tsx

This file was deleted.

74 changes: 0 additions & 74 deletions components/common/accordion/accordion.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions components/common/assignment/assignment_panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const AssignmentPanel = ({
? moduleInformation.software.map(
(software, sfwIndex) => (
<li key={sfwIndex}>{software}</li>
)
),
)
: null}
</ul>
Expand Down Expand Up @@ -89,7 +89,7 @@ export const AssignmentPanel = ({
{mod.moduleTitle} -{' '}
{mod.assignmentTitle}
</li>
)
),
)
: null}
</ul>
Expand Down
Loading

0 comments on commit 2cec2cd

Please sign in to comment.