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

fix: updated CSS for tools/generator page buttons #3294

Merged
merged 3 commits into from
Oct 18, 2024

Conversation

akshatnema
Copy link
Member

@akshatnema akshatnema commented Oct 14, 2024

Description

Fixed the alignment issue of buttons inside tools/generator page.

Related issue(s)
Fixes #3008

Summary by CodeRabbit

  • New Features
    • Improved layout and alignment of buttons on the Generator Page for better user experience.
  • Bug Fixes
    • Consolidated button functionalities for a cleaner interface.

Copy link

coderabbitai bot commented Oct 14, 2024

Walkthrough

The changes in this pull request modify the renderButtons function in the GeneratorPage component located in pages/tools/generator.tsx. The updates include enhancements to the layout of buttons through the addition of CSS classes for better responsiveness, alignment adjustments for the GithubButton, and the removal of a commented-out button component. These changes aim to streamline button rendering and improve the visual consistency across different screen sizes.

Changes

File Change Summary
pages/tools/generator.tsx Updated renderButtons function to include flex and gap-4 classes, modified GithubButton alignment, removed commented-out "View Docs" button, and consolidated button functionality with consistent styling.

Assessment against linked issues

Objective Addressed Explanation
Align the View on Github button with the View Docs button (#3008)

🐰 In the garden, buttons align,
With flex and gaps, they surely shine.
Responsive now, they dance and play,
A joyful sight in every way!
Hopping through code, we fix and cheer,
For a better view, the change is here! 🌼


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

netlify bot commented Oct 14, 2024

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 06633c4
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/67129deaf367500008a73a85
😎 Deploy Preview https://deploy-preview-3294--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.

@akshatnema
Copy link
Member Author

@coderabbitai full review

@asyncapi-bot
Copy link
Contributor

asyncapi-bot commented Oct 14, 2024

⚡️ Lighthouse report for the changes in this PR:

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

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

Copy link

coderabbitai bot commented Oct 14, 2024

✅ Actions performed

Full review triggered.

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 (2)
pages/tools/generator.tsx (2)

31-31: Improved GithubButton responsiveness

The addition of 'text-center' and 'sm:text-left' classes to the GithubButton improves its responsiveness, addressing the issue mentioned in #3008. This change ensures proper alignment on both mobile and desktop views.

For consistency, consider applying the same width classes ('w-full sm:w-fit') as used in the Button component below.


34-34: Streamlined Button component with improved responsiveness

The new Button component with updated classes ('w-full', 'text-center', 'sm:w-fit', 'sm:text-left') improves responsiveness and alignment. This change, along with the removal of commented-out code, enhances code cleanliness and addresses the PR objectives.

For consistency, consider applying these same width classes ('w-full sm:w-fit') to the GithubButton component above.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 739f9a5 and 2501e82.

📒 Files selected for processing (1)
  • pages/tools/generator.tsx (2 hunks)
🧰 Additional context used
🔇 Additional comments (2)
pages/tools/generator.tsx (2)

21-21: Improved button layout with flex and gap classes

The addition of 'flex' and 'gap-4' classes to the outer div enhances the layout and spacing of the buttons. This change directly addresses the PR objective of fixing button alignment issues, providing a more consistent and visually appealing arrangement.


Line range hint 21-34: Summary: PR objectives successfully addressed

The changes made in this PR effectively address the alignment and responsiveness issues of the buttons on the tools/generator page, as outlined in the PR objectives and linked issue #3008. The modifications to the renderButtons function improve the layout, spacing, and responsiveness of both the GithubButton and the regular Button components.

Key improvements:

  1. Added flex layout and gap for better button spacing.
  2. Improved responsiveness of both buttons with appropriate text alignment classes.
  3. Streamlined the Button component code by removing commented-out sections.

These changes should resolve the reported issues with button alignment in both desktop and mobile views. The code is now cleaner and more consistent.

To further enhance consistency, consider applying the same width classes ('w-full sm:w-fit') to both the GithubButton and Button components.

Overall, this PR successfully achieves its objectives and improves the user experience on the tools/generator page.

@akshatnema
Copy link
Member Author

akshatnema commented Oct 15, 2024

@coderabbitai configuration

Copy link

coderabbitai bot commented Oct 15, 2024

Tip

For best results, initiate chat on the files or code changes.

@akshatnema, to configure CodeRabbit for your repository, you can create or update the .coderabbit.yml file in the root of your repository. This file allows you to customize various settings such as review preferences, language, and other options.

For detailed guidance on configuring CodeRabbit, please refer to the Review Instructions Guide.

If you have specific settings you'd like to adjust or need assistance with any configuration options, feel free to let me know!

🔗 Analysis chain

@akshatnema, I understand you'd like to configure CodeRabbit. I'll retrieve the current configuration settings to assist you further.

🏁 Scripts executed

The following scripts were executed for the analysis:


Debug Information Gathered

Copy link

coderabbitai bot commented Oct 15, 2024

CodeRabbit configuration
language: en-US
tone_instructions: ''
early_access: false
enable_free_tier: true
reviews:
  profile: chill
  request_changes_workflow: false
  high_level_summary: true
  high_level_summary_placeholder: '@coderabbitai summary'
  auto_title_placeholder: '@coderabbitai'
  review_status: true
  poem: true
  collapse_walkthrough: false
  sequence_diagrams: true
  changed_files_summary: true
  labeling_instructions: []
  path_filters: []
  path_instructions: []
  abort_on_close: true
  auto_review:
    enabled: true
    auto_incremental_review: true
    ignore_title_keywords: []
    labels: []
    drafts: false
    base_branches: []
  tools:
    shellcheck:
      enabled: true
    ruff:
      enabled: true
    markdownlint:
      enabled: true
    github-checks:
      enabled: true
      timeout_ms: 90000
    languagetool:
      enabled: true
      enabled_only: false
      level: default
    biome:
      enabled: true
    hadolint:
      enabled: true
    swiftlint:
      enabled: true
    phpstan:
      enabled: true
      level: default
    golangci-lint:
      enabled: true
    yamllint:
      enabled: true
    gitleaks:
      enabled: true
    checkov:
      enabled: true
    detekt:
      enabled: true
    eslint:
      enabled: true
    rubocop:
      enabled: true
    buf:
      enabled: true
    regal:
      enabled: true
    actionlint:
      enabled: true
    pmd:
      enabled: true
    cppcheck:
      enabled: true
    semgrep:
      enabled: true
    circleci:
      enabled: true
chat:
  auto_reply: true
knowledge_base:
  opt_out: false
  learnings:
    scope: auto
  issues:
    scope: auto
  jira:
    project_keys: []
  linear:
    team_keys: []
  pull_requests:
    scope: auto

Copy link

codecov bot commented Oct 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.17%. Comparing base (7abb5fd) to head (06633c4).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3294   +/-   ##
=======================================
  Coverage   53.17%   53.17%           
=======================================
  Files          21       21           
  Lines         598      598           
=======================================
  Hits          318      318           
  Misses        280      280           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@anshgoyalevil anshgoyalevil left a comment

Choose a reason for hiding this comment

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

Looks good :shipit:

@anshgoyalevil
Copy link
Member

/rtm

@asyncapi-bot asyncapi-bot merged commit 9a1c3a6 into asyncapi:master Oct 18, 2024
19 checks passed
@asyncapi-bot asyncapi-bot added the bounty AsyncAPI Bounty program related label label Oct 20, 2024
@aeworxet
Copy link
Contributor

@asyncapi/bounty_team

@aeworxet
Copy link
Contributor

Related to #3247.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty AsyncAPI Bounty program related label ready-to-merge
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

[BUG] Responsiveness issue on the View on Github button
4 participants