Skip to content

Commit

Permalink
Data setup (#74)
Browse files Browse the repository at this point in the history
* Feat/8 Logout (#39)

* move global into src, instead of app folder

* add some components

* configure uikit, emotion and typings

* uikit happy

* Basic Env Vars

* Populating Basic Configs

* cleanup

* add theme provider

* emotion imports

* emotion uikit style tpying

* First Working Test

* Working Redirect w/ URL Join

* remove DataCallout uikit re-export wrapper

* Basic Reusable Component

* Remove .env

* Update .gitignore

* Remove Duplicate

* Stage for UI Kit

* Loading Test w/ UI Kit

* NavBar Setup

* Fix Landing Page

* Remove Next logo

* Skeleton Cookies

* Basic Logout

* AuthContext Setup

* AuthContext Simplest State

* Generic Vars

* Major Update w/ Logout + UI Kit

* Testing Context + State

* Add Copyrights

* Update TypeScript, Imports, File Structure

* Login Button Component

* Use AuthContextValue

* Use GoogleLogin

* Use URL Join

* Local .env updates

* Remove Boilerplate

* Shuffle Files Around

* Refactor w/o Context

* Remove Logging

* Fix env settings

* Add React Query + Mock Login State

* Add Copyright

* Current Working State

* Fix User Badge

* Temporary Login Solution

* Clean Up State Changes

* Remove Redirect

* Cleaned Up User Badge

* Basic Pathname Solution

* Cleaned Up Login Flow

* Improved Layout + Header Handling

* Remove vscode from gitignore

* Fix /public import

* Update page names

* Refactor Auth / Layout

* General Clean Up

* Stub Middleware

* Tidying

* Middleware + Auth Route Setup - Infinite Loop

* Current State - Testing

* Children prop cleanup

* Header UI Updates

* Current Working State

* Clean Up Use of Stored Token

* Remove extra storedToken

* First Lint Changes

* Hook + Middleware Cleanup

* Better fallback, LoggingIn dependency

* Move Middleware to Feature Branch

* Unnecesary changes

* Remove Server side token management

* First Setup

* Log Out Update

* Updated Var name + Conditional

* Improve Loading Var Names + Reusable Logout

* Use Context logOut

* Remove Dummy Logout Button

* 1st Header PR Feedback

* Remove Unused Imports

* Fix Build Issues

* ProfileMenu Component

* Reusable Login

---------

Co-authored-by: Ciaran Schutte <[email protected]>
Feat/#14 programs list page (#47)

* add submission layout

* add some components

* add All Programs layout

* skeleton

* cleanup + add linking for programs

* remove sidemenu logic for PR

* remove program list and search func for PR

* fix type error

* mmove types around

* fix build

* clean import

---------

Co-authored-by: Ciaran Schutte <[email protected]>
add All Programs layout

skeleton

cleanup + add linking for programs

remove sidemenu logic for PR

remove program list and search func for PR

use route groups

content additions to sidemenu

poor mans sidebar toggle

Revert "Merge branch 'develop' into sidemenu-layout-restructure"

This reverts commit 640bb4b.

clean up

add sidemenu toggle

fix build

lots of styling

add page count

add table comps, fix font

fix percent cell

table updates

sidemenu

styling

styling

cleanup

cleanup

* add gql and apollo

* add gql codegen

* gql data

* Update version to 0.5.0

Homepage feedback (#68)

* fix footer placement links

* fix high res layout not expanding data callout

* use chevron icon

* Update Footer.tsx

---------

Co-authored-by: Ciaran Schutte <[email protected]>

* add apollo custom auth link

remove slice of Programs in comps

add sidemenu query

* cleanup App

* codegen

* work

manually fix history compared to dev

manually fix history compared to dev

* move app config provider

* update App hooks ref

* cleanup data fetching

* fix generating types. add checks to satify types

* fix build errors

* add readme and build step

* remove tie in with build from gql compule

* remove old file

* remove unused types

---------

Co-authored-by: Ciaran Schutte <[email protected]>
  • Loading branch information
ciaranschutte and Ciaran Schutte authored Aug 22, 2023
1 parent be0d258 commit 2d0e645
Show file tree
Hide file tree
Showing 32 changed files with 7,709 additions and 303 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ docker compose file for local development
created an `.env` file based on `.env.schema`
in `compose` folder, run `docker-compose up` command

## Apollo GQL Typechecking

Please recompile Apollo GQL when needed using the `npm run gql-compile` command

## Learn More

To learn more about Next.js, take a look at the following resources:
Expand Down
41 changes: 41 additions & 0 deletions codegen.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright (c) 2023 The Ontario Institute for Cancer Research. All rights reserved
*
* This program and the accompanying materials are made available under the terms of
* the GNU Affero General Public License v3.0. You should have received a copy of the
* GNU Affero General Public License along with this program.
* If not, see <http://www.gnu.org/licenses/>.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
* SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

import { CodegenConfig } from '@graphql-codegen/cli';
import dotenv from 'dotenv';

// point to .env.local because .env in nextjs is a default committed file
dotenv.config({ path: '.env.local' });

const gqlConfig: CodegenConfig = {
schema: `${process.env.NEXT_PUBLIC_GATEWAY_API_ROOT}/graphql`,
documents: ['src/**/gql/*.ts'],
generates: {
'./src/__generated__/': {
preset: 'client',
plugins: [],
presetConfig: {
gqlTagName: 'gql',
},
},
},
ignoreNoDocuments: true,
};

export default gqlConfig;
Loading

0 comments on commit 2d0e645

Please sign in to comment.