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

feat: Start Tour in Sidebar #360

Merged
merged 4 commits into from
Jun 7, 2024
Merged

feat: Start Tour in Sidebar #360

merged 4 commits into from
Jun 7, 2024

Conversation

codercake
Copy link
Contributor

@codercake codercake commented Jun 6, 2024

resolves #358

Description

This PR addresses the missing "Start Tour" button in the mobile sidebar navigation menu. The "Start Tour" button has been added as the first item in the mobile menu, ensuring it is accessible for users on mobile screens. The order of items in the sidebar has been updated for better user experience, with "Start Tour" at the top, followed by stars, register, and login buttons. Additional user-specific links (profile, bookmarks, logout) are included conditionally based on the user's authentication status.

Screenshots

image

Summary by CodeRabbit

  • Improvements

    • Enhanced the layout and styling of the navbar for better visual presentation and user interaction.
    • Refined button styles and reorganized links and buttons within the navbar.
  • Chores

    • Removed console log statements to clean up the code.

Copy link

vercel bot commented Jun 6, 2024

@codercake is attempting to deploy a commit to the Sanchit Bajaj's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added wait for reviewers gssoc GSSOC'24 Required Label title needs formatting Title of issue or pull request does not match the guidelines labels Jun 6, 2024
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.

Great job, @codercake! 🎉 Thank you for submitting your pull request. Your contribution is valuable and we appreciate your efforts to improve our project. Keep being the part of the community!

'We will promptly review your changes and offer feedback. Keep up the excellent work!
Kindly remember to check our Contributing Guidelines'

@codercake codercake changed the title Start Tour in Sidebar feat: Start Tour in Sidebar Jun 6, 2024
@github-actions github-actions bot removed the title needs formatting Title of issue or pull request does not match the guidelines label Jun 6, 2024
Copy link
Contributor

coderabbitai bot commented Jun 6, 2024

Warning

Rate limit exceeded

@codercake has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 32 minutes and 46 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between b934047 and e6dd1cf.

Walkthrough

The recent changes primarily focus on refining the navbar component within the codebase. Key updates include the removal of console log statements, adjustments to the layout and styling of elements, and the reorganization of links and buttons to improve visual presentation and user interaction. Additionally, a new subproject commit has been introduced.

Changes

File/Path Summary
src/components/core/navbar/index.tsx Removed console log statements, adjusted layout and styling of navbar elements, and reorganized links/buttons for better user interaction.
palettegram Introduced a subproject commit with hash 49276ec6b9008a7a5d5fafd84f73826f236631db.

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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
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: 3

Outside diff range and nitpick comments (2)
src/components/core/navbar/index.tsx (2)

Line range hint 181-181: Specify the button type to prevent unintended form submissions.

- <button
+ <button type="button"

Line range hint 219-219: Specify the button type to prevent unintended form submissions.

- <button
+ <button type="button"
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 49276ec and bead99c.

