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

Portal schema changes #591

Merged
merged 9 commits into from
Aug 4, 2024
Merged

Portal schema changes #591

merged 9 commits into from
Aug 4, 2024

Conversation

martincai8
Copy link
Contributor

@martincai8 martincai8 commented Jul 27, 2024

Description

made `copyText` and `headerText` dynamic (the application dashboard page is fully dynamic now)
  • removed safewalk option for HC
Status Image
inProgress image
applied image
waitlisted image
rejected image
acceptedNoResponseYet image
acceptedAndAttending image
updated livesite schema to:
{
   "hackathonStart":{
      "cmd-f":"2025-03-08T17:00:00.000Z",
      "nwhacks":"2025-01-18T17:00:00.000Z",
      "hackcamp":"2024-11-09T17:00:00.000Z"
   },
   "applicationsOpen":{
      "cmd-f":true,
      "nwhacks":false,
      "hackcamp":false
   },
   "hackathonEnd":{
      "cmd-f":"2025-03-10T01:00:00.000Z",
      "hackcamp":"2024-11-11T01:00:00.000Z",
      "nwhacks":"2025-01-20T01:00:00.000Z"
   },
   "notionLinks":{
      "nwhacks":{
         "preHackathonWorkshops":""
      },
      "cmd-f":{
         "preHackathonWorkshops":"https://nwplus.notion.site/PUBLIC-cmd-f-2024-Pre-Hackathon-Workshops-b2429635e65a4e79957a63bfd3d8b27d?pvs=4"
      },
      "hackcamp":{
         "preHackathonWorkshops":""
      }
   },
   "hackingStart":{
      "hackcamp":"2024-08-09T20:00:00.000Z",
      "cmd-f":"2025-03-08T20:00:00.000Z",
      "nwhacks":"2025-01-18T20:00:00.000Z"
   },
   "judgingOpen":{
      "nwhacks":false,
      "hackcamp":false,
      "cmd-f":true
   },
   "applicationDeadline":{
      "cmd-f":"February 22nd at 11:59 PM (Pacific Time)",
      "hackcamp":"October 31st at 11:59 PM (Pacific Time)",
      "nwhacks":"December 4th at 11:59 PM (Pacific Time)"
   },
   "lastEdited":{
      "seconds":1720119063,
      "nanoseconds":910000000
   },
   "rsvpBy":{
      "hackcamp":"November 5th at 11:59 PM (Pacific Time)",
      "cmd-f":"March 2nd at 11:59 PM (Pacific Time)",
      "nwhacks":"January 15th at 11:59 PM (Pacific Time)"
   },
   "hackathonWeekend":{
      "nwhacks":"January 18th-19th",
      "hackcamp":"November 9th-10th",
      "cmd-f":"March 8th-9th"
   },
   "hackingEnd":{
      "nwhacks":"2025-01-19T20:00:00.000Z",
      "hackcamp":"2024-11-10T20:00:00.000Z",
      "cmd-f":"2025-03-09T20:00:00.000Z"
   },
   "lastEditedBy":"",
   "judgingReleased":{
      "cmd-f":false,
      "hackcamp":false,
      "nwhacks":false
   },
   "sendAcceptancesBy":{
      "nwhacks":"early January",
      "cmd-f":"early March",
      "hackcamp":"early November"
   },
   "offWaitlistNotify":{
      "nwhacks":"January 15th at 11:59 PM (Pacific Time)",
      "hackcamp":"November 5th at 11:59 PM (Pacific Time)",
      "cmd-f":"March 2nd at 11:59 PM (Pacific Time)"
   },
   "submissionsOpen":{
      "cmd-f":false,
      "nwhacks":false,
      "hackcamp":false
   },
   "waiversAndForms":{
      "cmd-f":{
         "media":"https://docs.google.com/document/d/175Rsgz5HXUpfPUqNbRpPrJTmqqxFfhxZJBXNFMDX0SU/edit?usp=sharing",
         "nwMentorship":"https://forms.gle/nG9vwzc5HG5X5jVB8",
         "releaseLiability":" https://docs.google.com/document/d/1BfDr_S2FNNl7Xfv0fncZLzUV2pq0O91z6k6xwiN4gPw/edit?usp=sharing",
         "covid":"https://docs.google.com/document/d/1OlcOiEPSjngFKFEndG6wBBOYm02JTpY3KldeJ9GCfIo/edit?usp=sharing"
      },
      "nwhacks":{
         "nwMentorship":"",
         "media":"",
         "releaseLiability":"",
         "covid":""
      },
      "hackcamp":{
         "media":"",
         "releaseLiability":"",
         "nwMentorship":"",
         "covid":""
      }
   }
}
  • added waiversAndForms (moved out of Constants.js) and notionLinks to the schema since these will be different every hackathon

Note: leaving rsvpOpen alone for now (slack thread)

Manual testing

  • toggle the different feature flags (all the ones that end in Open) and make sure that the app reflects the changes

Copy link

github-actions bot commented Jul 27, 2024

Visit the preview URL for this PR (updated for commit 20ffda3):

https://nwplus-ubc--pr591-portal-schema-change-rypvrj4e.web.app

(expires Sat, 10 Aug 2024 18:52:47 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 8c7ea898e009e43455645bc310bcbccfc0f87e48

@martincai8 martincai8 force-pushed the portal-schema-change branch from 20db37f to 50b7c1d Compare July 27, 2024 18:50
@martincai8 martincai8 marked this pull request as ready for review July 30, 2024 01:00

const projectRef = projectsRef(dbHackathonName)
if (!projectRef) {
console.error('projectsRef returned undefined')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left console.error messages in here because i'm scared of it breaking LOL

Comment on lines 101 to 121
useEffect(() => {
const retrieveApplication = async () => {
if (!user) return
if (!user) {
setIsLoading(false)
return
}
const app = await getUserApplication(user.uid, dbHackathonName)
fillMissingProperties(app, HACKER_APPLICATION_TEMPLATE)
setApplication(app)
applicationRef.current = app
setUpdated(false)
setIsLoading(false)
}
retrieveApplication()
return async () => {
await forceSave()

return () => {
if (user) {
forceSave()
}
}
}, [forceSave, user, dbHackathonName])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conslidated the two useEffects from earlier in the file (the ones I commented out) because they appear to do the same thing

Copy link
Member

@DonaldKLee DonaldKLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, this looks really good! Code is clean, ur cracked!

Copy link
Contributor

@tdanielles tdanielles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


too cracked 🤯 -- lgtm!

@martincai8 martincai8 merged commit 1c24113 into dev Aug 4, 2024
2 checks passed
@martincai8 martincai8 deleted the portal-schema-change branch August 4, 2024 05:34
@byronwang93
Copy link
Contributor

cracked developer 😮‍💨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants