-
Notifications
You must be signed in to change notification settings - Fork 1
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.
It looks really good so far! I have two more suggestions;
-
Can you give the tweet date a bit more contrast? Something like the color of the suggestion of @Tenchi2xh ?;
-
Maybe hide the retweets and only show the tweets posted by the author? (no sure tho)
}; | ||
|
||
const FancyTweetList = ({ tweets }: IFancyTweetListProps) => { | ||
if (tweets.length > 0) { |
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.
I think it's a bit more readable when you use an early return. Something like;
const FancyTweetList = ({ tweets }: IFancyTweetListProps) => {
if (!tweets.length) {
return null
}
return (
<Card>
...
</Card>
)
}
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.
I removed the render condition anyway. It's checked one level up in NextEventsBlock
.
}, | ||
}; | ||
|
||
const FancyTweetList = ({ tweets }: IFancyTweetListProps) => { |
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.
What especially makes this TweetList
'fancy'? 😉
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.
TweetList
also fine. Renamed.
In response to this review of @mvdam
The current design is already a great improvement, much easier to digest. I would suggest for this version: Just add an alternate text color for the date/time and leave the rest of the design. I would like to (but this can be in a card for a later version):
Another question: the event is now in the past, how do we switch to another Twitter account? Can you document this somewhere? |
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.
The layout looks really nice now, great job!
I've added some comments still. Let me know how you think about it!
</Typography> | ||
{tweets.map((tweet, index) => { | ||
return ( | ||
!tweet.text.includes('RT ') && ( |
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.
These kind of logic and filtering belongs in the container component. Can you move it to EventsContainer
? It might be convenient to use a filter instead of checking tweet.text.includes('RT ')
for each tweet.
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.
And I have one more suggestions as wel; Can you also hide tweets that start with @
(public mentions)?
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.
I do not mind either of these. Tweets are now filtered.
@@ -47,7 +53,7 @@ const Heading = ({ type, color = 'black', text }: IHeadingProps) => { | |||
} else if (type === 'h4') { | |||
return ( | |||
<h4 | |||
className={cx({ | |||
className={cx(className, { | |||
headingWhite: color === 'white', | |||
headingBlack: color === 'black', | |||
})} |
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.
I still have some doubts if this is really helping us. There is a lot of code duplication in here. Do you have concerns using -just- <h1 className={...}>...</h1>
, <h2 className={...}>...</h2>
, .... ?
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.
Using className is an option depending on bootstrap class text-white. Refined to reuse class names from props instead.
Hi @mts, I am ready to approve this but before we merge it in: how do we turn it off / switch to a different Twitter account? |
docs/getRecentTweets.md