Skip to content

Commit

Permalink
Version Update from v0.6.0 to v0.7.0 (#353)
Browse files Browse the repository at this point in the history
* testing the styling of pagination per their documentation

* margin for PREV and NEXT pagination buttons

* styling PREV and NEXT differently than rest

* Adding chevron icons to prev and next buttons

* deleting yellow option for messages pagination

* Removed unused state.file from statusReducer, initial state for reducer, and action type for CLEAR_FILE; Included optional prop for file in FormSection; Included file for StatusNotification in place of state.file; Updated lines for UploadDocumentModal; Updated relevant typedefs

* Grouping all MUI imports together

* Issue 220 sort client list (#275)

* sort function in client list table

* takes away unused variable

* copy and sort userList copy

* delete console log

* run prettier check

* sort by family name and case fix

* fix unexpected console statement

* changed compare to arrow function

* formatting chage

* unit test added

* format changes

* testing template for russell

* wrapped component with providers attempt

* fix eslint errors

* prettier run fix attempt

* clean up test

* sort clients test added

* formatted client list table test

* sort clients test redo

* prettier format fix error

---------

Co-authored-by: Andy Williams <[email protected]>
Co-authored-by: Tim Standen <[email protected]>

* updated instructions for creating a branch and minor formatting changes

* further formatting to branching instructions

* updated terminal instructions for cloning and creating a branch

* added link to figma board in resources.md

* updated figma board to view only link

* updated instructions for CLI checking out branch

* Created new route to ClientsProfile; Created ClientsProfile page; Updated fetchProfileInfo to accept other webIds; Modified Link to Pod Profile in Clients to go to new ClientsProfile page; Updated handleSelectClient to fetch client profile data

* Create new ClientProfileInfo component for ClientsProfile page

* Increased size of profile image for client profile

* Navbar Messages route tab -> icon button

* Modified Profile page to incorporate parts of Documents page; Updated ProfileImageField component and form element styling; Minor change to DocumentTable margin

* Created new UserDocumentListContext exclusively for user documents in profile page; Created new prop for user='personal' to indicate user documents context for UploadDocumentModal, DocumentTable, and DocumentTableRow components

* Combining ClientsProfile with Profile page from PR #322; Created new prop for user in Profile page to differentiate between user and client profiles as done in PR #322; Removing unused ClientsProfile

* removing second dropdown menu in navbar for tabs/routes (no longer necessary with less routes)

* fix for navbar width

* Updated typedefs for relevant components; Included user prop to distinguish between set and request permissions for Documents and document files between Client and User Profiles; Placed dummy functions for request permissions forms in client profile page; Removed Documents page and route; Modified WebID columns in ClientListTable to Client Profile

* Updating unit test for ClientListTable to call the correct item

* Utilized user to set value and placeholder for set permission forms depending on condition

* Fix to display Tabs on mobile too

* adding same spacing for all icons

* Show verify file toggle only for clients profile page

* Made client/user distinction more clear by changing DocumentListContext to ClientDocumentListContext; Updated relevant files dependent on DocumentListContext to ClientDocumentListContext; Updated the context provider for DocumentListContext to ClientDocumentListContext

* Removing comment for webId column in ClientListTableRow

* Fix client refresh and url redirection (#281)

* update routing to remove hash parameter and improve speed of refresh

* Fix client refresh and url redirection (#281)

* update routing to remove hash parameter and improve speed of refresh

* Replaced removed solid-ui-react library with new custom hook for useSession

* Replacing static link /clients/profile to /clients/:id

* Fixed getPodUrl to use ENV; Included empty string for username as part of initial selectedUserContext to handle MUI error; Passing selectedUser directly to set permission forms as props

* Refactored Profile page to have UserProfile and ClientProfile components and render based on user; Incorporated ClientProfileInfo into ClientProfile

* Moved JSDoc typedefs from components to typedefs.js; Included JSDoc for UserProfile

* Removed unit tests for functions that utilizes username, will be phased out soon when replaced with podUrl

* Moved additional typedefs to typedefs.js; Replaced SelectedUserContext with router state to pass data to generate profile information; Reverted back to using DocumentListContext; Included function to clear selectedUser context when entering user profile; Revert back to use DocumentListContext; Included loading animation for loading profile; Included additional animation for LoadingAnimation component

* Setting restore path for profile pages

* Placed temporary solution for clearing documentList after other user revoke permissions; Include username in initial state for SelectedUserContext

* Moved setTimeout for clearInputFields for set permission forms; Removed TODO in Line 84-85 from Profile.jsx

* fix Navbar width issues on mobile

* Removed SelectedUserContext and relevant provider; Updated DocumentListContext to take in client as a state to use for loading documents; Included revokeObjectUrl function as a clean-up function to the file Blob

* Changed typedef for clientProfileProps to profileComponentProps; Combined ClientProfile with UserProfile into component called ProfileComponent; Included clientProfile as prop for ProfileComponent; Allow LoadingAnimation to take in children components for animation; Removed unused labelId for ClientListTable and ClientListTableRow; Switched link to profile to Client column in ClientList and removed Client Profile column

* Updating unit test for ClientListTable

* Dropping Go back button for client profile

* Updating long paths with Vite aliases

* Removing unused props and typedefs

* Created routine to clear Blob from browser memory after usage

* Replaced user with client object for rendering condition for set permission forms; Updated typedefs for set permission form components

* Removing unused props for DocumentTable and UploadDocumentModal

* Included finally block to run setTimeout for clearInputFields for permission forms

* Removed unused props from uploadDocumentModalProps typedefs

* Optimized parts of ProfileComponent

* Simplified ternaries in fetchProfileInfo

* Organizing states in Profile page

* Corrected new typedefs in typedefs.js

* Add Heroku Config (#326)

* updated route pathing

* Revert changes for handleShowDocumentLocal and moving changes to separate PR

* Minor change to ClientListTable margins

* Refactoring NavBar into 3 separate components

* Fixing bug where Notifications Menu did not show when clicking Notifications in mobile menu

* setting up skeletons of tests for navbars

* removing unused imports

* removing unused imports

* adding function to mock proper window size for mobile/desktop tests

* clearing unused functions and imports

* creating a user logged in/out session context to push to tests

* fixing value keys on SessionContextProvider

* destructuring in navbar children components

* fix up some tests for Scott

* Adjusted styling for three columns for ClientList

* Adjusted styling for 3 column in ClientList

* Removing extra React fragment from ProfileComponent

* Moving /clients/:webId routes to /profile/:webId with base route as route to user profile

* Adjusted fetchProfileInfo function to just take in as webId and updated relevant lines using fetchProfileInfo

* Updated JSDoc for clientProfile

* Updated ProfileComponent to allow for potential null in ProfileInputField inputValue; Included unit tests for components in /src/components/Profile; Included devDependency for @testing-library/jest-dom/extend-expect to help with component unit tests

* Removed condition for permission forms for request permissions; Restrict permission forms to user profile page with client object

* resolving errors in tests

* prettier formatting

* Combined first and second unit test for ProfileComponent

* Updated unit test for ProfileComponent

* Removing unused typedefs

* Removing unused typedefs

* Refactored ProfileEditButtonGroup out of ProfileComponent

* clean up some warnings in tests (#328)

* Included fixes for unit tests

* Fixed issue with localStorage.setItem for oidcIssuer in OidcLoginComponent; Revert temporarily fix to getPodUrl to use localStorage.getItem

* Fixed unit test; Moved localStorage.setItem for oidcIssuer outside loginHandler

* Moving localStorage.setItem inside onClick and onKeyUp for Login Button; Updated button type to button instead of submit

* Revert changes to session-core.test.js to original version

* Updated InactivityMessage.jsx

* Post update clean up with lint and prettier; Removed unused contexts; Cleaned up routes

* Fixed localStorage.setItem to trigger upon login by moving function outside logoutHandler

* Revert fix to separate PR

* Merge branch '251-update-the-inactivity-message-and-add-force-logout-on-inactivity-1' of https://github.com/codeforpdx/PASS into 251-update-the-inactivity-message-and-add-force-logout-on-inactivity-1

* Updated InactivityMessage.jsx

* Fixed feature: LoginHanlder working with enter key

* Updated InactivityMessage.jsx with useSession, and created logout timer.

* linted

* ran prettier

* Update pod server script (#344)

* add easier pod startup script

* fix link structure

* Removed onClose from modal

* clear localStorage on logout

* prettier

* Logout clears localStorage

* Updating package.json from v0.6.0 to v0.7.0

* fixed url template

* removed template

* cleaner format for github issue templates

* create PR template

* Cleaning up Development for merge to Master

* changed renderWebId function

* Revert "Fixed template in AddClientModal"

* Updated fix for OidcLoginComponent

* Updated renderWebId function

---------

Co-authored-by: veganedge <[email protected]>
Co-authored-by: Scott Brown <[email protected]>
Co-authored-by: Russell Fraze <[email protected]>
Co-authored-by: Andy Williams <[email protected]>
Co-authored-by: Tim Standen <[email protected]>
Co-authored-by: Jared Krajewski <[email protected]>
Co-authored-by: Tim Standen <[email protected]>
Co-authored-by: brancwill <[email protected]>
Co-authored-by: Radhey Chitroda <[email protected]>
  • Loading branch information
10 people authored Aug 3, 2023
1 parent 637363e commit 6164b57
Show file tree
Hide file tree
Showing 93 changed files with 5,135 additions and 7,129 deletions.
11 changes: 11 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ module.exports = {
settings: {
jsdoc: {
mode: 'typescript'
},
'import/resolver': {
alias: {
map: [
['@hooks', './src/hooks'],
['@contexts', './src/contexts'],
['@pages', './src/pages'],
['@utils', './src/utils'],
['@components', './src/components']
]
}
}
}
};
38 changes: 24 additions & 14 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,48 @@ assignees: ''

---

**Bug Title**: [Concise description of the bug]
### Bug Title:
Please provide a CONCISE description of the bug.

**Bug Description**:
Please provide a detailed description of the bug.
---
### Bug Description:
Please provide a DETAILED description of the bug.

**Reproduction Steps**:
1.
2.
3.
---
### Reproduction Steps:
**1.**
**2.** If needed, delete if not
**3.** If needed, delete if not

**Expected Behavior**:
---
### Expected Behavior:
What should have happened if the bug didn't occur.

**Actual Behavior**:
---
### Actual Behavior:
What actually happened, and how it differed from the expected behavior.

**Screenshots (If applicable)**:
---
### Screenshots (If applicable):
If possible, add screenshots to help explain the problem.

**Desktop (please complete the following information):**
---
### Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
---
### Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional Context**:
---
### Additional Context (optional):
Add any other context about the problem here.

**Possible Solution (optional)**:
---
### Possible Solution (optional):
If you have a suggestion on how to fix this bug.
14 changes: 9 additions & 5 deletions .github/ISSUE_TEMPLATE/enhancement_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@ assignees: ''

---

**Describe the Current Behavior/Feature**:
### Describe the Current Behavior/Feature:
Provide a clear and concise description of the current behavior or feature.

**Proposed Behavior/Feature**:
---
### Proposed Behavior/Feature:
A clear and concise description of the enhancement you want.

**Rationale**:
---
### Rationale:
Please outline why this enhancement is needed and how it will benefit the project.

**Proposed Implementation (if applicable)**:
---
### Proposed Implementation (if applicable):
Provide a detailed low level description of how you propose the enhancement should be implemented.

**Additional context**:
---
### Additional context:
Add any other context or screenshots about the enhancement request here.
25 changes: 16 additions & 9 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,29 @@ assignees: ''
---


**Feature Title**: [Concise description of the feature]
### Feature Title:
Please provide a CONCISE description of the proposed feature.

**Feature Description**:
Please provide a detailed description of the proposed feature.
---
### Feature Description:
Please provide a DETAILED description of the proposed feature.

**Use Case**:
---
### Use Case:
Explain when and why this feature would be used. Try to include as much detail as possible.

**Proposed Solution**:
If you have a solution in mind, please outline it here. If not, that's okay too.
---
### Proposed Solution:
If you have a solution in mind, please outline it here.

**Alternative Solutions**:
---
### Alternative Solutions:
If there are alternative ways to solve this problem, please list them here.

**Screenshots (if applicable)**:
---
### Screenshots (if applicable):
Include any screenshots that may be helpful.

**Additional Context**:
---
### Additional Context:
Please provide any other information that might be helpful.
46 changes: 46 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Pull Request
about: Create a pull request to merge your code into the PASS codebase
title: ''
labels: ''
assignees: ''

---

## CONCISE description of PR (PR Title)

---
## This PR:
**1.**
**2.** If needed, delete if not
**3.** If needed, delete if not

---
## The files this PR effects:

### Components
List file names here

### Tests
List file names here

### Other Files
List file names here

---
## Screenshots (if applicable):
Add any screenshots/videos here.

---
## Additional Context (optional):
Add any other context about the PR here.

---
## Future Steps/PRs Needed to Finish This Work (optional):
Add any other steps/PRs that may be needed to continue this work if this PR is just a step in the right direction.

---
## Issues needing discussion/feedback (optional):
**1.**
**2.** If needed, delete if not
**3.** If needed, delete if not
16 changes: 0 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,6 @@ jobs:
with:
path: './dist'

deploy:
if: github.event_name == 'push' && github.ref == 'refs/heads/Master'
name: Deploy
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

lint:
name: Lint
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: bin/start-nginx-solo
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,25 @@ PASS is currently in Development heading towards [Minimum Viable Product](./docs
```
4. PASS should launch at `http://localhost:5173`. You can now visit that url, and sign into a pod hosted at the OIDC provider of your choice.

- ### Setting up a Development Pod Server

PASS is able to connect to any solid-spec compliant pod server. However, for testing, it's recommended that you run a server locally. PASS provides tools to make this easy to do.

1. Clone and install dependencies. [See previous section](#clone-and-install-dependencies)

2. In the project's root directory, copy the `env.template` file into a `.env` file. In bash you can use this command:
```bash
cp env.template .env
```

3. Run `npm run podserver` to launch the pod server. The server will begin listening on `http://localhost:3000`, and will create a folder in the PASS project folder called `local_temp_server_files`. You can find all server and pod files there.

4. Open a browser and navigate to `http://localhost:3000`. You should encounter a screen asking you to set up the server and create an account. Create your first account, and your server will be ready for development.

5. Launch PASS with `npm run dev`. Click the `Login` button on the home page. If everything has been set up right, you should be redirected to your local pod server to finish login.

Note: The `npm run podserver` command will launch a server that stores documents on your local file system. If you don't want to store documents, and want all server data to be deleted on shutdown, you can run `npm run podserver:temp`
Further information can be found in [CONTRIBUTING.md](./docs/CONTRIBUTING.md) & [docs/README.md](./docs/README.md)
**[⬆️ Back to Top](#pass---personal-access-system-for-services)**
Expand Down
5 changes: 5 additions & 0 deletions __mocks__/@inrupt/solid-client-authn-browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { vi } from 'vitest';

export * from '@inrupt/solid-client-authn-browser';

export const login = vi.fn(() => Promise.resolve());
51 changes: 51 additions & 0 deletions config/nginx.conf.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
daemon off;
# Heroku dynos have at least 4 cores.
worker_processes <%= ENV['NGINX_WORKERS'] || 4 %>;

events {
use epoll;
accept_mutex on;
worker_connections <%= ENV['NGINX_WORKER_CONNECTIONS'] || 1024 %>;
}

http {
gzip on;
gzip_comp_level 2;
gzip_min_length 512;
gzip_proxied any; # Heroku router sends Via header

server_tokens off;

log_format l2met 'measure#nginx.service=$request_time request_id=$http_x_request_id';
access_log <%= ENV['NGINX_ACCESS_LOG_PATH'] || 'logs/nginx/access.log' %> l2met;
error_log <%= ENV['NGINX_ERROR_LOG_PATH'] || 'logs/nginx/error.log' %>;

include mime.types;
default_type application/octet-stream;
sendfile on;

# Must read the body in 5 seconds.
client_body_timeout 5;

upstream app_server {
server unix:/tmp/nginx.socket fail_timeout=0;
}

server {
listen <%= ENV["PORT"] %>;
server_name _;
keepalive_timeout 5;
root /app/dist;

location = /index.html {
add_header Cache-Control "no-store, no-cache";
try_files $uri $uri/ =404;
}

location / {
add_header 'Cache-Control' "public, max-age=3600";
try_files $uri $uri/ /index.html;
}
}
}

48 changes: 27 additions & 21 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,24 @@ By participating in this project, you are expected to uphold our [Code of Conduc

1. Clone repo to local environment in IDE of choice. If you are new to Git/GitHub you can also check out [this article](https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github) for a broad overview.
- Open terminal & change working directory to the location you want the repository cloned to.
- `git clone https://github.com/codeforpdx/PASS.git` [learn more about git clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository?platform=linux)
- `git remote add origin https://github.com/codeforpdx/PASS.git` [learn more about git remote](https://docs.github.com/en/get-started/getting-started-with-git/managing-remote-repositories)

2. Setup instructions to locally run PASS can be found in the [readme](../README.md).

3. Create a new branch to work on your feature:
- `git checkout -b <your branch name> Development` [learn more about git branches](https://www.atlassian.com/git/tutorials/using-branches/git-checkout) using the recommended naming convention `issue-\<number\>/\<branch name\>`
> Example: `issue-112/delete-client-modal`
- `git pull origin Development` - to sync with PASS Development branch
- This can also be done directly from an issue in GitHub with the following three steps(Default branch is Master and will need to be changed to Development).
- `git clone https://github.com/codeforpdx/PASS.git` [learn more about git clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository?platform=linux) This will set the git origin to `https://github.com/codeforpdx/PASS.git`. By default the branch is set to Master.
[learn more about git remote](https://docs.github.com/en/get-started/getting-started-with-git/managing-remote-repositories)
- Change directory to the cloned directory, in this case /PASS: `cd ./PASS`
- Origin can be verified by running `git remote -v` which should show:
```
origin https://github.com/codeforpdx/PASS.git (fetch)
origin https://github.com/codeforpdx/PASS.git (push)
```
1. Create a new branch to work on your feature (We recommend doing this via terminal) Branches should all be based off of `Development`:
A. `git switch Development` or `git checkout Development` - to switch to the Development branch.
B. `git checkout -b "<your branch name>"` [learn more about git branches](https://www.atlassian.com/git/tutorials/using-branches/git-checkout) using the recommended naming convention:`<issue number><branch name>` with a concise title.
> Example: `112/delete-client-modal`
> This can also be done directly from an issue in GitHub with the following three steps(Default branch is Master and will need to be changed to Development). If done manually via command line, link branch to corresponding GitHub issue.
>
> A. Create a branch by clicking `create a branch` under Development within the issues page.
>
> <img src="https://drive.google.com/uc?id=11zUuOYSkv8K0CJE_snet12YSdyLDKP8q" width="200"/>
Expand All @@ -73,27 +80,26 @@ By participating in this project, you are expected to uphold our [Code of Conduc
>
> <img src="https://drive.google.com/uc?id=1rqRkau7lxTVEcwRFc8NcHRf-Z4U_lVxb" width="200">
- If done manually via command line, link branch to corresponding GitHub issue.
- Work on feature in your own branch. Setup instructions to locally run PASS can be found in the [readme](../README.md).
1. Work on feature in your own branch.

2. When ready, push to GitHub

- `git push origin <your branch name>`

6. Code Styling/Linting
- When feature is ready:
- run `git add .` to add all changed files in commit. or `git add <fileName>` to include an individual file.
- run `git commit -m "some message abut changes in commit"` with a concise message to describe what changes are included in the push.
- push to GitHub in terminal: `git push origin <your branch name>`
1. Code Styling/Linting
Linting and formatting for this project has also been setup using ESlint and Prettier. They are included as dependencies and will be installed while following the instructions of the readme. To lint your changes with ESLint follow the instructions [here](./README.md#linting)
- ## Submitting a Pull Request
If you are new to GitHub and/or the team, feel free to make your first pull request on the README/Contributing documentation to familiarize yourself with the project and GitHub. Add any comments and/or feedback and request reviews.
1. Make a [pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review) to the `Development` branch. Request reviews from members of the team - you’ll need their approval to merge. \*\*Make sure to close your branch once merged.
- Make a [pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review) to the `Development` branch. Request reviews from members of the team - you’ll need their approval to merge. \*\*Make sure to close your branch once merged.
- Recommended reviewers:
- Development -- Jared K, Ka Hung L., Kevin M., Tim S., Scott B.
- Documentation -- Danica B, Jared K, Ka Hung L.
- Development -- Jared K, Ka Hung L, Kevin M, Tim S, Scott B
- Documentation -- Jared K, Ka Hung L
- Include screenshots whenever you’re building a frontend feature.
- ## Bug Reporting Template
Expand Down
2 changes: 2 additions & 0 deletions docs/RESOURCES.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
![tech stack](https://drive.google.com/uc?id=1Vkn9hGlSyv6Y9tY_R6SfEGoj5MJTGDDy)

---
## Design Board
- [Figma Design Board](https://www.figma.com/file/BfsGjGbFUVvtqNq18sykoY/Pass-Project?type=design&node-id=1216%3A2986&mode=design&t=6wwtu9VDctN6SvkL-1) contains UX design for the PASS project.

## Additional Resources

Expand Down
1 change: 1 addition & 0 deletions env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_SOLID_IDENTITY_PROVIDER="http://localhost:3000/"
1 change: 0 additions & 1 deletion env_templates/README.md

This file was deleted.

1 change: 0 additions & 1 deletion env_templates/dev.env

This file was deleted.

Loading

0 comments on commit 6164b57

Please sign in to comment.