feat: Migrate WDC-related forms to new paths and add hackathon submission form#50
Conversation
👷 Deploy request for codetv-automations pending review.Visit the deploys page to approve it
|
|
| Name | Link |
|---|---|
| 🔨 Latest commit | 5e9dd86 |
✅ Deploy Preview for codetv-links ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Still working on the actions, but if/when you want to take this over, I'm happy to merge this into any other branch you'd like. Not sure how to tie this into a specific hackathon or what system you want to introduce for that, but I think a straightforward approach would be to say which hackathon the user is submitting to. |
jlengstorf
left a comment
There was a problem hiding this comment.
This looks great! I'll take it from here and wire it up with the env vars to check that it's all working as expected, but this is SO helpful. Thank you!
| <div class="instructions"> | ||
| <h1>Web Dev Challenge Hackathon Submission</h1> | ||
| <p> | ||
| Thanks so much for taking part of the Web Dev Challenge Hackathon! This form will let you submit your hackathon project for [INSERT HACKATION HERE]. |
There was a problem hiding this comment.
TODO: we'll need to set this up to correspond to the specific hackathon
There was a problem hiding this comment.
Seeing that you have a calendar integration already, I wonder if you could set up date ranges for each hackathon with an indicator for the active hackathon?
There's also the possibility of turning this into its own component or system to allow for multiple hackathons at once.
| id="githubRepo" | ||
| class="input" | ||
| placeholder="https://www.github.com/..." | ||
| pattern="https://www.github.com/.*" |
There was a problem hiding this comment.
Something to think about: do we want to allow gitlab, etc.? We probably should. Need to think a bit about whether that presents any issues. Probably not?
There was a problem hiding this comment.
As long as it's a public link to the code's repository, I don't see the harm in allowing links to other repositories unless there are deeper integrations planned.
| By submitting your email address to CodeTV as part of this promotion, you agree and consent that you may be contacted by CodeTV or one of CodeTV’s successors or assigns to notify you if you are selected as a winner, send you updates about future CodeTV promotions, and send you other CodeTV news. You may opt out of any emails from CodeTV by clicking the unsubscribe button at the bottom of any email received from CodeTV. Additionally, CodeTV will share your name and email address with the sponsor of this promotion. By submitting your name and email address to CodeTV as part of this promotion, you agree and consent to allow CodeTV to share your name and email address with the sponsor of this promotion. Once shared, CodeTV will have no control over how the sponsor communicates with you or what the sponsor does with your name and email address; you must communicate directly with the sponsor to manage any communications with the sponsor. | ||
| </p> | ||
| <p> | ||
| You further agree that, unless you affirmatively opt out by unchecking the box in the entry form, the sponsor of this promotion may display your App at its discretion as an example of how to use their tool or technology to build an app. |
There was a problem hiding this comment.
| You further agree that, unless you affirmatively opt out by unchecking the box in the entry form, the sponsor of this promotion may display your App at its discretion as an example of how to use their tool or technology to build an app. | |
| You further agree that, unless you affirmatively opt out by unchecking the box in the entry form, CodeTV and the sponsor of this promotion may display your App at their sole discretion for marketing, educational, and promotional purposes. |
There was a problem hiding this comment.
expanding this language to allow for using the apps in CodeTV pages, etc.
| <button type="submit" class="button">Submit</button> | ||
|
|
||
| <input type="hidden" name="id" value={userDetails._id} /> | ||
| <input type="hidden" name="username" value={user?.username} /> |
There was a problem hiding this comment.
TODO: add a hidden field identifying the specific hackathon
| .terms-conditions { | ||
| background: var(--bg); | ||
| border: 1px solid color-mix(in oklch, var(--text-muted) 25%, transparent); | ||
| border-radius: 3px; | ||
| display: block; | ||
| font-size: 0.875em; | ||
| margin-block-start: 16px; | ||
| max-block-size: 35dvb; | ||
| overflow-y: scroll; | ||
| padding: 8px; | ||
| } |
There was a problem hiding this comment.
probably need to pull this out into a shared stylesheet (probably need to pull a LOT of CSS out into shared stylesheets lol)
or, maybe the terms stuff should be wrapped up in a component? might be the responsible choice
There was a problem hiding this comment.
I may have thought to make a PR to introduce a Storybook integration and start a CodeTV design system.
There was a problem hiding this comment.
definitely not a bad idea. I haven't looked at Storybook + Astro
|
|
||
| .checkbox { | ||
| inline-size: 20px; | ||
| min-width: 20px; |
There was a problem hiding this comment.
was this causing issues on a certain browser? the inline-size should be handling this, I would think
There was a problem hiding this comment.
In Chrome, at least, I found the checkbox for the sharing opt-out checkbox group was smaller than the TOC agreement checkbox group despite having the same markup. I think it came down to there being more text content in the former of the two checkbox groups. I tried things like min-inline-size and flex-grow but this worked best to keep it consistent.
|
|
||
| const res = await fetch( | ||
| `https://sheets.googleapis.com/v4/spreadsheets/${config.sheet.id}/values/${config.sheet.range}:append?valueInputOption=USER_ENTERED&insertDataOption=INSERT_ROWS`, | ||
| `https://sheets.googleapis.com/v4/spreadsheets/${config.sheets.filming.id}/values/${config.sheets.filming.range}:append?valueInputOption=USER_ENTERED&insertDataOption=INSERT_ROWS`, |
There was a problem hiding this comment.
TODO think through how this should work. spreadsheet per hackathon? (probably yes) or could be a single sheet that can be filtered by hackathon, or one spreadsheet with multiple tabs
whatever solution, probably need to adjust the config a bit here
| tocAgreement: boolean; | ||
| doNotShare: boolean; | ||
| }) { | ||
| const accessToken = await getGoogleAccessToken(); |
There was a problem hiding this comment.
TODO might want to move this into its own step in the workflow in case we do other Google things and want to share the token
| * I've updated libs/inngest/src/integrations/google/config.ts, changing the `sheet` | ||
| * property into an object for `filming` and `hackathon`. The latter of course needs a new id, | ||
| * but the rest should work the same. | ||
| */ |
There was a problem hiding this comment.
yep, all looking good. thank you!
| githubRepo: z.string(), | ||
| deployedApp: z.string(), | ||
| tocAgreement: z.boolean(), | ||
| doNotShare: z.boolean(), |
There was a problem hiding this comment.
TODO: check if this one needs to be optional
There was a problem hiding this comment.
The doNotShare should be optional. I can make another PR to fix that later.
5851a40
into
codetv-dev:feat/wdc-hackathon-forms
This moves the filming submission form from
/forms/web-dev-challengeto/forms/web-dev-challenge/filming, and adds a new route for the hackathon submission form at/forms/web-dev-challenge/hackathon. This will have effects onforms/discordandforms/submittedthat need to be addressed before this goes live.To-dos: