-
Notifications
You must be signed in to change notification settings - Fork 3
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
loading content for each episode #762
base: main
Are you sure you want to change the base?
Conversation
will work on better style for QuickStart, Resources by either using Section Cards just like home or modifying the DocumentationPage component |
…in tips page, possible improvements on the style of resources and QuickStart pages using HTML cards style just like Tournaments page
a2fab4e
to
f2e6e3b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! I really like this content management system, especially its type-safety. Beyond the few small nits I noted, we should definitely brainstorm ways to handle duplicate/very similar content between years at our hack session this week.
{ path: "debuggingtips", element: <DebuggingTips /> }, | ||
{ path: "commonissues", element: <CommonIssues /> }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: move these in between the team profile page and page not found
CommonIssuesPageKey, | ||
QuickStartedPageKey, | ||
ResourcesPageKey, | ||
TourneyPageKey, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to run npm run lint
or npm run format
to make sure any lint issues are fixed before committing (idk why these aren't thrown as errors by our CD pipeline though...)
@@ -177,6 +180,8 @@ const router = createBrowserRouter([ | |||
}, | |||
], | |||
}, | |||
{ path: "debuggingtips", element: <DebuggingTips /> }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: prefer hyphenation for multi-word url paths (i.e. debugging-tips
)
import { BC23_TOURNAMENTS } from "./bc23"; | ||
import { BC22_TOURNAMENTS } from "./bc22"; | ||
|
||
export const defaultQuickStartText = BC24_QUICKSTART; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw some issues with certain text fields showing "2024" even when we're on the 2022/23 version of this page (and, in general, mix-ups with years). I think defaulting content pages is, in general, not preferable. We should discuss this at this week's hack session and see if we can all come to an agreement on how we want to manage/handle duplicate content.
import SectionCard from "../components/SectionCard"; | ||
import { CommonIssuesPage } from "../content/ContentStruct"; | ||
|
||
const DebuggingTips = (): JSX.Element => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: prefer React.FC
instead of JSX.Element
here
return ( | ||
<div className="flex h-full w-full flex-col overflow-y-auto bg-white p-6"> | ||
<div className="flex flex-1 flex-col gap-8"> | ||
<SectionCard> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to move the section title to the title
prop of SectionCard
instead of in the markdown? I think it could be.
|
||
Battlecode 2022 will have several tournaments throughout the month! We stream and commentate all tournaments online. The deadline to submit code for each non-final tournament is usually 7 pm EST the day before the tournament. | ||
`, | ||
prizes: `# Prizes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were these the prizes for BC22?
Modified src/content folder to add a content file for each episode
created ManageContent.ts to create records: <episode_id, text> for each content page: quickstart, resources and tournaments
created ContentStrucuts.ts to manage types used in Tournament record
Closes #785 🚀