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

fixes gap between Github & View Docs Button on smaller screens (#3008) #3263

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yadavshubham01
Copy link

@yadavshubham01 yadavshubham01 commented Sep 28, 2024

On smaller screens the buttons were not properly aligned and having spacing issues.

--> Added Vertical Spacing
--> Set view docs content width to fit. ( So that only occupies width as per the content )
Before
369809700-894eb773-d1cd-4b31-b171-522ada4b7882

after
369809515-faf5fb68-8d42-4642-96de-77c2586189ee

Summary by CodeRabbit

  • New Features

    • Enhanced layout responsiveness for buttons on the Generator page.
  • Bug Fixes

    • Improved visual spacing and layout for button elements.
  • Documentation

    • Updated TypeScript configuration documentation URL for clarity.

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.

@asyncapi-bot
Copy link
Contributor

asyncapi-bot commented Sep 28, 2024

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

 No release type found in pull request title "fixes gap between Github & View Docs Button on smaller screens (#3008)". 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

netlify bot commented Sep 28, 2024

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 929b5f2
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/66ffed43743fa2000850cd59
😎 Deploy Preview https://deploy-preview-3263--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 28, 2024

⚡️ Lighthouse report for the changes in this PR:

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

Lighthouse ran on https://deploy-preview-3263--asyncapi-website.netlify.app/

Copy link

coderabbitai bot commented Oct 4, 2024

Walkthrough

The changes in this pull request include an update to a comment in the next-env.d.ts file, specifically modifying a URL reference for TypeScript documentation. Additionally, the renderButtons function in the GeneratorPage component located in pages/tools/generator.tsx has been altered to improve the layout responsiveness of buttons by updating class names and adding vertical spacing.

Changes

File Change Summary
next-env.d.ts Updated URL reference for TypeScript configuration documentation in a comment.
pages/tools/generator.tsx Modified class names in renderButtons function for GithubButton and Button components to enhance layout responsiveness; added vertical spacing to the outer div.

Poem

In the land of code where rabbits play,
A button's class found a brighter way.
With spacing added, they hop and cheer,
For every change brings new joy near!
The docs are fresh, a link now bright,
Hopping through code, all feels just right! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
pages/tools/generator.tsx (1)

35-35: Improved button layout and consistency

The changes to the "View Docs" button classes enhance its responsiveness and alignment:

  • Using md:ml-2 instead of ml-2 improves layout on smaller screens.
  • Changing to w-fit allows the button to shrink to its content width.

These modifications align well with the PR objectives. For consistency with the GitHub button, consider using w-full sm:w-fit instead of just w-fit.

Consider updating the class to w-full sm:w-fit md:ml-2 mt-2 block md:mt-0 md:inline-block for better consistency with the GitHub button styling.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between e56289b and 929b5f2.

📒 Files selected for processing (2)
  • next-env.d.ts (1 hunks)
  • pages/tools/generator.tsx (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • next-env.d.ts
🔇 Additional comments (3)
pages/tools/generator.tsx (3)

19-19: Improved button spacing

The addition of the space-y-5 class enhances the layout by introducing consistent vertical spacing between buttons. This change directly addresses the PR objective of improving button alignment and spacing on smaller screens.


29-29: Improved button responsiveness

The change from sm:w-auto to sm:w-fit for the GitHub button improves its responsiveness. On larger screens, the button will now shrink to fit its content, preventing unnecessary whitespace. This aligns well with the PR objective of adjusting button widths based on content.


Line range hint 19-35: Summary: PR objectives successfully addressed

The changes in this file effectively address the PR objectives:

  1. The spacing between buttons has been improved with the addition of space-y-5.
  2. Button widths have been adjusted to fit their content on larger screens while maintaining full width on mobile.
  3. The layout has been optimized for smaller screens by adjusting margins and display properties.

These modifications enhance the responsiveness and visual appeal of the Generator page, particularly on smaller screens. The changes are well-implemented and align with the intended improvements shown in the before and after images mentioned in the PR description.

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.

2 participants