- Fixed edge case with fetching execs
- Added Bootcamp mentor application news, and CSC x Google event
**Problem:** When building the Meet the Team page using LDAP (in CI), we were only checking CSC members for the "current" term (Fall 2022) to see if any of them were execs. Since our actual current execs (the Spring 2022 execs, since Fall 2022 elections have not occurred yet) have not renewed their memberships for Fall 2022, the script was unable to find individuals for the Prez/VP/AVP/Trez positions, which caused an error.
**Solution:**
1. Gracefully handle the edge case where an exec position might be intentionally unfilled, by simply omitting it from the Meet the Team page.
2. Search through CSC members for both the current term and the previous term, when checking for execs. Note that this might make the build time slightly slower, since the script now needs to loop through two terms of members in order to pick out the execs, however the difference should be insignificant.
Co-authored-by: Amy <a258wang@uwaterloo.ca>
Reviewed-on: #491
Reviewed-by: j285he <j285he@localhost>
The "Community Coordinators", formerly the "Class Representatives", have requested to change their team name on the website to "Community Representatives".
Co-authored-by: Amy <a258wang@uwaterloo.ca>
Reviewed-on: #478
Reviewed-by: Shahan Neda <snedadah@csclub.uwaterloo.ca>
* The website will have a dark theme or a light theme depending on your OS preferences. You can still customize in the `themer` page to override some properties.
* A toggle button in the footer to toggle between light mode and dark mode.
* Added a "Reset to dark mode" button in the `themer` page.
Staging link: https://csclub.uwaterloo.ca/~a3thakra/csc/dark-theme/
Co-authored-by: Miniapple8888 <miniapple8888@gmail.com>
Reviewed-on: #407
Reviewed-by: Amy <a258wang@csclub.uwaterloo.ca>
Previously, the instructions for "Online Term" on the Get Involved page would be open by default. This PR changes the instructions for "In Person" to be open by default.
There are also some other small wording changes on the Get Involved page.
Co-authored-by: Amy <a258wang@uwaterloo.ca>
Reviewed-on: #429
Reviewed-by: b38peng <b38peng@uwaterloo.ca>
* 3 News items are displayed on the homepage (`MiniNewsCard` component)
* Single News item path: `/news/20xx/term/20xx-xx-xx` (`NewsCard` component)
* Purple header for the date
* News items of the same date are displayed on the same page
Co-authored-by: Miniapple8888 <miniapple8888@gmail.com>
Reviewed-on: #390
Reviewed-by: Amy <a258wang@csclub.uwaterloo.ca>
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>
#301https://csclub.uwaterloo.ca/~a3thakra/csc/j285he-ldap/about/members/
Co-authored-by: Jared He <66887902+jaredjhe@users.noreply.github.com>
Co-authored-by: Jared He <j285he@uwaterloo.ca>
Reviewed-on: #354
Reviewed-by: n3parikh <n3parikh@csclub.uwaterloo.ca>
Co-authored-by: j285he <j285he@localhost>
Co-committed-by: j285he <j285he@localhost>
Addresses some of the shapes shenanigans that I noticed here: #236
- Removed shapes from mobile /events/\[year\]/\[term\]/\[event\] page. (I left the default shapes on the mobile /events/\[year\]/\[term\] page, since with the vertical nav header they now fit, but I'd love to hear others' opinions on this!)
- Adjusted top margins on mobile Meet the Team, Our Supporters, and Tech Talks/Tech Talk pages to accommodate the shapes.
- Changed shapes on mobile Home page to accommodate the expanded Social Links.
Co-authored-by: Amy <a258wang@uwaterloo.ca>
Reviewed-on: #307
Reviewed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-authored-by: Amy <a258wang@csclub.uwaterloo.ca>
Co-committed-by: Amy <a258wang@csclub.uwaterloo.ca>
Make sure that the advice, team, and tech-talk pages are loading properly
Reviewed-on: #289
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-committed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Also fixed a couple of Safari-specific bugs. Summary:
- Added a secondary-accent ring around buttons on focus. (White didn't show up very well against the background.) We can always chat with design about this later if we want to change it.
- Fixed the weirdness with tabbing over the headers on the Advice pages. I also made the header flex vertically on mobile screens - this fixes the issue of extra whitespace on the right side, and is also somewhat consistent with the menu-y thing at the top of the mobile Meet the Team page.
- I was very tempted to do this on the Events term archive pages as well, but I figured I should get someone else's opinion on that first.
- Removed the extra triangle symbol in the MiniEventCard on Safari. I had to use a vendor prefix, but if anyone else can come up with something better, then please do that, thank you.
- Stopped the home page "Computer Science Club" from breaking into two lines on small desktop screens.
- Added extra space to mobile footer.
Closes#250Closes#248Closes#253Closes#256Closes#261
Co-authored-by: Amy <minds10@hotmail.com>
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Reviewed-on: #268
Reviewed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-authored-by: Amy <a258wang@csclub.uwaterloo.ca>
Co-committed-by: Amy <a258wang@csclub.uwaterloo.ca>
Closes#221
Go to https://csclub.uwaterloo.ca/~a3thakra/csc/adi-page-titles and make sure that all pages have a title (you can hover over the tab)
Reviewed-on: #222
Reviewed-by: j285he <j285he@localhost>
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-committed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Closes#81
I'm only updating the about codey right now. I'm guessing the design team accidentally missed the three lines in the mobile version on the meet the team page.
https://csclub.uwaterloo.ca/~a3thakra/csc/adi-update-codey
Reviewed-on: #191
Reviewed-by: j285he <j285he@localhost>
Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-committed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
We have decided to use randomly-generated shapes for most of the pages, instead of hard-coding the shapes backgrounds.
Closes#25
Co-authored-by: Amy <a258wang@uwaterloo.ca>
Reviewed-on: #164
Reviewed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-authored-by: Amy <a258wang@csclub.uwaterloo.ca>
Co-committed-by: Amy <a258wang@csclub.uwaterloo.ca>
- Home page displays the 2 soonest upcoming events.
- If there are no upcoming events, displays a short message.
- If there are 1-2 upcoming events, displays the events.
- If there are more than 2 upcoming events, displays the events as well as a link to the Events page.
- Home page displays the most recent news.
- If there is no news, displays a short message.
Closes#149
Co-authored-by: Amy <a258wang@uwaterloo.ca>
Reviewed-on: #162
Reviewed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>
Co-authored-by: Amy <a258wang@csclub.uwaterloo.ca>
Co-committed-by: Amy <a258wang@csclub.uwaterloo.ca>