Skip to content

Commit 0eeff39

Browse files
authored
Website: More Apply Page Improvements (#806)
1 parent e976e75 commit 0eeff39

File tree

6 files changed

+58
-36
lines changed

6 files changed

+58
-36
lines changed

new-dti-website/components/apply/ApplicationTimeline.tsx

+31-8
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ const getEndTime = ({ date, time }: DateTime): number => {
7272
endTime = extractEndTime(time);
7373
}
7474

75-
return parseDate(endDate, '11:59:59 PM', endTime).getTime();
75+
return parseDate(
76+
`${endDate}, ${config.semester.split(' ')[1]}`,
77+
'11:59:59 PM',
78+
endTime
79+
).getTime();
7680
};
7781

7882
type RecruitmentEventProps = {
@@ -202,6 +206,7 @@ const TimelineNode: React.FC<RecruitmentEventProps> = ({
202206

203207
const ApplicationTimeline = () => {
204208
const [cycle, setCycle] = useState<'freshmen' | 'upperclassmen'>('upperclassmen');
209+
const [scroll, setScroll] = useState<number[]>([0, 0]);
205210
const timelineRef = useRef<HTMLDivElement>(null);
206211
const selectedNodeRef = useRef<HTMLDivElement>(null);
207212
const { width } = useScreenSize();
@@ -225,25 +230,43 @@ const ApplicationTimeline = () => {
225230
const scrollToIndex =
226231
nextEventIndex === sortedEvents.length ? nextEventIndex - 1 : nextEventIndex;
227232

233+
const onTabSwitch = (nextTab: 'freshmen' | 'upperclassmen') => {
234+
if (nextTab === cycle) return;
235+
const tabIndex = cycle === 'upperclassmen' ? 0 : 1;
236+
setCycle(nextTab);
237+
if (timelineRef.current) {
238+
const newScroll = [...scroll];
239+
newScroll[tabIndex] = timelineRef.current.scrollTop;
240+
setScroll(newScroll);
241+
}
242+
};
243+
228244
const handleKeyDown = (e: KeyboardEvent<HTMLDivElement>) => {
229-
if (e.key === 'ArrowLeft' || e.key === 'ArrowRight') {
230-
setCycle(cycle === 'freshmen' ? 'upperclassmen' : 'freshmen');
245+
if (isFall && (e.key === 'ArrowLeft' || e.key === 'ArrowRight')) {
246+
onTabSwitch(cycle === 'freshmen' ? 'upperclassmen' : 'freshmen');
231247
}
232248
};
233249

250+
useEffect(() => {
251+
if (timelineRef.current) {
252+
timelineRef.current.scrollTop = scroll[cycle === 'upperclassmen' ? 0 : 1];
253+
}
254+
}, [cycle]);
255+
234256
useEffect(() => {
235257
if (timelineRef.current && selectedNodeRef.current && width >= TABLET_BREAKPOINT) {
236258
const innerDiv = selectedNodeRef.current.getBoundingClientRect().top;
237259
const outerDiv = timelineRef.current.getBoundingClientRect().top;
238260
timelineRef.current.scrollTop += innerDiv - outerDiv;
261+
setScroll([timelineRef.current.scrollTop, 0]);
239262
}
240-
});
263+
}, []);
241264

242265
return (
243-
<section id="Application Timeline" className="flex justify-center relative">
266+
<section id="Application Timeline" className="flex justify-center relative z-10">
244267
<RedBlob intensity={0.5} className="left-[-150px] bottom-[-50px] z-0" />
245268
<SectionWrapper id={'Application Timeline'}>
246-
<div className="relative z-10w-full">
269+
<div className="relative w-full">
247270
<div className="flex flex-col gap-6 my-12 text-white md:px-0 xs:px-6">
248271
<p className="font-semibold md:text-[32px] xs:text-[24px]">This is DTI.</p>
249272
<p className="md:font-semibold lg:text-[28px] xs:text-[20px]">
@@ -264,12 +287,12 @@ const ApplicationTimeline = () => {
264287
<Tab
265288
isSelected={cycle === 'upperclassmen'}
266289
text={'Upperclassmen'}
267-
onClick={() => setCycle('upperclassmen')}
290+
onClick={() => onTabSwitch('upperclassmen')}
268291
/>
269292
<Tab
270293
isSelected={cycle === 'freshmen'}
271294
text={'Freshmen/Transfer'}
272-
onClick={() => setCycle('freshmen')}
295+
onClick={() => onTabSwitch('freshmen')}
273296
/>
274297
</>
275298
) : (

new-dti-website/components/apply/RoleDescription.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,19 @@ const RoleDescriptions = () => {
5757
);
5858
})}
5959
</div>
60-
<div className="flex flex-col gap-5">
60+
<div className="flex flex-col">
6161
{Object.keys(applications).map((application, index) => {
6262
const roleApplication = applications[application];
6363
return (
6464
role === application && (
65-
<div key={index}>
65+
<div key={index} className="flex flex-col md:gap-6 xs:gap-4">
6666
<h3
6767
className="font-semibold lg:text-[32px] lg:leading-[38px] md:text-[24px]
6868
md:leading-[29px] xs:text-[22px]"
6969
>
7070
{roleApplication.roleName} Application
7171
</h3>
72-
<div className="space-y-2">
72+
<div className="space-y-4">
7373
<h3
7474
className="font-semibold lg:text-[24px] lg:leading-[29px] md:text-[20px]
7575
md:leading-[24px] xs:text-[14px] xs:leading-[17px]"
@@ -87,7 +87,7 @@ const RoleDescriptions = () => {
8787
))}
8888
</ul>
8989
</div>
90-
<div className="space-y-2">
90+
<div className="space-y-4">
9191
<h3
9292
className="font-semibold lg:text-[24px] lg:leading-[29px] md:text-[20px]
9393
md:leading-[24px] xs:text-[14px] xs:leading-[17px]"

new-dti-website/components/apply/data/applications.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"skills": [
66
"A curious, inventive and communicative investigator",
77
"Eagerness to learn new technologies and applications",
8+
"Conduct code reviews to ensure quality and consistency",
89
"Experience in computer science or app/web development (specific technologies will be taught in DTI, so no expert knowledge required)"
910
],
1011
"responsibilities": [

new-dti-website/config.json

+13-22
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"semester": "Fall 2024",
3-
"applicationDeadline": "September 1, 2024 11:59:59 PM",
2+
"semester": "Spring 2025",
3+
"applicationDeadline": "January 30, 2025 11:59:59 PM",
44
"freshmanAppDeadline": "October 24, 2024 11:59:59 PM",
55
"applicationLink": "https://forms.gle/F9tFrW88a2Xoa9D49",
66
"coffeeChatLink": "https://docs.google.com/spreadsheets/d/1jDrkQ61h41w0kw6gITUJJiJ-yQtE_WfBZbHvVow17ik",
@@ -15,25 +15,25 @@
1515
"link": "https://forms.gle/F9tFrW88a2Xoa9D49",
1616
"freshmen": { "date": "August 21", "isTentative": false },
1717
"upperclassmen": { "date": "August 21", "isTentative": false },
18-
"spring": { "date": "", "isTentative": false }
18+
"spring": { "date": "January 3", "isTentative": false }
1919
},
2020
{
2121
"title": "Information Session 1",
22-
"description": "Come join us for a session to learn about DTI, our goals, and our subteams. There will be time to chat with DTI members of all roles after!",
22+
"description": "Come join us for a session to learn about DTI, our goals, and our subteams. There will be time to chat with DTI members of all roles after! And if you can’t make this session, check out the Information Session 2 below.",
2323
"location": "Goldwin Smith Hall G26",
2424
"type": "info",
2525
"freshmen": { "date": "September 30", "isTentative": false, "time": "5-6PM" },
2626
"upperclassmen": { "date": "August 27", "isTentative": false, "time": "5-6PM" },
27-
"spring": { "date": "", "isTentative": false }
27+
"spring": { "date": "January 23", "isTentative": true }
2828
},
2929
{
3030
"title": "Information Session 2",
31-
"description": "We're welcoming any and all students who are looking to make a difference through tech. Applicants are not considered on a rolling basis.",
31+
"description": "Another session to learn about DTI and to chat with our members. All applicants are encouraged to attend one of the information sessions.",
3232
"location": "Goldwin Smith Hall G22",
3333
"type": "info",
3434
"freshmen": { "date": "October 12", "isTentative": false, "time": "11AM-12PM" },
3535
"upperclassmen": { "date": "September 2", "isTentative": false, "time": "6:30-7:30PM" },
36-
"spring": { "date": "", "isTentative": false }
36+
"spring": { "date": "January 28", "isTentative": true }
3737
},
3838
{
3939
"title": "Applications due",
@@ -43,42 +43,33 @@
4343
"link": "https://forms.gle/F9tFrW88a2Xoa9D49",
4444
"freshmen": { "date": "October 17", "isTentative": false },
4545
"upperclassmen": { "date": "September 4", "isTentative": false },
46-
"spring": { "date": "", "isTentative": false }
46+
"spring": { "date": "January 30", "isTentative": false }
4747
},
4848
{
4949
"title": "Behavioral Interviews",
50-
"description": "Something something behaviorals.",
50+
"description": "Prepare to talk about past projects, teamwork experiences, and your motivation for joining DTI.",
5151
"location": "Varying locations",
5252
"type": "interview",
5353
"freshmen": { "date": "October 22-24", "isTentative": true },
5454
"upperclassmen": { "date": "September 10-12", "isTentative": false },
55-
"spring": { "date": "", "isTentative": false }
55+
"spring": { "date": "February 1-3", "isTentative": true }
5656
},
5757
{
5858
"title": "Technical Interviews",
59-
"description": "Something something technicals.",
59+
"description": "Demonstrate your technical skills through problem-solving challenges relevant to your subteam.",
6060
"location": "Varying locations",
6161
"type": "interview",
6262
"freshmen": { "date": "October 26-28", "isTentative": true },
6363
"upperclassmen": { "date": "September 14-16", "isTentative": false },
64-
"spring": { "date": "", "isTentative": false }
65-
},
66-
{
67-
"title": "Freshmen Recruitment Event",
68-
"description": "Get to know Cornell and DTI!",
69-
"location": "Duffield Atrium",
70-
"type": "info",
71-
"freshmen": { "date": "October 1", "isTentative": false, "time": "4-5PM" },
72-
"upperclassmen": { "date": "", "isTentative": false },
73-
"spring": { "date": "", "isTentative": false }
64+
"spring": { "date": "February 9-11", "isTentative": true }
7465
},
7566
{
7667
"title": "Offers extended",
7768
"description": "Offers get sent out!",
7869
"type": "offer",
7970
"freshmen": { "date": "October 30", "isTentative": false },
8071
"upperclassmen": { "date": "September 18", "isTentative": false },
81-
"spring": { "date": "", "isTentative": false }
72+
"spring": { "date": "February 12", "isTentative": false }
8273
}
8374
],
8475
"trends_instructors": ["ow39", "sci24", "cc2785"]

new-dti-website/src/app/apply/page.tsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,13 @@ const ApplyCoffeeChat = () => (
7676
Feel free to chat with any of us over email, coffee, lunch-we're happy to help!
7777
</p>
7878
<div className="flex md:flex-row xs:flex-col gap-3">
79-
<a href={config.coffeeChatLink} className="primary-button">
79+
<a href={config.coffeeChatLink} className="primary-button xs:w-full md:w-fit text-center">
8080
Coffee chat with us
8181
</a>
82-
<a href={config.coffeeChatFormLink} className="secondary-button secondary-button--red">
82+
<a
83+
href={config.coffeeChatFormLink}
84+
className="secondary-button secondary-button--red xs:w-full md:w-fit text-center"
85+
>
8386
Don't know who to chat with?
8487
</a>
8588
</div>

new-dti-website/src/app/globals.css

+4
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,10 @@ summary {
256256
padding-right: 1rem;
257257
}
258258

259+
summary::-webkit-details-marker {
260+
display: none;
261+
}
262+
259263
summary::after {
260264
content: '';
261265
width: 13px;

0 commit comments

Comments
 (0)