asyncapi / website

AsyncAPI specification website
https://www.asyncapi.com
Apache License 2.0
437 stars 577 forks source link

[BUG] tweetLimit in community/newsroom isn't been reflected #3132

Open Saumya40-codes opened 1 month ago

Saumya40-codes commented 1 month ago

Describe the bug.

Currently in community/newsroom page here, we are using TwitterTimelineEmbed from react-twitter-embed package to show the twitter timeline, though we have mentioned tweetLimit:2 in our code, it isn't being reflect upon.

The code block

<div className='w-full px-2 md:w-1/2 md:pl-4 md:pr-0'>
    <div className='mx-auto mt-8 w-full rounded-xl shadow-md md:mt-0' data-testid='Newsroom-Twitter'>
      <TwitterTimelineEmbed sourceType='profile' screenName='AsyncAPISpec' options={{ tweetLimit: '2' }} />
    </div>
  </div>

Due to this many tweets are being loaded all together.

Expected behavior

Only limited amount of latest tweets should be shown, but when I looked within the react-twitter-embed package, this surely doesn't seem to be possible (as there are many issues already related to that like this ), but what we can do is to make the component scrollable by setting a specific height in the options attribute of the component, as it was mentioned in the package's source code:

image

Expected behaviour at the end should look something like this:

https://github.com/user-attachments/assets/e15c32e8-fc24-4b98-9ba5-8f5b22650a30

I'll make sure this aligns well with the current existing UI above just shows a probable fix to this.

Screenshots

Current Behaviour:

https://github.com/user-attachments/assets/bfef83f6-4127-4e5d-8a43-35f3826fafc6

How to Reproduce

visit this page and head over to Latest News section

🥦 Browser

Google Chrome

👀 Have you checked for similar open issues?

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

Yes I am willing to submit a PR!

sambhavgupta0705 commented 1 month ago

image

I am seeing this @Saumya40-codes would you like to work on this issue

sambhavgupta0705 commented 1 month ago

/gfi

asyncapi-bot commented 1 month ago

Hey @sambhavgupta0705, your message doesn't follow the requirements, you can try /help.

Saumya40-codes commented 1 month ago

image

I am seeing this @Saumya40-codes would you like to work on this issue

Yes i'll like to fix this!

It looking like that most probably because your current device isnt being logged in to Twitter/X, I'll try to look for some fix here so that it can be looked publically

Saumya40-codes commented 1 month ago

Additionally should we also consider adding scrollbar to contain the amount of tweets being show? (as I mentioned in the main issue)

HalfToothed commented 1 month ago

i am using Firefox Developer Edition and i am not able to see the twitter section, it is working as expected in google chrome and microsoft edge

Screenshot 2024-08-10 114757

vin-dKR commented 3 weeks ago

I had the same experience with the X timeline. After some research, I discovered that Twitter timelines can be generated using https://publish.twitter.com/ . However, it seems that this feature is not enabled for every account. Specifically, accounts with a blue tick have their timelines displayed correctly, while most accounts without a blue tick are not showing their tweets, there are some non-blue tick accounts that do display their timelines correctly. This discrepancy might be the root cause of the issue we're experiencing. image