-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(fe): implement test in code editor (#2093)
* feat(fe): add test button, implement poll request * feat(fe): implement testcase panel with dummy data * chore(fe): edit table row style * feat(fe): store test result * chore(fe): delete console.log * feat(fe): show wrong testcase numbers, adjust table style * feat(fe): implement testcase tabs * feat(fe): edit tab style * feat(fe): implement test result detail * feat(fe): implement delete tab button * fix(fe): fix testcase tab style * refactor(fe): componentize TestcaseTab TestSummary TestResultDetail * feat(fe): add output in testcase result * chore(fe): specify type statement Co-authored-by: Eunbi Kang <[email protected]> * chore(fe): execute prettier * chore(fe): add padding bottom to panel, add ellipsis to long input output * chore(fe): add pre wrap for labeled field * chore(fe): simplify long styles using truncate --------- Co-authored-by: Jaehyeon Kim <[email protected]> Co-authored-by: Eunbi Kang <[email protected]>
- Loading branch information
1 parent
9eb1887
commit 6ec6c5b
Showing
8 changed files
with
532 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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 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 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
31 changes: 31 additions & 0 deletions
31
apps/frontend/components/EditorResizablePanelWithContext.tsx
This file contains 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,31 @@ | ||
'use client' | ||
|
||
import EditorResizablePanel from '@/components/EditorResizablePanel' | ||
import { TestResultsContext, createTestResultsStore } from '@/stores/editor' | ||
import type { Contest, ProblemDetail } from '@/types/type' | ||
|
||
export default function EditorResizablePanelWithContext({ | ||
problem, | ||
contestId, | ||
contest, | ||
children | ||
}: { | ||
problem: ProblemDetail | ||
contestId?: number | undefined | ||
contest?: Contest | undefined | ||
children: React.ReactNode | ||
}) { | ||
const testResultsStore = createTestResultsStore(problem.id, contestId) | ||
|
||
return ( | ||
<TestResultsContext.Provider value={testResultsStore}> | ||
<EditorResizablePanel | ||
problem={problem} | ||
contestId={contestId} | ||
enableCopyPaste={contest ? contest.enableCopyPaste : true} | ||
> | ||
{children} | ||
</EditorResizablePanel> | ||
</TestResultsContext.Provider> | ||
) | ||
} |
Oops, something went wrong.