Skip to content

added meaning of colors in the grid #1482

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
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions atcoder-problems-frontend/src/pages/TablePage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useMemo, useState } from "react";
import { List } from "immutable";
import { Collapse, Button, CardBody, Card } from "reactstrap";
import {
useContests,
useContestToMergedProblems,
Expand Down Expand Up @@ -33,6 +34,10 @@ interface OuterProps {
}

export const TablePage: React.FC<OuterProps> = (props) => {
const [isOpen, setIsOpen] = useState(false);

const toggle = () => setIsOpen(!isOpen);

const [activeTab, setActiveTab] = useLocalStorage<ContestCategory>(
"contestTableTab",
"ABC"
Expand Down Expand Up @@ -99,6 +104,48 @@ export const TablePage: React.FC<OuterProps> = (props) => {

return (
<div>
<Button color="primary" onClick={toggle} style={{ marginBottom: "1rem" }}>
Info
</Button>
<Collapse isOpen={isOpen}>
<Card>
<CardBody>
<p>
By Default, User ID takes the AtCoder User ID of the logged in
user. If the user is not logged in or we want to compare two
different users, then we can specify AtCoder User ID of a user and
a list of User IDs in Rivals.
</p>
<p>
After adding the User IDs, the grid below shows cells in 3
different colors.
</p>
<ol>
<li>Green</li>
<li>Yellow</li>
<li>Red</li>
</ol>
Lets say User ID of user = abcd, and User ID of Rivals = [acde,
tourist]
<ul>
<li>
A cell is colored Green when user with User ID = abcd has solved
that Problem
</li>
<li>
A cell is colored Red when user with User ID = abcd have not
solved the problem but the Rivals have solved the problem. could
not solve it and someone from the Rival list has solved that
problem.
</li>
<li>
A cell is colored Yello when the person with User ID = abcd has
tried but could not solve the problem
</li>
</ul>
</CardBody>
</Card>
</Collapse>
<Options
hideCompletedContest={hideCompletedContest}
toggleHideCompletedContest={(): void =>
Expand Down