Skip to content
This repository was archived by the owner on Oct 21, 2022. It is now read-only.

#3 ~ events page recent tweets #31

Merged
merged 45 commits into from
Oct 11, 2018
Merged

#3 ~ events page recent tweets #31

merged 45 commits into from
Oct 11, 2018

Conversation

mts
Copy link
Contributor

@mts mts commented Sep 20, 2018

  • Adds recent tweets to events page filtering re-tweets.
  • Opens tweet when clicked
  • Moves recent tweets without header to upcoming events section
  • Documents how to change getRecentTweets Lambda function environment variables
    docs/getRecentTweets.md

screen shot 2018-10-07 at 17 11 16

screen shot 2018-10-11 at 11 57 54

@mts mts self-assigned this Sep 20, 2018
@mts mts changed the title events page recent tweets #3 ~ events page recent tweets Sep 20, 2018
@mts mts added ready to merge ready to merge feature feature labels Sep 20, 2018
Copy link
Member

@mvdam mvdam left a 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 ?;

    screen shot 2018-09-20 at 16 12 13

  • Maybe hide the retweets and only show the tweets posted by the author? (no sure tho)

};

const FancyTweetList = ({ tweets }: IFancyTweetListProps) => {
if (tweets.length > 0) {
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 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>
  )
}

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 removed the render condition anyway. It's checked one level up in NextEventsBlock.

},
};

const FancyTweetList = ({ tweets }: IFancyTweetListProps) => {
Copy link
Member

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'? 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TweetList also fine. Renamed.

@mdvanes
Copy link
Member

mdvanes commented Sep 28, 2018

In response to this review of @mvdam

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 ?;

screen shot 2018-09-20 at 16 12 13

  • Maybe hide the retweets and only show the tweets posted by the author? (no sure tho)

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):

  • on clicking the tweet it will open that tweet directly.
  • move (without header) to be displayed in the "next event details" section, to make it clear that it belongs to that event.

Another question: the event is now in the past, how do we switch to another Twitter account? Can you document this somewhere?

Copy link
Member

@mvdam mvdam left a 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 ') && (
Copy link
Member

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.

Copy link
Member

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)?

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 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',
})}
Copy link
Member

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>, .... ?

Copy link
Contributor Author

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.

@mdvanes
Copy link
Member

mdvanes commented Oct 6, 2018

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?

@mts mts merged commit 3cb141f into test Oct 11, 2018
@mts mts deleted the feature/tweet-card branch October 11, 2018 11:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature feature ready to merge ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants