Skip to content

Commit

Permalink
Update for Fall 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
justinyaodu committed Sep 25, 2023
1 parent 846472a commit 86ae889
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 16 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build static website and push static files to gh-pages
on:
push:
branches:
- main
jobs:
build:
name: Build static website and push static files to gh-pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- name: Build static website
run: |
npm ci
npm run build
- name: Push static files to gh-pages
run: |
cp -a .git build/
cd build/
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout --orphan gh-pages
git add .
git commit -m "Deploy static website: $(TZ=UTC0 date +'%Y-%m-%dT%H:%M:%SZ')"
git push -uf origin gh-pages
53 changes: 37 additions & 16 deletions frontend/src/components/ApplicationForm.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Alert, Button, Col, Form, Row } from "react-bootstrap";
import React, { useState } from "react";

const SUBMIT_URL = "https://tse-fulcrum-hwx4s.ondigitalocean.app/api/application";
const DEADLINE = new Date("2022-10-09T23:59-07:00"); // PDT is UTC-7
const SUBMIT_URL = "https://tse-fulcrum-2023-i83hg.ondigitalocean.app/api/application";
const DEADLINE = new Date("2023-10-15T23:59:59-07:00"); // PDT is UTC-7
const deadlineStr = DEADLINE.toLocaleString("en-US");

const ApplicationForm = (props) => {
Expand Down Expand Up @@ -50,6 +50,10 @@ const ApplicationForm = (props) => {
return;
}

if (!personalInfo.startQuarter || !personalInfo.gradQuarter) {
setError("Select your start quarter and graduation quarter.");
return;
}
const startQuarter = parseInt(personalInfo.startQuarter) + 4 * parseInt(personalInfo.startYear);
const gradQuarter = parseInt(personalInfo.gradQuarter) + 4 * parseInt(personalInfo.gradYear);

Expand Down Expand Up @@ -106,6 +110,12 @@ const ApplicationForm = (props) => {
);
}

// By default, mouse wheel events on a number input will change the numeric
// value. This results in people accidentally changing the values when they
// scroll the page, so we disable it.
// https://stackoverflow.com/a/67157325
const numberInputOnWheel = (e) => e.currentTarget.blur();

// all html related material below here
return (
<Form className="ApplicationForm" onSubmit={onSubmit}>
Expand Down Expand Up @@ -173,10 +183,11 @@ const ApplicationForm = (props) => {
updatePersonalInfo("startQuarter", e.target.value);
}}
>
<option>select...</option>
<option value="" disabled>select...</option>
<option value="0">Winter</option>
<option value="1">Spring</option>
<option value="2">Summer</option>
{/* Hide summer because people often select summer when they mean spring. */}
{/*<option value="2">Summer</option>*/}
<option value="3">Fall</option>
</Form.Select>
</Form.Group>
Expand All @@ -192,6 +203,7 @@ const ApplicationForm = (props) => {
onChange={(e) => {
updatePersonalInfo("startYear", e.target.value);
}}
onWheel={numberInputOnWheel}
></Form.Control>
</Form.Group>
</Col>
Expand All @@ -210,10 +222,11 @@ const ApplicationForm = (props) => {
updatePersonalInfo("gradQuarter", e.target.value);
}}
>
<option>select...</option>
<option value="" disabled>select...</option>
<option value="0">Winter</option>
<option value="1">Spring</option>
<option value="2">Summer</option>
{/* Hide summer because people often select summer when they mean spring. */}
{/*<option value="2">Summer</option>*/}
<option value="3">Fall</option>
</Form.Select>
</Form.Group>
Expand All @@ -229,6 +242,7 @@ const ApplicationForm = (props) => {
onChange={(e) => {
updatePersonalInfo("gradYear", e.target.value);
}}
onWheel={numberInputOnWheel}
></Form.Control>
</Form.Group>
</Col>
Expand Down Expand Up @@ -269,16 +283,23 @@ const ApplicationForm = (props) => {
<Col>
<Form.Group>
<Form.Label>
Resume, as a Google Drive link to a PDF, shared so that anyone can
view (1 page only, otherwise your application will not be considered):
Resume link:
<Alert variant="danger">
<ul>
<li>Your resume must be 1 page in PDF format.</li>
<li>Upload your resume to Google Drive, share it so that anyone can view, and paste the link below.</li>
<li>Ensure that your resume is accessible through this link until the end of Fall quarter (so don't delete it or change the sharing permissions).</li>
</ul>
If your resume cannot be accessed or does not meet these requirements, your application will not be considered.
</Alert>
<Form.Control
required
type="url"
onChange={(e) => {
updatePersonalInfo("resumeUrl", e.target.value);
}}
></Form.Control>
</Form.Label>
<Form.Control
required
type="url"
onChange={(e) => {
updatePersonalInfo("resumeUrl", e.target.value);
}}
></Form.Control>
{personalInfo.resumeUrl && (
<Form.Text>
Open{" "}
Expand Down Expand Up @@ -362,7 +383,7 @@ const ApplicationForm = (props) => {
The TSE Early Start Training (TEST) program provides students from <strong>underprivileged backgrounds</strong> who have little to no technical design/development experience with a first step into exploring UI/UX design and software engineering. TEST designers and developers will learn the fundamentals of their domain while working on beginner-level internal projects for TSE. TEST is a one year program that TSE provides. After the completion of the program, if TEST designers and developers want to join TSE, they would have to apply during the next recruitment cycle.
</p>
<p>
You may either apply to TSE or the TEST program, not both. Please apply to the TEST program if you believe that it would be a good fit for you. Once you apply to the TEST program, we will not be able to consider you for TSE and vice versa. If you are unsure about which is right for you, please email adave@ucsd.edu.
You may either apply to TSE or the TEST program, not both. Please apply to the TEST program if you believe that it would be a good fit for you. Once you apply to the TEST program, we will not be able to consider you for TSE and vice versa. If you are unsure about which is right for you, please email tse@ucsd.edu.
</p>
</Form.Text>
</Row>
Expand Down

0 comments on commit 86ae889

Please sign in to comment.