Skip to content

Select Dropdown for Round Label - #102

Merged
noahm merged 4 commits into
noahm:tournament-modefrom
Thanhqd90:tournament-mode
Sep 23, 2022
Merged

Select Dropdown for Round Label#102
noahm merged 4 commits into
noahm:tournament-modefrom
Thanhqd90:tournament-mode

Conversation

@Thanhqd90

Copy link
Copy Markdown
Contributor

Updated round label from text field to a dropdown with commonly used round labels used in standard double elimination tournaments.

@vercel

vercel Bot commented Sep 22, 2022

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
ddr-tools ✅ Ready (Inspect) Visit Preview Sep 23, 2022 at 1:11AM (UTC)

@noahm noahm left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just leaving some notes as FYIs. I'll still merge and fix in the branch afterwards.

Comment on lines +17 to +19
const AppToaster = Toaster.create({
position: Position.BOTTOM
});

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The app actually has a shared global toaster that can be imported instead of creating a new one here


let coreControl: JSX.Element;
// Remove outline from link icon
let removeOutline = {backgroundColor: 'transparent', boxShadow: 'none', outline: 'none'};

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can mostly be accomplished with the minimal prop on the Blueprint button component.

{ title: "Loser's Finals"},
{ title: "Casuals"},
{ title: "Warmup"},
{ title: "Freeplay"},

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally these will all be localized strings (eventually)

Comment on lines +98 to +102
export const roundLabelProps = {
itemPredicate: filterRoundLabel,
itemRenderer: renderRoundLabel,
items: roundLabels
};

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be unused as all the individual members are exported separately?

const RoundLabel = Select2.ofType<IRoundLabel>();

export const RoundSelect: React.FC = () => {
const [roundLabel, setRoundLabel] = useState<IRoundLabel>(roundLabels[0]);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than save this as state local to this component, we need to save this to the state of the drawing (which will then cause it to sync over the network, when enabled)

@noahm
noahm merged commit c5a08c7 into noahm:tournament-mode Sep 23, 2022
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.

2 participants