-
Notifications
You must be signed in to change notification settings - Fork 24
Tournament Discovery #3955
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
Open
ncarazon
wants to merge
18
commits into
main
Choose a base branch
from
feat/tournaments-discovery
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Tournament Discovery #3955
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
219fa26
feat: set up new tournaments page shell
ncarazon 1a78f81
refactor: introduce provider
ncarazon 96e081c
feat: add hero
ncarazon 42b4bb7
feat: add info popover
ncarazon b4b3c29
feat: make header sticky
ncarazon 9950e2d
feat: add mobile adaptation
ncarazon 159deaf
feat: add live tournament cards
ncarazon dc178e0
feat: add cards mobile adaptation
ncarazon e948a34
feat: handle filter/info overlapping
ncarazon f21cdb2
feat: question series cards
ncarazon b477c38
feat: add index cards
ncarazon 72d63b0
refactor: tournament cards
ncarazon bc1c1cf
feat: add archived cards rendering
ncarazon ba143e9
feat: adapt index cards & add img fallbacks
ncarazon c4054e3
chore: remove old screen
ncarazon a2166c4
chore: move cached fns into cached file
ncarazon 8533500
feat: add not found screen
ncarazon f6837fd
feat: hide components for specific pages
ncarazon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
front_end/src/app/(main)/(tournaments)/tournaments/archived/page.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import ServerProjectsApi from "@/services/api/projects/projects.server"; | ||
|
|
||
| import ArchivedTournamentsGrid from "../components/tournaments_grid/archived_tournaments_grid"; | ||
| import TournamentsScreen from "../components/tournaments_screen"; | ||
|
|
||
| const ArchivedPage: React.FC = async () => { | ||
| const tournaments = await ServerProjectsApi.getTournaments(); | ||
| const nowTs = Date.now(); | ||
| return ( | ||
| <TournamentsScreen | ||
| current="archived" | ||
| tournaments={tournaments} | ||
| nowTs={nowTs} | ||
| > | ||
| <ArchivedTournamentsGrid /> | ||
| </TournamentsScreen> | ||
| ); | ||
| }; | ||
|
|
||
| export default ArchivedPage; |
75 changes: 0 additions & 75 deletions
75
front_end/src/app/(main)/(tournaments)/tournaments/components/tournament_filters.tsx
This file was deleted.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
front_end/src/app/(main)/(tournaments)/tournaments/components/tournament_tabs.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import React from "react"; | ||
|
|
||
| import TournamentsTabsShell from "./tournaments-tabs-shell"; | ||
| import { Section, TournamentsSection } from "../types"; | ||
|
|
||
| type Props = { current: TournamentsSection }; | ||
|
|
||
| const TournamentsTabs: React.FC<Props> = ({ current }) => { | ||
| const sections: Section[] = [ | ||
| { | ||
| value: "live", | ||
| href: "/tournaments", | ||
| label: "Live Tournaments", | ||
| }, | ||
| { | ||
| value: "series", | ||
| href: "/tournaments/question-series", | ||
| label: "Question Series", | ||
| }, | ||
| { | ||
| value: "indexes", | ||
| href: "/tournaments/indexes", | ||
| label: "Indexes", | ||
| }, | ||
| { | ||
| value: "archived", | ||
| href: "/tournaments/archived", | ||
| label: "Archived", | ||
| }, | ||
| ]; | ||
|
|
||
| return <TournamentsTabsShell current={current} sections={sections} />; | ||
| }; | ||
|
|
||
| export default TournamentsTabs; | ||
41 changes: 41 additions & 0 deletions
41
front_end/src/app/(main)/(tournaments)/tournaments/components/tournaments-tabs-shell.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| "use client"; | ||
|
|
||
| import React from "react"; | ||
|
|
||
| import { Tabs, TabsList, TabsTab } from "@/components/ui/tabs"; | ||
| import cn from "@/utils/core/cn"; | ||
|
|
||
| import { Section, TournamentsSection } from "../types"; | ||
|
|
||
| type Props = { | ||
| current: TournamentsSection; | ||
| sections: Section[]; | ||
| }; | ||
|
|
||
| const TournamentsTabsShell: React.FC<Props> = ({ current, sections }) => { | ||
| return ( | ||
| <Tabs defaultValue={current} className="bg-transparent dark:bg-transparent"> | ||
| <TabsList className="gap-1 bg-transparent py-0 dark:bg-transparent lg:justify-start lg:gap-3"> | ||
| {sections.map((tab) => ( | ||
| <TabsTab | ||
| className={cn( | ||
| "px-2 text-sm no-underline sm:px-2 sm:text-sm lg:px-5 lg:text-lg" | ||
| )} | ||
| dynamicClassName={(isActive) => | ||
| !isActive | ||
| ? `hover:bg-blue-400 dark:hover:bg-blue-400-dark text-blue-800 dark:text-blue-800-dark ${tab.value === "archived" && "bg-transparent text-blue-600 dark:text-blue-600-dark lg:text-blue-800 lg:dark:text-blue-800-dark"}` | ||
| : "" | ||
| } | ||
| key={tab.value} | ||
| value={tab.value} | ||
| href={tab.href} | ||
| > | ||
| {tab.label} | ||
| </TabsTab> | ||
| ))} | ||
| </TabsList> | ||
| </Tabs> | ||
| ); | ||
| }; | ||
|
|
||
| export default TournamentsTabsShell; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Labels should be translated, and it doesn't seem they are? Ignore if they are