Skip to content

Conversation

@anmolyadav-dev
Copy link
Contributor

@anmolyadav-dev anmolyadav-dev commented Oct 29, 2024

Description
added cursor pointer over language selector

Related issue(s)

Fixes #3345

Summary by CodeRabbit

  • New Features
    • Updated the cursor style for the select element to indicate interactivity, enhancing the user experience.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 29, 2024

Walkthrough

The pull request introduces a new CSS rule in styles/globals.css, specifically adding a cursor: pointer; style to the select element. This change aims to enhance the user interface by providing a visual indication that the select element is interactive, aligning with user expectations for interactive elements.

Changes

File Change Summary
styles/globals.css Added cursor: pointer; to select element.

Assessment against linked issues

Objective Addressed Explanation
Add Pointer Cursor on Hover over Selector (#3345)

Possibly related PRs

  • fix: updated CSS for tools/generator page buttons #3294: The changes in this PR involve CSS modifications that enhance the layout and alignment of buttons, which may relate to overall CSS styling practices, similar to the addition of the cursor: pointer; rule for the select element in the main PR.

Suggested labels

ready-to-merge, bounty

Suggested reviewers

  • derberg
  • magicmatatjahu

🐰 In the meadow, hopping near,
A pointer cursor brings us cheer!
Select with ease, don't hesitate,
Interactive joy, oh, it's so great!
With every click, the fun will grow,
A simple change, but now you know! 🌼


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

@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.

@netlify
Copy link

netlify bot commented Oct 29, 2024

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit a09f528
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-website/deploys/672d078312e4b60008f32b56
😎 Deploy Preview https://deploy-preview-3346--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.

@codecov
Copy link

codecov bot commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.01%. Comparing base (8ec5340) to head (a09f528).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3346   +/-   ##
=======================================
  Coverage   59.01%   59.01%           
=======================================
  Files          21       21           
  Lines         649      649           
=======================================
  Hits          383      383           
  Misses        266      266           

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

@asyncapi-bot
Copy link
Contributor

asyncapi-bot commented Oct 29, 2024

⚡️ Lighthouse report for the changes in this PR:

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

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

Copy link
Contributor

@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)
components/languageSelector/LanguageSelect.tsx (1)

19-19: LGTM! The cursor-pointer implementation meets the requirements.

The addition of cursor-pointer class successfully addresses the UX improvement requested in issue #3345.

Consider extracting the base classes into a constant for better maintainability:

+ const baseClasses = 'form-select h-full py-0 px-3 pr-7 inline-flex justify-center rounded-md border border-gray-300 shadow-sm py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:border-gray-500 focus:outline-none focus:ring-0 focus:ring-black cursor-pointer';

  return (
    <select
      data-testid='Select-form'
      onChange={(ev) => onChange(ev.target.value)}
-     className={twMerge(
-       `form-select h-full py-0 px-3 pr-7 inline-flex justify-center rounded-md border border-gray-300 shadow-sm py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:border-gray-500 focus:outline-none focus:ring-0 focus:ring-black ${className} cursor-pointer`
-     )}
+     className={twMerge(baseClasses, className)}
      value={selected}
    >
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between cd837b4 and fe94170.

📒 Files selected for processing (1)
  • components/languageSelector/LanguageSelect.tsx (1 hunks)

@lakshaydewan
Copy link

You can try to Fix the PR title and raise a PR again to get through the lintPR title

@anshgoyalevil anshgoyalevil changed the title [Feature]added cursor pointer on language selector feat: add cursor pointer on language selector Nov 6, 2024
@anshgoyalevil
Copy link
Member

@anmolyadav-dev That's a nice addition.
Can you please search other dropdown elements in the website/codebase that do not have such a cursor pointer on hover, and add those changes as well to this PR.

Example: one such dropdown is on page https://www.asyncapi.com/tools/generator

@anmolyadav-dev
Copy link
Contributor Author

@anshgoyalevil Sure i will search and fix more of these . thankyou for the feedback.

@anmolyadav-dev
Copy link
Contributor Author

@anshgoyalevil i changed the global style for select element so every select element should now have a cursor pointer

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.

Thanks @anmolyadav-dev 🚢

@anshgoyalevil anshgoyalevil changed the title feat: add cursor pointer on language selector feat: add cursor pointer on selector element Nov 7, 2024
@anshgoyalevil
Copy link
Member

@anmolyadav-dev
Notice that hovering on the dropdown options does not change the cursor. Can we fix that also?

@anmolyadav-dev
Copy link
Contributor Author

@anshgoyalevil
i searched for that but it is default by operating system and cannot be overwritten easily
https://stackoverflow.com/questions/22770603/change-cursor-over-option-tags

Copy link
Contributor

@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)
styles/globals.css (1)

355-357: LGTM! Consider these enhancements for better UX.

While the implementation addresses the core requirement, consider these improvements:

  1. Add hover state for more precise control
  2. Add transition for smoother interaction
  3. Fix formatting (add space after cursor:)
-select {
-  cursor:pointer;
-}
+select {
+  cursor: default;
+  transition: cursor 0.2s ease;
+}
+
+select:hover {
+  cursor: pointer;
+}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between fe94170 and a09f528.

📒 Files selected for processing (1)
  • styles/globals.css (1 hunks)
🔇 Additional comments (1)
styles/globals.css (1)

355-357: Verify impact on other select elements.

Since this is a global style, let's verify that it doesn't adversely affect other select elements in the codebase.

@anshgoyalevil
Copy link
Member

/rtm

@anmolyadav-dev
Copy link
Contributor Author

@anshgoyalevil
and i also have a question .
whenever i do npm run dev 3 files get automatically changed i think
color.mdx and 3 other
is it fine
Screenshot 2024-11-08 000631

@asyncapi-bot asyncapi-bot merged commit 1071c76 into asyncapi:master Nov 7, 2024
@anshgoyalevil
Copy link
Member

@anshgoyalevil and i also have a question . whenever i do npm run dev 3 files get automatically changed i think color.mdx and 3 other is it fine Screenshot 2024-11-08 000631

That shouldn't happen. What are the changes introduced in those files?

@anmolyadav-dev
Copy link
Contributor Author

@anshgoyalevil no visible changes. it just shows file changed and add it in status

Screenshot 2024-11-08 001803

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add Pointer Cursor on Hover over Selector

4 participants