Skip to content

Commit

Permalink
Merge branch 'v3' of github.com:uzh-bf/klicker-uzh into firebase-push…
Browse files Browse the repository at this point in the history
…-notifications
  • Loading branch information
BShaq committed Sep 20, 2023
2 parents 00b5102 + ba7cde7 commit 704482f
Show file tree
Hide file tree
Showing 89 changed files with 1,411 additions and 677 deletions.
93 changes: 93 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,99 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [3.0.0-rc.66](https://github.com/uzh-bf/klicker-uzh/compare/v3.0.0-rc.65...v3.0.0-rc.66) (2023-09-19)


### Bug Fixes

* **apps/func-incoming-responses:** add ping sessionId to ping message ([e867ea4](https://github.com/uzh-bf/klicker-uzh/commit/e867ea474212f16c1e292f6cb62e3c508b41c95a))

## [3.0.0-rc.65](https://github.com/uzh-bf/klicker-uzh/compare/v3.0.0-rc.64...v3.0.0-rc.65) (2023-09-19)


### Bug Fixes

* **apps/func-response-processor:** always return 200 on ping ([b32986e](https://github.com/uzh-bf/klicker-uzh/commit/b32986ecc92b450f2e4d22b2586803db6c8fe26c))

## [3.0.0-rc.64](https://github.com/uzh-bf/klicker-uzh/compare/v3.0.0-rc.63...v3.0.0-rc.64) (2023-09-19)


### Bug Fixes

* **apps/frontend-manage:** fix preview for kprim questions ([#3846](https://github.com/uzh-bf/klicker-uzh/issues/3846)) ([e846606](https://github.com/uzh-bf/klicker-uzh/commit/e84660661e9be1e49050c37e927e8d470273bfef))
* **apps/func-incoming-responses:** try/catch around cookie parsing in incoming responses ([9ebae9d](https://github.com/uzh-bf/klicker-uzh/commit/9ebae9d771fa53ea3416be8c27e02d47d87953d9))


### Enhancements

* **apps/frontend-manage:** session quick start and session cockpit improvements ([1183830](https://github.com/uzh-bf/klicker-uzh/commit/118383060745598acb541ded7f2504318de70a4a))

## [3.0.0-rc.63](https://github.com/uzh-bf/klicker-uzh/compare/v3.0.0-rc.62...v3.0.0-rc.63) (2023-09-17)


### Bug Fixes

* **packages/graphql:** logout the participant when deleting the account ([c954fdf](https://github.com/uzh-bf/klicker-uzh/commit/c954fdf7afc7be4a6ed8290b3974e6a3cfbf17ba))

## [3.0.0-rc.62](https://github.com/uzh-bf/klicker-uzh/compare/v3.0.0-rc.61...v3.0.0-rc.62) (2023-09-17)


### Bug Fixes

* **apps/frontend-pwa:** allow input of email if account exists but no email set ([0b1a8e6](https://github.com/uzh-bf/klicker-uzh/commit/0b1a8e6f0722dfc6704867625bc432a817467cd1))

## [3.0.0-rc.61](https://github.com/uzh-bf/klicker-uzh/compare/v3.0.0-rc.60...v3.0.0-rc.61) (2023-09-17)


### Enhancements

* **apps/frontend-pwa:** add confirmation modal when leaving the course leaderboard ([b6744f2](https://github.com/uzh-bf/klicker-uzh/commit/b6744f2923d08a43e8b6ffe6a891d2ae9ab85aed))

## [3.0.0-rc.60](https://github.com/uzh-bf/klicker-uzh/compare/v3.0.0-rc.59...v3.0.0-rc.60) (2023-09-17)


### Bug Fixes

* **apps/frontend-manage:** NumberField for bin count ([c759c68](https://github.com/uzh-bf/klicker-uzh/commit/c759c68f921480b656016c3c822dfacdc6637273))


### Dependencies

* upgrade turbo ([fd19c63](https://github.com/uzh-bf/klicker-uzh/commit/fd19c63841e94eeb8fe9168303c7202836060264))

## [3.0.0-rc.59](https://github.com/uzh-bf/klicker-uzh/compare/v3.0.0-rc.58...v3.0.0-rc.59) (2023-09-17)


### Bug Fixes

* **apps/frontend-manage:** cancel session refetches related queries ([dafffd3](https://github.com/uzh-bf/klicker-uzh/commit/dafffd3b8367fce1805c2c741fc387255c90d590))
* **apps/func-*:** ensure only participant logins are processed in response functions ([1cc7de6](https://github.com/uzh-bf/klicker-uzh/commit/1cc7de6da9e26803c70cd7400d7131a9cdb42445))
* **packages/graphql:** cancel session should delete cache ([2ed9ad8](https://github.com/uzh-bf/klicker-uzh/commit/2ed9ad823821a8525fb539d48c3041ca1aa01e81))
* **packages/graphql:** use update instead of updateMany for cancelSession ([ab52871](https://github.com/uzh-bf/klicker-uzh/commit/ab52871801dcca7a20f77c364a5c7e20336048b5))

## [3.0.0-rc.58](https://github.com/uzh-bf/klicker-uzh/compare/v3.0.0-rc.57...v3.0.0-rc.58) (2023-09-16)


### Bug Fixes

* **apps/frontend-manage:** fix catalyst links ([9da5607](https://github.com/uzh-bf/klicker-uzh/commit/9da5607a698ecccc7c5502ce057b5e9119bba43d))
* **apps/frontend-pwa:** prose on course information text ([c1b8b3b](https://github.com/uzh-bf/klicker-uzh/commit/c1b8b3b6515f14a3181852cbaee9361481256d87))


### Enhancements

* **apps/frontend-manage:** ensure that there are exactly four answers for kprim questions ([#3842](https://github.com/uzh-bf/klicker-uzh/issues/3842)) ([0f762f2](https://github.com/uzh-bf/klicker-uzh/commit/0f762f238a1469c288c299571accd330323e5762))
* **apps/frontend-manage:** gamification displayed on course details page, hide leaderboard if disabled ([1cc8d7a](https://github.com/uzh-bf/klicker-uzh/commit/1cc8d7af27ee50446d522c76970de13521145a2b))
* **apps/frontend-manage:** improve multistep wizard layout ([2764e6d](https://github.com/uzh-bf/klicker-uzh/commit/2764e6d06bb87c7a127ea096e4497fce8dc3be05))

## [3.0.0-rc.57](https://github.com/uzh-bf/klicker-uzh/compare/v3.0.0-rc.56...v3.0.0-rc.57) (2023-09-15)


### Bug Fixes

* **apps/frontend-pwa:** update WEB PUSH PUBLIC KEY ([be63841](https://github.com/uzh-bf/klicker-uzh/commit/be6384180dfb0e2efee40b26470a17af532424f9))
* **deploy:** NOTIFICATION_SUPPORT_MAIL ([4892e9e](https://github.com/uzh-bf/klicker-uzh/commit/4892e9e00860a5e9c4b75af3d8a0bc058e412340))

## [3.0.0-rc.56](https://github.com/uzh-bf/klicker-uzh/compare/v3.0.0-rc.55...v3.0.0-rc.56) (2023-09-14)


Expand Down
3 changes: 3 additions & 0 deletions _d_down.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

docker compose down postgres redis_exec redis_cache reverse_proxy
20 changes: 20 additions & 0 deletions _d_run_app_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

# load port forwarding config on macOS
sudo pfctl -ef /etc/pf.conf

# enable pnpm support in volta
grep -qxF 'export VOLTA_FEATURE_PNPM=1' ~/.zshrc || echo 'export VOLTA_FEATURE_PNPM=1' >> ~/.zshrc
grep -qxF 'alias pn=pnpm' ~/.zshrc || echo 'alias pn=pnpm' >> ~/.zshrc

# add hosts
# sudo grep -qxF '127.0.0.1 api.klicker.com' ~/.zshrc || sudo echo '127.0.0.1 api.klicker.com' >> ~/.zshrc
# sudo grep -qxF '127.0.0.1 pwa.klicker.com' ~/.zshrc || sudo echo '127.0.0.1 pwa.klicker.com' >> ~/.zshrc
# sudo grep -qxF '127.0.0.1 manage.klicker.com' ~/.zshrc || sudo echo '127.0.0.1 manage.klicker.com' >> ~/.zshrc
# sudo grep -qxF '127.0.0.1 control.klicker.com' ~/.zshrc || sudo echo '127.0.0.1 control.klicker.com' >> ~/.zshrc
# sudo grep -qxF '127.0.0.1 auth.klicker.com' ~/.zshrc || sudo echo '127.0.0.1 auth.klicker.com' >> ~/.zshrc
# sudo grep -qxF '127.0.0.1 func-responses.klicker.com' ~/.zshrc || sudo echo '127.0.0.1 func-responses.klicker.com' >> ~/.zshrc
# sudo grep -qxF '127.0.0.1 func-response-processor.klicker.com' ~/.zshrc || sudo echo '127.0.0.1 func-response-processor.klicker.com' >> ~/.zshrc

# start postgres, redis, and reverse proxy
docker compose up postgres redis_exec redis_cache reverse_proxy_docker
3 changes: 3 additions & 0 deletions _d_run_migration_services.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

docker compose up listmonk listmonk_db mailhog
2 changes: 1 addition & 1 deletion apps/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@klicker-uzh/prisma": "workspace:*",
"@klicker-uzh/shared-components": "workspace:*",
"@next-auth/prisma-adapter": "1.0.7",
"@uzh-bf/design-system": "2.1.4",
"@uzh-bf/design-system": "2.1.6",
"bcryptjs": "2.4.3",
"js-cookie": "3.0.5",
"jsonwebtoken": "9.0.1",
Expand Down
9 changes: 4 additions & 5 deletions apps/auth/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
import { getMessageFallback, onError } from '@klicker-uzh/i18n'
import { sourceSansPro } from '@klicker-uzh/shared-components/src/font'
import { SessionProvider } from 'next-auth/react'
import { NextIntlProvider } from 'next-intl'
import type { AppProps } from 'next/app'
import { Source_Sans_3 } from 'next/font/google'
import { useRouter } from 'next/router'

import '@/styles/globals.css'

const sourceSans3 = Source_Sans_3({ subsets: ['latin'] })

export default function App({
Component,
pageProps: { session, ...pageProps },
}: AppProps) {
const { locale } = useRouter()

return (
<div id="__app" className="font-sans">
<div id="__app" className={`${sourceSansPro.variable} font-sans`}>
<NextIntlProvider
messages={pageProps.messages}
locale={locale}
Expand All @@ -30,7 +28,8 @@ export default function App({

<style jsx global>{`
:root {
--theme-font-primary: ${sourceSans3.style.fontFamily};
--source-sans-pro: ${sourceSansPro.variable};
--theme-font-primary: ${sourceSansPro.variable};
}
#__app {
Expand Down
14 changes: 8 additions & 6 deletions apps/auth/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ function SignInOutButton() {
/>
</Button>
<Button
className={{ root: 'disabled:opacity-50' }}
className={{
root: 'disabled:opacity-50 justify-center italic',
}}
disabled={!tosChecked}
data={{ cy: 'delegated-login-button' }}
onClick={() =>
Expand All @@ -120,9 +122,9 @@ export function Index() {
const t = useTranslations()

return (
<div className="m-auto flex max-w-md flex-grow flex-col md:!flex-grow-0 md:rounded-lg md:border md:shadow">
<div className="m-auto flex w-full md:max-w-2xl flex-grow flex-col md:!flex-grow-0 md:rounded-lg md:border md:shadow">
<div className="flex flex-1 flex-col items-center justify-center gap-8 md:p-8">
<div className="w-full border-b pb-4 text-center">
<div className="w-full px-5 sm:px-8 border-b pb-4 text-center">
<Image
src="/KlickerLogo.png"
width={300}
Expand All @@ -132,7 +134,7 @@ export function Index() {
data-cy="login-logo"
/>
</div>
<div className="w-full flex flex-row justify-between">
<div className="w-full px-6 sm:px-10 md:mx-0 flex flex-row justify-between">
<H1 className={{ root: 'mb-0' }}>{t('auth.authentication')}</H1>
<div>
<LanguageChanger
Expand All @@ -146,12 +148,12 @@ export function Index() {
/>
</div>
</div>
<div>
<div className="w-full px-6 sm:px-10">
<SignInOutButton />
</div>
</div>
<div className="w-full flex-none">
<Footer />
<Footer className="!text-xs" />
</div>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion apps/auth/src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@import '@klicker-uzh/shared-components/dist/utilities.css';

html {
font-size: 18px;
font-size: 16px;
}

:root {
Expand Down
4 changes: 2 additions & 2 deletions apps/backend-docker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@klicker-uzh/backend-docker",
"version": "3.0.0-rc.56",
"version": "3.0.0-rc.66",
"license": "AGPL-3.0",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -45,7 +45,7 @@
"@types/node": "^18.17.4",
"@types/passport": "^1.0.10",
"@types/passport-jwt": "^3.0.6",
"@uzh-bf/design-system": "2.1.4",
"@uzh-bf/design-system": "2.1.6",
"axios": "1.4.0",
"cross-env": "7.0.3",
"dotenv": "16.0.3",
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@klicker-uzh/docs",
"version": "3.0.0-rc.56",
"version": "3.0.0-rc.66",
"license": "AGPL-3.0",
"dependencies": {
"@docusaurus/core": "3.0.0-alpha.0",
Expand All @@ -20,7 +20,7 @@
"@gabrielcsapo/docusaurus-plugin-matomo": "0.1.2",
"@mdx-js/react": "2.3.0",
"@tsconfig/docusaurus": "1.0.5",
"@uzh-bf/design-system": "2.1.4",
"@uzh-bf/design-system": "2.1.6",
"autoprefixer": "10.4.14",
"cross-env": "7.0.3",
"nodemon": "3.0.1",
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend-control/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@klicker-uzh/frontend-control",
"version": "3.0.0-rc.56",
"version": "3.0.0-rc.66",
"license": "AGPL-3.0",
"dependencies": {
"@apollo/client": "3.8.3",
Expand All @@ -17,7 +17,7 @@
"@klicker-uzh/shared-components": "workspace:*",
"@sentry/nextjs": "7.61.1",
"@socialgouv/matomo-next": "1.6.1",
"@uzh-bf/design-system": "2.1.4",
"@uzh-bf/design-system": "2.1.6",
"body-parser": "1.20.2",
"cross-env": "7.0.3",
"dayjs": "1.11.9",
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions apps/frontend-manage/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@klicker-uzh/frontend-manage",
"version": "3.0.0-rc.56",
"version": "3.0.0-rc.66",
"license": "AGPL-3.0",
"dependencies": {
"@apollo/client": "3.8.3",
Expand All @@ -17,7 +17,7 @@
"@klicker-uzh/prisma": "workspace:*",
"@klicker-uzh/shared-components": "workspace:*",
"@socialgouv/matomo-next": "1.6.1",
"@uzh-bf/design-system": "2.1.4",
"@uzh-bf/design-system": "2.1.6",
"d3": "7.8.4",
"dayjs": "1.11.9",
"deepmerge": "4.3.1",
Expand Down
3 changes: 0 additions & 3 deletions apps/frontend-manage/src/components/common/ContentInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ interface Props {
content?: string
editor?: string
}
key?: string
data_cy?: string
}

Expand All @@ -74,7 +73,6 @@ function ContentInput({
error = '',
touched,
className,
key,
data_cy,
}: Props): React.ReactElement {
const t = useTranslations()
Expand All @@ -100,7 +98,6 @@ function ContentInput({
>
{/* eslint-disable-next-line react/no-children-prop */}
<Slate
key={key}
editor={editor}
value={editorValue}
onChange={(newValue) => onChange(convertToMd(newValue))}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { useMutation } from '@apollo/client'
import { CreateCourseDocument } from '@klicker-uzh/graphql/dist/ops'
import {
CreateCourseDocument,
GetUserCoursesDocument,
} from '@klicker-uzh/graphql/dist/ops'
import {
Button,
FormikColorPicker,
Expand Down Expand Up @@ -82,6 +85,11 @@ function CourseCreationModal({
endDate: values.endDate + 'T23:59:59.999Z',
isGamificationEnabled: values.isGamificationEnabled,
},
refetchQueries: [
{
query: GetUserCoursesDocument,
},
],
})

if (result.data?.createCourse) {
Expand Down
11 changes: 11 additions & 0 deletions apps/frontend-manage/src/components/evaluation/TableChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ function TableChart({
return (
<div>
<Table
key={data.id}
forwardedRef={ref}
data={tableData}
columns={columns}
Expand All @@ -120,6 +121,16 @@ function TableChart({
tableHeader: textSize,
body: `${textSize}`,
}}
defaultSortField={
!QUESTION_GROUPS.CHOICES.includes(data.questionData.type)
? 'count'
: undefined
}
defaultSortOrder={
!QUESTION_GROUPS.CHOICES.includes(data.questionData.type)
? 'desc'
: undefined
}
/>
{anythingSortable && (
<Button
Expand Down
Loading

0 comments on commit 704482f

Please sign in to comment.