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

loading content for each episode #762

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

nour-massri
Copy link

@nour-massri nour-massri commented Mar 16, 2024

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 🚀

@nour-massri
Copy link
Author

will work on better style for QuickStart, Resources by either using Section Cards just like home or modifying the DocumentationPage component

Copy link
Contributor

@lowtorola lowtorola left a 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.

Comment on lines +183 to +184
{ path: "debuggingtips", element: <DebuggingTips /> },
{ path: "commonissues", element: <CommonIssues /> },
Copy link
Contributor

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

frontend2/src/content/ContentStruct.ts Show resolved Hide resolved
frontend2/src/content/ContentStruct.ts Show resolved Hide resolved
Comment on lines +2 to +5
CommonIssuesPageKey,
QuickStartedPageKey,
ResourcesPageKey,
TourneyPageKey,
Copy link
Contributor

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...)

frontend2/src/content/bc22.ts Show resolved Hide resolved
@@ -177,6 +180,8 @@ const router = createBrowserRouter([
},
],
},
{ path: "debuggingtips", element: <DebuggingTips /> },
Copy link
Contributor

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;
Copy link
Contributor

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 => {
Copy link
Contributor

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>
Copy link
Contributor

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
Copy link
Contributor

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?

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.

Dynamic Markdown Content Injection
2 participants