Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mobile dropdown development #3

Merged
merged 27 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2bd1a0b
Add deployment script
nicojs Mar 13, 2024
2e4b765
fix 1
nicojs Mar 13, 2024
e9d99e9
fix 2
nicojs Mar 13, 2024
300c4e5
CI reuse .env.example
nicojs Mar 13, 2024
7a6246e
fix 5
nicojs Mar 13, 2024
6d76ab1
Fix 6
nicojs Mar 13, 2024
0208941
fix 7
nicojs Mar 13, 2024
2451379
fix 8
nicojs Mar 13, 2024
44d607e
Add or update the Azure App Service build and deployment workflow config
nicojs Mar 13, 2024
d9898bc
Fix 9
nicojs Mar 13, 2024
0f11d61
Document stuff
nicojs Mar 14, 2024
7c28087
Switch `pnpm` to `npm`
nicojs Mar 14, 2024
a4d7ee2
fix 10
nicojs Mar 14, 2024
af64c84
Remove bootstrap
nicojs Mar 14, 2024
ab0117c
Preserve symlinks... again
nicojs Mar 14, 2024
b64b9a2
fix hydration issue caused by screensize hook
JurreBrandsenInfoSupport Mar 14, 2024
4ad84fc
Merge branch 'chore/deploy' of github.com:infosupport/tech-survey int…
JurreBrandsenInfoSupport Mar 14, 2024
8b0790f
Working mobile dropdown
JurreBrandsenInfoSupport Mar 14, 2024
00ca672
working mobile dropdown selection for roles
JurreBrandsenInfoSupport Mar 14, 2024
1d3a8f9
Updated the SVG fillRule and clipRule to match react standard
JurreBrandsenInfoSupport Mar 14, 2024
cb20cb4
also updated the other svg
JurreBrandsenInfoSupport Mar 14, 2024
53a7b15
fix for not selecting default role
JurreBrandsenInfoSupport Mar 14, 2024
38337d2
fix for the default role overwriting any existing roles
JurreBrandsenInfoSupport Mar 14, 2024
143f152
we now store your screensize in the localstorage. This causes it not …
JurreBrandsenInfoSupport Mar 14, 2024
0b052d6
mobile users now have better feedback on their progression
JurreBrandsenInfoSupport Mar 14, 2024
2913e8d
mobile users now have even better feedback on their progression
JurreBrandsenInfoSupport Mar 14, 2024
ef09b34
updated CI.yml
JurreBrandsenInfoSupport Mar 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 31 additions & 31 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
# When adding additional environment variables, the schema in "/src/env.js"
# should be updated accordingly.

# Prisma
# https://www.prisma.io/docs/reference/database-reference/connection-urls#env
DATABASE_URL=""


POSTGRES_USER=""
POSTGRES_PASSWORD=""
POSTGRES_DB=""
POSTGRES_HOST=""

# Next Auth
# You can generate a new secret on the command line with:
# openssl rand -base64 32
# https://next-auth.js.org/configuration/options#secret
NEXTAUTH_SECRET=""
NEXTAUTH_URL="http://localhost:3000"

# Next Auth Discord Provider
DISCORD_CLIENT_ID=""
DISCORD_CLIENT_SECRET=""

# Next Auth Azure-AD Provider
AZURE_AD_CLIENT_ID=""
AZURE_AD_CLIENT_SECRET=""
AZURE_AD_TENANT_ID=""



