Tag:
Branch:
Tree:
amy-fix-vp-f22
2022-07-08-MUA-Update
April-Code-Party
Ev-New-Event-123-June-07-2023-1686113019308
Ev-New-Event-123-June-07-2023-1686113292428
a258wang-events-2022-09-28
add-imane-photo
add-name-to-web-committe
amy-add-alt-tab-f22
amy-add-librarian-f22
amy-events-august-2022
amy-events-karaoke
amy-fix-vp-f22
amy-image-optimization-quick-fix-experiment
amy-news-2022-09-14
amy-random-shapes
amy-update-annie-headshot-f22
amy-update-community-reps
amy-update-internship-repo-f22
annies/add-circles-event
anniesun/add-myself-to-webstite
anniesun/add-office-status
anniesun/update-blurbs
b72zhou-past-exec
bonnie-team-member-card
change_AVP_treasurer
darren/add-class-profile-news
darren/add-myself-to-website
darren/add-news
darren/fix-dead-link
fix-oc-burger
j285he-add-news-09-07
j285he-ldap-test-example
jan-2023-constitution-changes
ldap-exec-test
main
meet-team
meet-the-team
meet_the_team
neil-members
news-2022-09-08
news-2022-09-10
raymo-s23-updates
renovate/date-fns-tz-2.x
renovate/eslint-8.x
renovate/eslint-plugin-prettier-4.x
renovate/eslint-plugin-react-7.x
renovate/fs-extra-11.x
renovate/ical-generator-4.x
renovate/ldapts-4.x
renovate/mdx-js-loader-2.x
renovate/mdx-js-react-2.x
renovate/next-11.x
renovate/next-13.x
renovate/next-mdx-11.x
renovate/next-mdx-13.x
renovate/next-mdx-remote-3.x
renovate/node-18.x
renovate/node-20.x
renovate/npm-9.x
renovate/postcss-calc-9.x
renovate/postcss-preset-env-8.x
renovate/react-18.x
renovate/react-dom-18.x
renovate/remark-14.x
renovate/remark-html-15.x
renovate/squoosh-lib-0.x
renovate/typescript-4.x
renovate/typescript-5.x
renovate/typescript-eslint-eslint-plugin-5.x
renovate/typescript-eslint-parser-5.x
richardshuai/karaoke
shahanneda-news-11jan2022
shahanneda/add-alt-tab-news
shahanneda/add-bot
shahanneda/add-code-party-1
shahanneda/add-code-party-23
shahanneda/add-event
shahanneda/add-events
shahanneda/add-myself
shahanneda/add-tropical-code-party
shahanneda/alt-tab-and-cp
shahanneda/fix-build-image-script
shahanneda/fix-name-parts
shahanneda/optimze-image-script
shahanneda/update-exec-blurbs
shahanneda/update-project-program
shahanneda/update-team
support-multiple-news-homepage
unix101-1
update-events
w23-update-team
warning-header
${ noResults }
4 Commits (amy-fix-vp-f22)
Author | SHA1 | Message | Date |
---|---|---|---|
|
be308f6249 |
Create members.json api (#489)
I changed some other code along the way ... which makes this PR slightly long :') rip. closes #472 takes a stab at #466 https://csclub.uwaterloo.ca/~a3thakra/csc/adi-member-json-api/api/members.json Reviewed-on: #489 Reviewed-by: Amy <a258wang@csclub.uwaterloo.ca> |
10 months ago |
|
bb78a3d53d |
Warning Header (Closes #205) (#394)
Update: In order to solve the issues discussed below, we decided to put the warnings in a json file, since they can be easily imported into a javascript file and webpack automatically bundles them with the client side app, so no static props is needed. __________ To get the warning data, since it is something that needs to be on all pages, it makes sense for the component to go in the app.js file (similar to the nav bar). However, next.js has a cumbersome issue that it does not support getStaticProps in the app.ts file (and getStaticProps only works in page files), thus we have no way of requesting the warning data easily in the \<WarningHeader\> Component. (https://github.com/vercel/next.js/discussions/10949) Here is my solution: - Request the warning data on the client side through the use of an api. - I made a warning api (/api/currentWarning) which sends a json of the current warning - Advantage: warnings will always be up to date since it is recalculated on every request - Advantage: It can potentially incorporate with other CSC services who might need to know about the warning (eg linktree?) - Disadvantage: can get expensive if we have a lot of warnings, to fix this I can cache the current warning and only re-read the files every 24h if this is a problem, but if we don’t have that many warnings I think it should be fine - Disadvantage: listed below: The current problem with what I implemented is that it doesn’t build in the production environment: - The way we build the website, when we call “next export” that disables any api endpoints. - According to this https://github.com/vercel/vercel/discussions/6551, if we want to allow api endpoints, we have to just do “next build”. This has implications that the site won’t be completely static anymore, but the other solutions also have similar problems ( though the GitHub post says that next will still optimize for static with only next build). Another advantage of allowing api’s is that maybe in the future we will implement other features where an api might be useful. If you want to try it out, my branch works fine locally (when just running npm run dev or npm run build”) Other possible solutions: - Use getInitialProps inside _app.js, but this has the downside that it will “disable Automatic Static Optimization in pages without Static Generation.” (https://nextjs.org/docs/advanced-features/custom-app), which I believe will slow the whole site down, but, we will be able to still use the old build command I think, I am not sure of the full effect of this. - However, implementing this would also be relatively simple. - Add the warning request to the getStaticProps of every single page, possibly through some wrapper component around every single page, this has the disadvantage that we need to do a lot of refactoring of all the pages of the site and cant use the intended “_app.ts” wrapper. - Add warning header only to the homepage (or maybe one or two other important pages). Co-authored-by: shahanneda <shahan.neda@gmail.com> Reviewed-on: #394 Reviewed-by: Amy <a258wang@csclub.uwaterloo.ca> |
1 year ago |
|
2264e60852 |
Add Term Type (#361)
Co-authored-by: Jared He <66887902+jaredjhe@users.noreply.github.com> Reviewed-on: #361 Reviewed-by: Amy <a258wang@csclub.uwaterloo.ca> Reviewed-by: n3parikh <n3parikh@csclub.uwaterloo.ca> Co-authored-by: j285he <j285he@localhost> Co-committed-by: j285he <j285he@localhost> |
1 year ago |
|
c31571f745 |
Add events archive (#187)
Closes #117 Reviewed-on: #187 Reviewed-by: j285he <j285he@localhost> Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca> Co-committed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca> |
2 years ago |