Skip to content
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

Added loading state and adjusted tweet height in TwitterTimelineEmbed #3256

Closed
wants to merge 2 commits into from

Conversation

osdas
Copy link

@osdas osdas commented Sep 25, 2024

Description

Implemented a loading state for the Twitter embed to improve user experience by showing a "Loading Tweets..." message while the tweets are being fetched.

Adjusted the height of the embedded Twitter timeline to 400px for better display control and to limit the space taken up by the tweets.

Ensured that only a limited number of tweets are displayed by utilizing the tweetLimit option.

@asyncapi-bot
Copy link
Contributor

asyncapi-bot commented Sep 25, 2024

We require all PRs to follow Conventional Commits specification.
More details 👇🏼

 No release type found in pull request title "Added loading state and adjusted tweet height in TwitterTimelineEmbed". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

Copy link

netlify bot commented Sep 25, 2024

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 71fe576
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/66f728cb5fcaf6000891b973
😎 Deploy Preview https://deploy-preview-3256--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@asyncapi-bot
Copy link
Contributor

asyncapi-bot commented Sep 25, 2024

⚡️ Lighthouse report for the changes in this PR:

Category Score
🔴 Performance 37
🟢 Accessibility 98
🟢 Best practices 92
🟢 SEO 100
🔴 PWA 33

Lighthouse ran on undefined

@@ -78,7 +84,13 @@ export default function Newsroom() {
</div>
<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' }} />
{!isLoaded && <p> Loading Tweets... </p>}
Copy link
Member

Choose a reason for hiding this comment

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

There is a loader component present in the codebase. You should use that here.

@@ -78,7 +84,13 @@ export default function Newsroom() {
</div>
<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' }} />
{!isLoaded && <p> Loading Tweets... </p>}
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 will look nicer, if the twitter timeline component while loading has the same height as that of the loaded twitter timeline component? 🤔

@akshatnema what's your suggestion on this?

@Mayaleeeee
Copy link
Member

Hey @osdas,

Could you please point me to where I can find this issue in the deploy preview? I'm reviewing the PR, but I'm not sure exactly where to look.

Is it related to the X logo in the footer, or is it somewhere else?

Thanks for your help!

@sambhavgupta0705
Copy link
Member

closing this as no response

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.

6 participants