-
Notifications
You must be signed in to change notification settings - Fork 489
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
feat: peers page #726
feat: peers page #726
Conversation
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.
@hacdias Slow when scrolling or fetching the flags? I'm using I can add the margin, but it was not supposed to appear |
@fsdiogo it seems that Windows Flag emojis are just the country code sadly. Yesterday it seemed more slower. When I resize the page and scroll it seems a bit slow |
@hacdias ohh, so the flags aren't rendering on Windows? 😓 Can you test the following please (I don't have a windows machine): In the { rowData.flagCode ? <CountryFlag code={rowData.flagCode} svg /> : '🏳️🌈' } That way we are force rendering the flags to SVG instead of emoji. Maybe it will work. |
Yes, that way they render: Still, we need some margin there |
@hacdias awesome, thanks! It doesn't look as good as with the emojis though: We have two options here:
What do you think? |
Yeah, the emojis are better even though they are platform dependent. You can render with SVGs on Windows or let it use the Windows "emojis". If we render SVGs conditionally, I don't think there's a need to add a dependency when we can just: svg={window.navigator.appVersion.indexOf('Win') !== -1} |
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.
Despite that comment bellow, the code LGTM and I think it can be merged 😄
src/bundles/peers.js
Outdated
return peers && peers.map((peer, idx) => ({ | ||
'id': peer.peer.toB58String(), | ||
'address': peer.addr.toString(), | ||
'location': 'New York, United States' |
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.
Why's New York here?
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.
Oops, that selector is not being used, I made a new below. I'll commit a fix.
src/peers/PeersTable/PeersTable.css
Outdated
@@ -0,0 +1,4 @@ | |||
|
|||
.PeersTableContainer { | |||
height: 220px; |
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.
Minor, but I'd just use an inline style attributes for this as the value is duplicated in the definition of the table. I'd inline .MapContainer
as well, just to keep all the definitions together.
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.
Agree, and that way we can delete those two CSS files 👍
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.
Can we merge this? 🚀 |
@fsdiogo here we go 😄 |
Tasks:
Closes #700.