Files ignored due to path filters (2)
  • package.json is excluded by !**/*.json
  • yarn.lock is excluded by !**/*.lock, !**/*.lock
Files selected for processing (2)
  • palettegram (1 hunks)
  • src/components/core/navbar/index.tsx (6 hunks)
Files skipped from review due to trivial changes (1)
  • palettegram
Additional context used
Biome
src/components/core/navbar/index.tsx

[error] 31-31: The computed expression can be simplified without the use of a string literal. (lint/complexity/useLiteralKeys)

Unsafe fix: Use a literal key instead.


[error] 260-260: Change to an optional chain. (lint/complexity/useOptionalChain)

Unsafe fix: Change to an optional chain.


[error] 137-142: Provide an explicit type prop for the button element. (lint/a11y/useButtonType)

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset


[error] 181-184: Provide an explicit type prop for the button element. (lint/a11y/useButtonType)

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset


[error] 219-224: Provide an explicit type prop for the button element. (lint/a11y/useButtonType)

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset


[error] 274-277: Provide an explicit type prop for the button element. (lint/a11y/useButtonType)

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

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 (2)
src/components/core/navbar/index.tsx (2)

117-117: Ensure the alt attribute of the Image component accurately describes the image for better accessibility.

Consider changing the alt attribute from "settings" to something more descriptive of the logo, such as "Company Logo".


Line range hint 31-31: Simplify the expression by using a literal key.

- const userIdFromCookies: string = cookies["userId"];
+ const userIdFromCookies: string = cookies.userId;
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between bead99c and aecf0db.

Files selected for processing (1)
  • src/components/core/navbar/index.tsx (9 hunks)
Additional context used
Biome
src/components/core/navbar/index.tsx

[error] 31-31: The computed expression can be simplified without the use of a string literal. (lint/complexity/useLiteralKeys)

Unsafe fix: Use a literal key instead.


[error] 251-251: Change to an optional chain. (lint/complexity/useOptionalChain)

Unsafe fix: Change to an optional chain.


[error] 131-136: Provide an explicit type prop for the button element. (lint/a11y/useButtonType)

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset


[error] 214-219: Provide an explicit type prop for the button element. (lint/a11y/useButtonType)

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

Additional comments not posted (9)
src/components/core/navbar/index.tsx (9)

126-126: The isMenuOpen state toggle logic is correctly implemented for the hamburger menu button.


146-146: Specify the button type to prevent unintended form submissions.

This issue was previously flagged and remains valid. Ensure all buttons explicitly declare their type to avoid default form submission behavior.


158-158: Ensure consistent styling and interaction patterns for navigation links.

The use of consistent classes and hover effects enhances the UX by providing a uniform look and feel.

Also applies to: 163-163, 170-170


176-176: The logout functionality is correctly tied to a button with appropriate styling and interaction effects.


218-218: The logic to toggle the visibility of the mobile menu is correctly implemented.


225-230: The "Start Tour" button is correctly added to the mobile menu as the first item, aligning with the PR's objectives.


235-235: Ensure links have consistent styling and are accessible.

The hover effects and consistent styling for the links in the mobile menu enhance user interaction.

Also applies to: 241-241, 247-247


252-272: Use optional chaining for safer property access.

This issue was previously flagged and remains valid. Consider using optional chaining to safely access nested properties.


Line range hint 131-136: Specify the button type to prevent unintended form submissions.

This issue was previously flagged and remains valid. Ensure all buttons explicitly declare their type to avoid default form submission behavior.

Also applies to: 214-219

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)
src/components/core/navbar/index.tsx (1)

Line range hint 31-31: Consider using a literal key instead of a string literal for better performance and readability.

- const userIdFromCookies: string = cookies["userId"];
+ const userIdFromCookies: string = cookies.userId;
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between aecf0db and b934047.

Files selected for processing (1)
  • src/components/core/navbar/index.tsx (9 hunks)
Additional context used
Biome
src/components/core/navbar/index.tsx

[error] 31-31: The computed expression can be simplified without the use of a string literal. (lint/complexity/useLiteralKeys)

Unsafe fix: Use a literal key instead.


[error] 255-255: Change to an optional chain. (lint/complexity/useOptionalChain)

Unsafe fix: Change to an optional chain.


[error] 131-136: Provide an explicit type prop for the button element. (lint/a11y/useButtonType)

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset


[error] 214-219: Provide an explicit type prop for the button element. (lint/a11y/useButtonType)

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

Additional comments not posted (4)
src/components/core/navbar/index.tsx (4)

146-146: Specify the button type to prevent unintended form submissions.


255-255: Use optional chaining for safer property access.

Tools
Biome

[error] 255-255: Change to an optional chain. (lint/complexity/useOptionalChain)

Unsafe fix: Change to an optional chain.


226-226: Specify the button type to prevent unintended form submissions.


117-117: Ensure the image source path is correct and accessible.

Verification successful

The image source path public/assets/logo.png is correct and accessible.

  • The image source path is verified to be correct.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the image source path is correct and accessible.

# Test: Check if the image exists at the specified path.
if [ -f "public/assets/logo.png" ]; then
  echo "Image source is correct."
else
  echo "Image source is incorrect or inaccessible."
fi

Length of output: 94

@codercake
Copy link
Contributor Author

REVIEW THE PR @Sanchitbajaj02

@Sanchitbajaj02 Sanchitbajaj02 added 🪲 bug Something isn't working 🏆 good first issue Good for newcomers 🛠 goal: fix The label is related to fixing a bug BEGINNER Difficulty Level: Beginner and removed wait for reviewers labels Jun 7, 2024
@Sanchitbajaj02 Sanchitbajaj02 merged commit 7cec66a into Sanchitbajaj02:master Jun 7, 2024
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BEGINNER Difficulty Level: Beginner 🪲 bug Something isn't working 🛠 goal: fix The label is related to fixing a bug 🏆 good first issue Good for newcomers gssoc GSSOC'24 Required Label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Start Tour Button missing from Sidebar
2 participants