# When adding additional environment variables, the schema in "/src/env.js"
# should be updated accordingly.
# Prisma
# https://www.prisma.io/docs/reference/database-reference/connection-urls#env
DATABASE_URL="dummy"
POSTGRES_USER="dummy"
POSTGRES_PASSWORD="dummy"
POSTGRES_DB="dummy"
POSTGRES_HOST=dummy""
# Next Auth
# You can generate a new secret on the command line with:
# openssl rand -base64 32
# https://next-auth.js.org/configuration/options#secret
NEXTAUTH_SECRET="dummy"
NEXTAUTH_URL="http://localhost:3000"
# Next Auth Discord Provider
DISCORD_CLIENT_ID="dummy"
DISCORD_CLIENT_SECRET="dummy"
# Next Auth Azure-AD Provider
AZURE_AD_CLIENT_ID="dummy"
AZURE_AD_CLIENT_SECRET="dummy"
AZURE_AD_TENANT_ID="dummy"
74 changes: 37 additions & 37 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
/** @type {import("eslint").Linter.Config} */
const config = {
parser: "@typescript-eslint/parser",
parserOptions: {
project: true,
},
plugins: ["@typescript-eslint"],
extends: [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
],
rules: {
// These opinionated rules are enabled in stylistic-type-checked above.
// Feel free to reconfigure them to your own preference.
"@typescript-eslint/array-type": "off",
"@typescript-eslint/consistent-type-definitions": "off",

"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/require-await": "off",
"@typescript-eslint/no-misused-promises": [
"error",
{
checksVoidReturn: { attributes: false },
},
],
},
};

module.exports = config;
/** @type {import("eslint").Linter.Config} */
const config = {
parser: "@typescript-eslint/parser",
parserOptions: {
project: true,
},
plugins: ["@typescript-eslint"],
extends: [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
],
rules: {
// These opinionated rules are enabled in stylistic-type-checked above.
// Feel free to reconfigure them to your own preference.
"@typescript-eslint/array-type": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/require-await": "off",
"@typescript-eslint/no-misused-promises": [
"error",
{
checksVoidReturn: { attributes: false },
},
],
},
};
module.exports = config;
80 changes: 37 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,37 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

env:
POSTGRES_HOST: your_postgres_host
POSTGRES_USER: your_postgres_user
POSTGRES_PASSWORD: your_postgres_password
POSTGRES_DB: your_postgres_db
DISCORD_CLIENT_ID: your_discord_client_id
DISCORD_CLIENT_SECRET: your_discord_client_secret
AZURE_AD_CLIENT_ID: your_azure_ad_client_id
AZURE_AD_CLIENT_SECRET: your_azure_ad_client_secret
AZURE_AD_TENANT_ID: your_azure_ad_tenant_id
NODE_ENV: development

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4

- name: Install dependencies
run: |
npm install -g pnpm
pnpm install

- name: TypeScript type checking
run: pnpm typecheck

- name: Linting
run: pnpm lint
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4

- name: Install dependencies
run: npm install

- name: Prepare
run: |
cp .env.example .env
npm run db:generate

- name: TypeScript type checking
run: npm run typecheck

- name: Linting
run: npm run lint

- name: Build
run: npm run build
61 changes: 61 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Deploy

on:
push:
branches:
- chore/deploy
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js version
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: npm install, build, and test
run: |
npm ci
cp .env.example .env # an env file is needed for `build`
npm run db:generate
npm run build
npm ci --prod
rm .env
- name: Zip artifact for deployment
# `./*`: the current directory
# `.next`: explicitly also zip this hidden directory.
# `-r`: recursive
# `-y`: preserve symlinks
run: zip -y release.zip ./* .next -r
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
with:
name: node-app
path: release.zip

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: 'production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
permissions:
id-token: write #This is required for requesting the JWT
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: node-app
- name: Unzip artifact for deployment
run: unzip release.zip
- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'tech-survey-web'
slot-name: 'production'
package: .
publish-profile: ${{ secrets.AZURE_APP_SERVICE_PUBLISH_PROFILE }}
84 changes: 42 additions & 42 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# database
/prisma/db.sqlite
/prisma/db.sqlite-journal

# next.js
/.next/
/out/
next-env.d.ts

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
# do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables
.env
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# database
/prisma/db.sqlite
/prisma/db.sqlite-journal
# next.js
/.next/
/out/
next-env.d.ts
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# local env files
# do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables
.env
.env*.local
# vercel
.vercel
# typescript
*.tsbuildinfo
Loading