Skip to content

Conversation

@Argn0
Copy link
Contributor

@Argn0 Argn0 commented Jun 23, 2018

fixes #771


const Summary = ({ data }) => (
<Styled>
{data.map(el => <GaugeChart value={el.winPercent} caption={el.category} />)}
Copy link
Member

Choose a reason for hiding this comment

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

It's not very clear these are winrates, they look more like proportions. I wonder if there's a good way to show both?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed the styling. Hopefully now it's more clear.

/>
</Container>
</HeroesContainer>
<Container
Copy link
Member

Choose a reason for hiding this comment

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

I think this would look better above the matches/heroes tables

props.getPlayerRecentMatches(props.playerId);
props.getPlayerHeroes(props.playerId, props.location.search);
props.getPlayerPeers(props.playerId, props.location.search);
props.getPlayerCounts(props.playerId, props.location.query);
Copy link
Member

Choose a reason for hiding this comment

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

why does this use .query instead of .search?


const limitCount = (key, field, lim) =>
counts[key].list.sort((a, b) => (
a[field] <= b[field] ? 1 : -1
Copy link
Member

Choose a reason for hiding this comment

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

can you just do b[field] - a[field]?

tower_damage: [],
duration: [],
wins: [],
game_mode: [],
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this makes sense to add to the summary?


Object.keys(counts).forEach((key) => {
switch (key) {
case 'is_radiant':
Copy link
Member

Choose a reason for hiding this comment

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

maybe we should show the top two for each, and put each in its own column? not sure if that would make it too tall.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it would be too tall.

Copy link
Member

Choose a reason for hiding this comment

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

Think we could still do top two for each but leave it one row. That would be 8 gauges (4x2)

Copy link
Member

Choose a reason for hiding this comment

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

could possibly also fit one more set of gauges, maybe the top two lane_role counts (skipping unknown)

countsError,
}) => (
<OverviewContainer>
<SummaryContainer
Copy link
Member

Choose a reason for hiding this comment

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

thinking we should add the rounded border to the summary component as well. they should look similar.

@Argn0
Copy link
Contributor Author

Argn0 commented Jun 23, 2018

I didn't localize "Win" and "Loss" because we cannot guarantee that the strings fit in any language.
I also assume that almost every Dota player understands those strings in English.

@Argn0
Copy link
Contributor Author

Argn0 commented Jun 23, 2018

I reverted the colors. The green/red was way too colorful/bright.


const GaugeChart = ({ value, caption }) => (
<Styled percent={computeMeterPercent(value)} meterColor={computeMeterColor(value)}>
<div className="caption">{caption}</div>
Copy link
Member

Choose a reason for hiding this comment

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

I think we could display the number of matches as well, maybe as parens after the category, like DIRE (1020)

</div>
</div>
</div>
<div className="win">Win</div>
Copy link
Member

Choose a reason for hiding this comment

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

maybe W and L to make it more general instead of explicitly English?

@Argn0
Copy link
Contributor Author

Argn0 commented Jun 25, 2018

Fixed.

It's really easy to read at a quick glance but also dense in information now.

@howardchung
Copy link
Member

I wonder if we could put in some kind of separator element between the gauges for each type of count.

Aside from that, I like this a lot!

@Argn0
Copy link
Contributor Author

Argn0 commented Jun 28, 2018

-added a small visual divider

edit: I actually made them more obvious now

@howardchung howardchung merged commit 98ad56d into master Jul 4, 2018
@howardchung howardchung deleted the counts-record branch July 4, 2018 06:48
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.

counts summary section on overview

3 participants