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

wip: integration tests #441

Draft
wants to merge 280 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
280 commits
Select commit Hold shift + click to select a range
1ac3a6c
fix generate_seeding_data.sh nested uploads-dir, also add echo
kahlstrm Mar 14, 2024
8fbd6dd
db:clear also remove uploads-directory
kahlstrm Mar 14, 2024
0641d27
fix production to use cloud storage again
kahlstrm Mar 18, 2024
23db029
Bump the patches group with 3 updates
dependabot[bot] Mar 18, 2024
e072429
add next-international for i18n
MikaelSiidorow Mar 20, 2024
3e1158c
fix nav menu width with scroll bar visible
MikaelSiidorow Mar 20, 2024
b3aa5d4
events list and event page ilmomasiina integration
MikaelSiidorow Feb 22, 2024
3c314c3
add ilmomasiina i18n
MikaelSiidorow Mar 20, 2024
b260624
fiX: hide empty open quota
MikaelSiidorow Mar 20, 2024
1ee701e
chore: update deps
MikaelSiidorow Mar 20, 2024
a00382d
update lockfile
MikaelSiidorow Mar 20, 2024
dbf5351
revalidate ilmomasiina fetches more / shorter cache
MikaelSiidorow Mar 20, 2024
aa89e0c
add pagination to landing page event display
MikaelSiidorow Feb 22, 2024
f8ffdff
add i18n to pagination
MikaelSiidorow Mar 22, 2024
8086a6b
fix page queries only querying by slug, query by path
MikaelSiidorow Mar 23, 2024
ddc4459
update dependencies
MikaelSiidorow Apr 4, 2024
d849ae5
fix lint warnings
MikaelSiidorow Apr 4, 2024
b2a9876
add redirect and events list special page
MikaelSiidorow Apr 4, 2024
30ddc1d
seed data example events page and redirect + main nav
MikaelSiidorow Apr 4, 2024
6dccbe9
fix lexical rich text types
MikaelSiidorow Apr 4, 2024
a72b55e
add cool icon to committee chairs
MikaelSiidorow Apr 4, 2024
8e0e297
feat: add actions view
joonatanaatos Feb 15, 2024
d925989
feat: Committee import functionality
joonatanaatos Feb 22, 2024
ae2ad83
feat: custom endpoint for importing committees
joonatanaatos Mar 7, 2024
0c06b2c
fix: organize committee import functionality better
joonatanaatos Apr 5, 2024
0db5d3d
chore: add boards and committees until 2019
joonatanaatos Apr 5, 2024
bf4e563
fix: increase data fetcher limit to 100
joonatanaatos Apr 5, 2024
83bc37b
chore: remove unused dependency
joonatanaatos Apr 5, 2024
a893179
EventList: add missing locale in pagination links
kahlstrm Apr 7, 2024
5294c51
chore: update dependencies
MikaelSiidorow Apr 17, 2024
1645029
hide pagination if there is only one page
MikaelSiidorow May 5, 2024
d55f56a
chore: update dependencies, explicitly define peer dep versions, allo…
MikaelSiidorow May 5, 2024
219becc
update types to be more specific
MikaelSiidorow May 5, 2024
4b4723b
debug ci
MikaelSiidorow May 5, 2024
3e8ae2c
update pnpm in CI
MikaelSiidorow May 5, 2024
179826b
cache turborepo on CI
MikaelSiidorow May 5, 2024
abf584c
add CI badge to readme
MikaelSiidorow May 5, 2024
6431b68
sync pnpm versions in CI and package.json
MikaelSiidorow May 7, 2024
cdb3d1f
Bump the patches group across 1 directory with 2 updates
dependabot[bot] May 7, 2024
530c64a
update recommended vscode settings [skip-ci]
MikaelSiidorow May 7, 2024
2de304b
test CI skipping [skip ci]
MikaelSiidorow May 7, 2024
8629aa4
copy paste hairinta pages from prod, add links to main nav
MikaelSiidorow May 9, 2024
6c8de16
fix event page on small screen
MikaelSiidorow May 9, 2024
d974943
change sign up to read more
MikaelSiidorow May 9, 2024
ab964e2
Add phonenumber field to board-member
lanttu1243 May 9, 2024
09fbc3c
Add phone number for BoardMemberCard
lanttu1243 May 9, 2024
408d58a
fix lint errors
lanttu1243 May 9, 2024
245cbf2
Format branch
lanttu1243 May 9, 2024
bd92f02
change phonenumber to camelcase
lanttu1243 May 9, 2024
511cbbc
Alphabetise Icon imports
lanttu1243 May 9, 2024
e6c21cd
lint and format
lanttu1243 May 9, 2024
bfb3a89
lint and format
lanttu1243 May 9, 2024
9d180a7
reset default user password on restart
kahlstrm May 9, 2024
9b65bca
add bottom margin to mobile nav to not hide links below screen
MikaelSiidorow May 9, 2024
f5e0369
replace scroll area with native scroll overflow for more consistent b…
MikaelSiidorow May 9, 2024
14c3ee6
increase toc z-index
MikaelSiidorow May 9, 2024
f950897
truncate mobile toc text to always show chevron
MikaelSiidorow May 9, 2024
fe7fcdc
insert soft breaks and hyphens to all rich text, add soft break to lo…
MikaelSiidorow May 9, 2024
63bb204
make main and toc nav behavior more responsive, close toc on press ou…
MikaelSiidorow May 9, 2024
4da50c0
Dockerfile: add NODE_ENV=production to runner stage
kahlstrm May 9, 2024
06c5d15
CI: change docker cache to min
kahlstrm May 9, 2024
42790b5
add revalidate false to fix cache validation
kahlstrm May 10, 2024
b962e01
move icon.svg to src/app
kahlstrm May 10, 2024
a4013f1
Remove I18nProviderClient from most pages
kahlstrm May 10, 2024
d3b6358
add i18n support for error-, global-error- and not-found-pages
kahlstrm May 10, 2024
83fccd0
lower z-index of toc so it's lower than main nav
kahlstrm May 10, 2024
b69aa58
fix event pagination
kahlstrm May 10, 2024
e53617f
use same children pattern for text in BackButton
kahlstrm May 10, 2024
6abd420
add copyright + version SHA to footer (#296)
kahlstrm May 10, 2024
db39744
version-footer: link to file tree of commit instead of commit itself.
kahlstrm May 12, 2024
17d0bf1
add tighter layout committees for use in rich text
MikaelSiidorow May 15, 2024
e864c22
insert soft hyphens after työryhmä
MikaelSiidorow May 15, 2024
7313ccf
update azure login action
MikaelSiidorow May 15, 2024
2f559ef
soft-hyphen after henkilö
MikaelSiidorow May 15, 2024
5eb2ce3
hyphenate committee member titles
MikaelSiidorow May 15, 2024
1f109a4
update container image node version
MikaelSiidorow May 15, 2024
859d818
update pnpm
MikaelSiidorow May 15, 2024
be27207
update node and pnpm in other places too
MikaelSiidorow May 15, 2024
ef46643
chore: update dependencies, fix peer dep warning without including pa…
MikaelSiidorow May 15, 2024
3f12abc
add passport-oauth types as peer dep to payload-plugin-oauth
MikaelSiidorow May 15, 2024
86429e3
new style and tighter back-to-back blockquotes
MikaelSiidorow May 15, 2024
ae510d0
keep blockquote top margin even after headings
MikaelSiidorow May 15, 2024
00c5447
hide details markers on safari
MikaelSiidorow May 15, 2024
f61dcc7
Add links to headings (#141)
jaakkonakaza May 18, 2024
4519e98
allow documents to be included in rich text
MikaelSiidorow May 18, 2024
d7629de
add thumbnails to documents
MikaelSiidorow May 18, 2024
a52f5b1
add title field to documents and simple serialized view
MikaelSiidorow May 18, 2024
a6272e2
weekly newsletter(s) pages
MikaelSiidorow May 9, 2024
0fca045
export weekly newsletters data
MikaelSiidorow May 9, 2024
4883b4f
refactor fetcher to add globalOpts and put sorting there
MikaelSiidorow May 18, 2024
b96b9bb
revalidate weekly newsletters on save
MikaelSiidorow May 18, 2024
d64682a
simplify special pages to be inluded under page types
MikaelSiidorow May 18, 2024
d3800d8
Dynamic hero text (#311)
jaakkonakaza May 18, 2024
9b3fb4b
Fix landing page event list page
MikaelSiidorow May 18, 2024
604023e
do not localize news item categories, default to guild
MikaelSiidorow May 18, 2024
05e18be
regen payload times
MikaelSiidorow May 18, 2024
775f39f
move announcement card chevron to right
MikaelSiidorow May 18, 2024
cc109e5
chore: Update db table names
joonatanaatos May 18, 2024
d7b4c06
add typechecking to CI, skip linting and typechecking in next build
MikaelSiidorow May 18, 2024
9a1184e
add optional photographer field to media, show in landing page
MikaelSiidorow May 18, 2024
a231754
hide landing page image photographer from non-active image
MikaelSiidorow May 18, 2024
c2adb0f
Make site logo changeable through CMS (#316)
samuliys May 18, 2024
ca9a729
add Alkorytmi page
anolpe Mar 15, 2024
97ff239
sort committees alphabetically
MikaelSiidorow May 18, 2024
817f26b
add skip to main content button
MikaelSiidorow May 18, 2024
00efc53
add image link grid block for partners
MikaelSiidorow May 18, 2024
d9ce031
add some more partners for mock testing
MikaelSiidorow May 18, 2024
4cb1530
feat: improve mobile layout
joonatanaatos May 18, 2024
3fd2cd4
Fix issue with mobile navigation cutting off from the bottom (#328)
lakaniemi May 18, 2024
84ada93
improve link text on screen readers
MikaelSiidorow May 18, 2024
9e3e423
fix(splash text): add max width, clamp to 4 lines, break words
MikaelSiidorow May 18, 2024
67ed4ca
improve responsiveness with document cards, committes, magazines and …
MikaelSiidorow May 18, 2024
34070a8
add main partners text to footer, add main partners to bottom of mobi…
MikaelSiidorow May 18, 2024
ec8620c
update active link styling, more space in mobile nav links
MikaelSiidorow May 18, 2024
f8e13ad
nicer text spacing in table of contents
MikaelSiidorow May 18, 2024
8f415fa
optimize hero image loading
MikaelSiidorow May 18, 2024
acd0db5
truncate cms image width and height to integers
MikaelSiidorow May 18, 2024
e8dc0d5
fix invalid nesting in main nav
MikaelSiidorow May 18, 2024
fe9bf9d
semantic fixes
MikaelSiidorow May 18, 2024
6bc3f74
fix incorrect heading
MikaelSiidorow May 18, 2024
08feb1a
more semantic or overflow tweaks, committee padding and gap tweaks
MikaelSiidorow May 18, 2024
568b914
small bottom padding on hero text to not cut off j's
MikaelSiidorow May 19, 2024
90aef21
add legacy url to env
MikaelSiidorow May 19, 2024
4cd2ce5
parametrize metadataBase url
MikaelSiidorow May 19, 2024
0223526
remove unnecesary fragments, fix key warning
MikaelSiidorow May 19, 2024
2882409
Revert "parametrize metadataBase url"
MikaelSiidorow May 19, 2024
184dc4f
Revert "remove unnecesary fragments, fix key warning"
MikaelSiidorow May 19, 2024
d487a7c
Revert "Revert "parametrize metadataBase url""
MikaelSiidorow May 19, 2024
62d7d0e
make Alkorytmi thumbnail into link
anolpe May 19, 2024
f9664a7
update document embed styles
MikaelSiidorow May 19, 2024
42c2edd
fix: hero texts
joonatanaatos May 19, 2024
acd9027
greatly simplify cache tagging to collection slugs
MikaelSiidorow May 19, 2024
237dbba
rename revalidate-page -> revalidate-collection
MikaelSiidorow May 19, 2024
8451956
add revalidation to missing collections
MikaelSiidorow May 19, 2024
3b45f9b
remove now unused dependency to json-stable-stringify
MikaelSiidorow May 19, 2024
affa0d5
clearer name for getAll and getOne helpers
MikaelSiidorow May 19, 2024
107e9a6
fix linting warning
MikaelSiidorow May 19, 2024
759909d
update site icon (#339)
samuliys May 19, 2024
59b3454
feat: Improve navigation ux
joonatanaatos May 19, 2024
fdf0f89
improve name formatting (#341)
samuliys May 19, 2024
c2ede35
add Google Forms block
anolpe May 19, 2024
02c3057
feat: add max length to hero texts (#342)
joonatanaatos May 19, 2024
9b46841
update Reaktor logo to SVG (#345)
kahlstrm May 19, 2024
e9ef104
Add icons to navbar links (#343)
jaakkonakaza May 19, 2024
955baf2
append random slug to page path if duplicate, make paths unique and i…
MikaelSiidorow May 19, 2024
a199e69
fix pseudo-elements with alt text on firefox+safari (don't use them)
MikaelSiidorow May 19, 2024
6a8c8e7
improve Alkorytmi display (#349)
samuliys May 19, 2024
a9b5e38
add localized path for events
MikaelSiidorow May 19, 2024
1ae0064
fix weird type assertion with fallback icon
MikaelSiidorow May 19, 2024
2f06cb3
redirect ilmomasiina links to ilmo page
MikaelSiidorow May 19, 2024
aae513b
add tailwind eslint plugin and fix errors
MikaelSiidorow May 19, 2024
e47eaee
Feat/dark mode (#348)
jaakkonakaza May 19, 2024
0087eca
feat: Add handshake icon
joonatanaatos May 19, 2024
5e1a39a
fix adding random slugs to end of page path
MikaelSiidorow May 19, 2024
1f9db2e
Dark mode fixes (#354)
jaakkonakaza May 19, 2024
2780d91
Revert "Dark mode fixes (#354)"
joonatanaatos May 19, 2024
944af82
Revert "Feat/dark mode (#348)"
joonatanaatos May 19, 2024
802159f
don't break landing page if there are no events
MikaelSiidorow May 19, 2024
2f3988e
add editor-in-chief block
anolpe May 19, 2024
af48a53
add dvd effect to editor-in-chief
samuliys May 19, 2024
e4cdde9
increase image minimumCacheTTL to 3600
kahlstrm May 19, 2024
b9ee05e
locales object notation -> dot notation for better support, cross typ…
MikaelSiidorow May 20, 2024
775e86c
chore: update dependencies
MikaelSiidorow May 20, 2024
a3331ce
fix up events display time and place styling
MikaelSiidorow May 20, 2024
a9d1888
ignore seed data in github diffs [skip ci]
MikaelSiidorow May 20, 2024
3f2ae23
add some metadata stuff
MikaelSiidorow May 20, 2024
c1a8ce9
experimentally fix datetimes
MikaelSiidorow May 21, 2024
c43e857
fix fetchPage typings
MikaelSiidorow May 23, 2024
003a304
ignore Accept-Language and always default to finnish site
MikaelSiidorow May 23, 2024
f8ee9e3
patch next-internatinal to store locale cookies for one year
MikaelSiidorow May 23, 2024
7de5702
oops, format pkgjson
MikaelSiidorow May 23, 2024
f4ccfd4
copy patches in dockerfile
MikaelSiidorow May 23, 2024
3a61ef3
Feat/event calendar (#353)
eemelioksanen May 23, 2024
900b5a6
only show upcoming events in landing page
MikaelSiidorow May 26, 2024
945b031
chore: update dependencies
MikaelSiidorow May 27, 2024
4e130b0
fix eslint warnings
MikaelSiidorow May 27, 2024
ac7fc76
always align committee members to center
MikaelSiidorow May 27, 2024
ec8ac24
Change event calendar localization library to date-fns (#367)
eemelioksanen May 27, 2024
6efc89a
tweak committee cards to show more members per row on each screen size
MikaelSiidorow May 31, 2024
92cde5c
make it possible to open and close committees for better usability on…
MikaelSiidorow May 31, 2024
aac5e5b
fix some invalid nesting
MikaelSiidorow May 31, 2024
22e480a
make overflowing ilmo tables scroll horizontally
MikaelSiidorow May 31, 2024
b4ff232
use next/link in event calendar
MikaelSiidorow May 31, 2024
257f3fc
show public question answers in ilmomasiina sign up table
MikaelSiidorow May 31, 2024
9872ade
add option to only show top-level headings in table of contents
MikaelSiidorow Jun 1, 2024
de95a00
support top-level headings only option in active heading hook
MikaelSiidorow Jun 1, 2024
3dac5fe
cleaner and url safe slugs for id/hash for headings
MikaelSiidorow Jun 1, 2024
1c53697
cursor-pointer for committee cards
MikaelSiidorow Jun 1, 2024
e78cd21
re-export metadata in alt events path
MikaelSiidorow Jun 2, 2024
d42aee7
add alt finnish path for weekly newsletters
MikaelSiidorow Jun 2, 2024
9647f6f
add size option to image grid
MikaelSiidorow Jun 3, 2024
ab8a5b1
docs: pr template [skip ci]
MikaelSiidorow Jun 3, 2024
d6262db
chore: update deps, fix prettier-tailwind config
MikaelSiidorow Jun 3, 2024
b561623
fix: metadata, add og image
MikaelSiidorow Jun 3, 2024
55954f8
oops, format code to add trailing comma
MikaelSiidorow Jun 3, 2024
68aebdc
chore: update deps
MikaelSiidorow Jun 11, 2024
500a828
disable turbopack in next dev
MikaelSiidorow Jun 11, 2024
bedd06e
chore: upgrade to turbopack v2
MikaelSiidorow Jun 11, 2024
9ee9d7e
group turbo and eslint-config-turbo in dependabot
MikaelSiidorow Jun 11, 2024
f030c1a
add a displayTitle for admin panel for committee members
MikaelSiidorow Jun 11, 2024
990e965
fix: do not delete displayTitles from db and allow relationship dropd…
MikaelSiidorow Jun 11, 2024
01e7f02
add better default columns to committee members
MikaelSiidorow Jun 11, 2024
150599d
format
MikaelSiidorow Jun 12, 2024
997f588
Feature/hsl api endpoint (#362)
lanttu1243 Jun 15, 2024
a3014a9
Bump the patches group with 3 updates (#392)
dependabot[bot] Jun 21, 2024
6bc593f
Bump the turbo group with 2 updates (#390)
dependabot[bot] Jun 21, 2024
3b66205
Bump the payload group across 1 directory with 3 updates (#393)
dependabot[bot] Jun 21, 2024
a316558
chore: bump typescript to 5.5.2 (#395)
kahlstrm Jun 21, 2024
7e7e53f
Revert "chore: bump typescript to 5.5.2 (#395)" (#396)
kahlstrm Jun 21, 2024
e4aa940
Chore: bump typescript to 5.5.2 (#398)
kahlstrm Jun 21, 2024
8414f1e
fix: don't run local build with dotenv
kahlstrm Jun 21, 2024
72026bf
fix: clear up build-directory for CMS as well
kahlstrm Jun 21, 2024
598923c
chore: remove downLevelIteration now that we have higher target
kahlstrm Jun 21, 2024
39df16a
fix: fix incorrect mongo connection string for oAuthPlugin
kahlstrm Jun 21, 2024
190823e
Revert "fix: fix incorrect mongo connection string for oAuthPlugin"
kahlstrm Jul 7, 2024
50280dd
feat: Alkorytmi improvements (#406)
anolpe Jul 12, 2024
0da2a2a
chore: minor cleanup for PR template
kahlstrm Jul 12, 2024
e8fd491
chore: update deps
MikaelSiidorow Jul 16, 2024
c44e878
chore: update pnpm
MikaelSiidorow Jul 16, 2024
f1b5246
add a more detailed text for non-public signups
MikaelSiidorow Jul 16, 2024
0bb998b
feat: support gfm to auto linkify urls in event description
MikaelSiidorow Jul 16, 2024
fb5586f
mit license project
MikaelSiidorow Jul 12, 2024
32bc8b8
chore: update pnpm and deps
MikaelSiidorow Jul 23, 2024
fc4d020
chore: add github actions to dependabot
MikaelSiidorow Jul 23, 2024
45b6c5b
chore: move monorepo common packages to use catalogs
MikaelSiidorow Jul 23, 2024
8a5da56
Bump docker/build-push-action from 5 to 6
dependabot[bot] Jul 26, 2024
a7699a7
Bump pnpm/action-setup from 3 to 4
dependabot[bot] Jul 26, 2024
5c01bd8
chore: update deps
MikaelSiidorow Aug 5, 2024
e1324b8
chore: update deps
MikaelSiidorow Aug 10, 2024
a62d9a8
feat(admin): enable upload previews for upload fields
MikaelSiidorow Aug 10, 2024
bb7ab3c
feat: add input and textarea components
MikaelSiidorow Jul 27, 2024
185da9e
feat: implement ilmomasiina sign up integration
MikaelSiidorow Jul 27, 2024
1096b8b
feat: add lowkey beta notice to sign up integration with link to ilmo…
MikaelSiidorow Jul 27, 2024
d2b2a51
fix: possible accessibility and ux issues with sign up form fields
MikaelSiidorow Jul 27, 2024
c6c2062
feat: Add displayTitle in news item and committee member to database …
joonatanaatos Jun 16, 2024
217b8ef
chore: Update database seeding data
joonatanaatos Jun 16, 2024
6e43ae7
chore: Fix typecheck issues
joonatanaatos Aug 10, 2024
577c9f1
feat: add next toploader for a loading indicator on page navigate
MikaelSiidorow Aug 10, 2024
4a0d7d7
feat: use css variables to define colors
MikaelSiidorow Aug 10, 2024
154ee5c
feat: use css variables to define box shadows
MikaelSiidorow Aug 10, 2024
94d1cf7
feat: use css variables and theme colors for event calendar
MikaelSiidorow Aug 10, 2024
5445547
fix: mobile sheet nav accessibility issues
MikaelSiidorow Aug 5, 2024
0359236
feat(ui): extract common pattern to card component
MikaelSiidorow Aug 5, 2024
c247dcc
feat: Add endpoint for uploading media
joonatanaatos Aug 10, 2024
6c242fc
chore: Update seeding data
joonatanaatos Aug 10, 2024
c172edb
feat: Link committee photos
joonatanaatos Aug 10, 2024
04ec406
chore: fix code style
joonatanaatos Aug 10, 2024
d5372ff
feat: add api route to get events in ics format
MikaelSiidorow Aug 10, 2024
4caeac6
feat: add copy to clipboard with javascript
MikaelSiidorow Aug 10, 2024
43b0387
wip: integration tests
MikaelSiidorow Aug 10, 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
1 change: 1 addition & 0 deletions .env.docker-compose.prod
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ NEXT_REVALIDATION_KEY="veryprivatekey"
PUBLIC_FRONTEND_URL="http://localhost:3000"
PUBLIC_SERVER_URL="http://cms:3001"
PUBLIC_ILMOMASIINA_URL="https://ilmo.tietokilta.fi"
PUBLIC_LEGACY_URL="https://tietokilta.fi"
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ PAYLOAD_PUBLIC_LOCAL_DEVELOPMENT=true

NEXT_REVALIDATION_KEY="veryprivatekey"

# Digitransit API key for HSL traffic data for info screen www.digitransit.fi/en/developers/api-registration/
DIGITRANSIT_SUBSCRIPTION_KEY="very secret stuff"

PUBLIC_FRONTEND_URL="http://localhost:3000"
PUBLIC_SERVER_URL="http://localhost:3001"
PUBLIC_ILMOMASIINA_URL="https://ilmo.tietokilta.fi"
PUBLIC_LEGACY_URL="https://tietokilta.fi"

# variables required for Google OAuth 2.0, otherwise disabled
#GOOGLE_OAUTH_CLIENT_ID=
Expand All @@ -30,3 +34,6 @@ PUBLIC_ILMOMASIINA_URL="https://ilmo.tietokilta.fi"
# AZURE_STORAGE_CONTAINER_NAME=az-media
# AZURE_STORAGE_ALLOW_CONTAINER_CREATE=true
# AZURE_STORAGE_ACCOUNT_BASEURL=http://localhost:10000/devstoreaccount1

# For showing the git commit sha in the footer and in requests
GIT_COMMIT_SHA=development
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ignore database seeding data in diffs
data/gen/** linguist-generated=true
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: npm
directory: "/"
schedule:
Expand All @@ -21,6 +26,10 @@ updates:
- "react-dom"
- "@types/react"
- "@types/react-dom"
turbo:
patterns:
- "turbo"
- "eslint-config-turbo"
lint:
patterns:
- "eslint*"
Expand Down
14 changes: 14 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Description

- ...

### Before submitting the PR, please make sure you do the following

- [ ] If your PR is related to a previously discussed issue, please [link to it](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests#linking-a-pull-request-to-an-issue) here.
- [ ] Prefix your PR title with feat:, fix:, chore:, or docs:.
- [ ] This message body should clearly illustrate what problems it solves.
- [ ] Make sure the commit history is linear, up-to-date with main branch and does not contain any erroneous changes

### Formatting and linting

- [ ] Format code with `pnpm format` and lint the project with `pnpm lint`
37 changes: 27 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,42 @@ jobs:
with:
fetch-depth: 2

- uses: pnpm/action-setup@v2
- name: Setup turborepo cache
uses: actions/cache@v4
with:
version: 8
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-

- name: Use Node.js 20
- uses: pnpm/action-setup@v4
with:
version: 9.6.0

- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: "pnpm"

- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile

- name: Format (to ensure that code has been formatted)
run: pnpm format && git diff --quiet
run: pnpm format && git diff --exit-code

- name: Lint
run: pnpm lint

- name: Generate Payload types (to ensure that they are up to date)
run: pnpm codegen && git diff --quiet
run: pnpm codegen && git diff --exit-code

- name: Typecheck
run: pnpm typecheck

- name: Build all
run: pnpm build

docker-build-and-push:
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'release' && github.event.action == 'published')
needs: build
Expand Down Expand Up @@ -73,7 +89,7 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}

- name: Push to GitHub Packages
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
push: true
Expand All @@ -83,7 +99,8 @@ jobs:
PROJECT=${{matrix.project}}
GIT_COMMIT_SHA=${{github.sha}}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-to: type=gha,mode=min

deploy:
# only run on published releases, enable this when we release
#if: github.event_name == 'release' && github.event.action == 'published'
Expand All @@ -95,7 +112,7 @@ jobs:
project: [web, cms]
steps:
- name: Login via Azure CLI
uses: azure/login@v1
uses: azure/login@v2
with:
client-id: ${{secrets.AZURE_CLIENT_ID}}
subscription-id: ${{secrets.AZURE_SUBSCRIPTION_ID}}
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Playwright Tests
on:
push:
# branches: [main]
pull_request:
# branches: [main]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 9.6.0

- uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps

- name: Run Playwright tests
run: pnpm exec playwright test

- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ server/dist
public/dist
.vscode
!.vscode/extensions.json
.idea
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
22
4 changes: 3 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"plugins": ["prettier-plugin-tailwindcss", "prettier-plugin-packagejson"]
"plugins": ["prettier-plugin-tailwindcss", "prettier-plugin-packagejson"],
"tailwindAttributes": ["cva", "cn", "clsx"],
"tailwindFunctions": ["cva", "cn", "clsx"]
}
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Base image with Node.js
ARG NODE_VERSION=20
ARG NODE_VERSION=22
# Use a specific version of the Node.js Alpine image as the base. Alpine images are minimal and lightweight.
FROM node:${NODE_VERSION}-alpine AS base
# Update the package list and install libc6-compat. This package is often required for binary Node.js modules.
Expand All @@ -17,13 +17,12 @@ RUN pnpm install --global turbo
# Build argument for specifying the project
# Introduce a build argument 'PROJECT' to specify which project in the monorepo to build.
ARG PROJECT=web
ARG GIT_COMMIT_SHA=development
ENV GIT_COMMIT_SHA=$GIT_COMMIT_SHA
# Install all dependencies in the monorepo
# Start a new stage for handling dependencies. This stage uses the previously setup image with pnpm and turbo installed.
FROM setup AS dependencies
WORKDIR /app
# Copy the essential configuration files and the specific project's files into the Docker image.
COPY patches/ ./patches/
COPY packages/ ./packages/
COPY turbo.json ./
COPY package.json turbo.json packages ./
Expand All @@ -44,6 +43,9 @@ RUN rm -rf /app/out/full/*/*/node_modules
FROM setup AS builder
WORKDIR /app

ARG GIT_COMMIT_SHA=development
ENV GIT_COMMIT_SHA=$GIT_COMMIT_SHA

# Copy pruned lockfile and package.json files
# This ensures that the builder stage has the exact dependencies needed for the project.
COPY --from=pruner /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
Expand Down Expand Up @@ -74,6 +76,7 @@ FROM base AS runner
ARG PROJECT=web
ARG GIT_COMMIT_SHA=development
ENV GIT_COMMIT_SHA=$GIT_COMMIT_SHA
ENV NODE_ENV=production
# Create a non-root user and group for better security.
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nodejs
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Tietokilta ry

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
5 changes: 0 additions & 5 deletions apps/cms/nodemon.json

This file was deleted.

40 changes: 22 additions & 18 deletions apps/cms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,45 @@
"scripts": {
"build": "NODE_ENV=production pnpm copyfiles && pnpm build:payload && pnpm build:server",
"build:payload": "payload build",
"build:server": "tsc",
"clean": "rm -rf dist",
"build:server": "tsc --project tsconfig.server.json",
"clean": "rm -rf build dist",
"codegen": "pnpm generate:types & pnpm generate:graphQLSchema",
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png}\" dist/",
"dev": "nodemon",
"dev": "tsx watch src/server.ts",
"generate:graphQLSchema": "PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:graphQLSchema",
"generate:types": "PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:types",
"lint": "eslint \"./src/**/*.{js,ts}\"",
"start": "NODE_ENV=production PAYLOAD_CONFIG_PATH=dist/payload.config.js node dist/server.js",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@azure/storage-blob": "^12.17.0",
"@payloadcms/bundler-webpack": "^1.0.6",
"@payloadcms/db-mongodb": "^1.4.2",
"@payloadcms/plugin-cloud-storage": "^1.1.2",
"@payloadcms/richtext-lexical": "^0.7.0",
"dotenv": "^16.4.4",
"express": "^4.18.2",
"@azure/storage-blob": "^12.24.0",
"@payloadcms/bundler-webpack": "^1.0.7",
"@payloadcms/db-mongodb": "^1.7.2",
"@payloadcms/plugin-cloud-storage": "^1.1.3",
"@payloadcms/richtext-lexical": "^0.11.3",
"dotenv": "^16.4.5",
"express": "^4.19.2",
"lodash": "^4.17.21",
"payload": "^2.11.1",
"payload-plugin-oauth": "^2.1.1"
"nanoid": "^3.3.7",
"papaparse": "^5.4.1",
"payload": "^2.26.0",
"payload-plugin-oauth": "^2.2.0"
},
"devDependencies": {
"@tietokilta/cms-types": "workspace:*",
"@tietokilta/config-typescript": "workspace:*",
"@tietokilta/eslint-config": "workspace:*",
"@tietokilta/ui": "workspace:*",
"@types/express": "^4.17.21",
"@types/lodash": "^4.14.202",
"@types/passport-oauth2": "^1.4.15",
"@types/express-fileupload": "^1.5.0",
"@types/lodash": "^4.17.7",
"@types/papaparse": "^5.3.14",
"@types/react": "catalog:",
"copyfiles": "^2.4.1",
"eslint": "^8.56.0",
"nodemon": "^3.0.3",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
"eslint": "catalog:",
"react": "catalog:",
"tsx": "^4.17.0",
"typescript": "catalog:"
}
}
4 changes: 2 additions & 2 deletions apps/cms/src/blocks/committees-in-year.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { Block } from "payload/types";
import { guildYearField } from "../fields/guild-year";

export const CommitteesInYear: Block = {
export const CommitteesInYear = {
slug: "committees-in-year",
fields: [
guildYearField({
name: "year",
required: true,
}),
],
};
} satisfies Block;
28 changes: 28 additions & 0 deletions apps/cms/src/blocks/editor-in-chief.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import type { Block } from "payload/types";

export const EditorInChief = {
slug: "editor-in-chief",
fields: [
{
name: "name",
type: "text",
required: true,
},
{
name: "type",
type: "select",
required: true,
options: [
{
label: "Boring",
value: "boring",
},
{
label: "DVD",
value: "dvd",
},
],
defaultValue: "boring",
},
],
} satisfies Block;
15 changes: 15 additions & 0 deletions apps/cms/src/blocks/google-form.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Block } from "payload/types";

export const GoogleForm = {
slug: "google-form",
fields: [
{
name: "link",
type: "text",
required: true,
admin: {
description: "Copy link from src attribute of embed HTML",
},
},
],
} satisfies Block;
Loading
Loading