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: integrate Shepherd tour with custom styling #348

Conversation

sneha-4-22
Copy link
Contributor

@sneha-4-22 sneha-4-22 commented May 30, 2024

Related Issue

fixes: #347

Description

Untitled.video.-.Made.with.Clipchamp.10.mp4

Summary by CodeRabbit

  • New Features

    • Introduced a guided tour feature using Shepherd.js to help users navigate the platform.
    • Added a "Start Tour" button in the navbar to initiate the guided tour.
  • Style

    • Improved formatting of button styles for better visual consistency.
  • Documentation

    • Updated styling rules for tour-related elements using Tailwind CSS.

@github-actions github-actions bot added wait for reviewers gssoc GSSOC'24 Required Label labels May 30, 2024
Copy link

vercel bot commented May 30, 2024

@sneha-4-22 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.

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, @sneha-4-22! 🎉 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'

Copy link
Contributor

coderabbitai bot commented May 30, 2024

Walkthrough

The recent changes introduce a guided tour feature to the platform using Shepherd.js. This enhancement includes the addition of a startTour function to initialize the tour, a "Start Tour" button in the navbar to trigger it, and custom styling for the tour elements to ensure they align with the platform's theme. These modifications aim to provide users with an interactive and informative walkthrough of the platform's functionalities.

Changes

File Path Change Summary
src/components/core/navbar/index.tsx Added startTour function and "Start Tour" button to initiate a guided tour using Shepherd.js.
src/components/core/themeButton/index.tsx Added spaces before className attribute values in JSX buttons for improved formatting.
src/components/core/utils/startTour.tsx Introduced startTour function to initialize a guided tour with Shepherd.js.
src/components/core/utils/styles.css Added styling rules for Shepherd.js elements using Tailwind CSS classes to match the platform's theme.

Sequence Diagram(s) (Beta)

sequenceDiagram
    participant User
    participant Navbar
    participant Shepherd
    User->>Navbar: Click "Start Tour" button
    Navbar->>Shepherd: Call startTour function
    Shepherd->>User: Display guided tour steps
Loading

Assessment against linked issues

Objective Addressed Explanation
Integrate Shepherd.js for creating guided tours (#347)
Ensure the tour initializes correctly when the "Start Tour" button is clicked (#347)
Customize the appearance of the tour elements to align with the website's theme (#347)
Smaller tour box size with reduced padding and adjusted font sizes (#347)
Custom border, background, and text colors to match the site design (#347)
Smooth transitions and hover effects (#347)

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: 4

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1872436 and 19aaa51.

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

[error] 20-20: Provide an explicit type prop for the button element.


[error] 30-33: Provide an explicit type prop for the button element.


[error] 38-41: Provide an explicit type prop for the button element.

src/components/core/navbar/index.tsx

[error] 187-187: Unexpected any. Specify a different type.


[error] 191-191: The computed expression can be simplified without the use of a string literal.


[error] 207-207: Unexpected any. Specify a different type.


[error] 336-336: Do not use template literals if interpolation and special-character handling are not needed.


[error] 414-414: Change to an optional chain.


[error] 299-305: Provide an explicit type prop for the button element.


[error] 312-316: Provide an explicit type prop for the button element.


[error] 342-346: Provide an explicit type prop for the button element.


[error] 381-387: Provide an explicit type prop for the button element.

src/components/core/themeButton/index.tsx Outdated Show resolved Hide resolved
src/components/core/themeButton/index.tsx Outdated Show resolved Hide resolved
src/components/core/themeButton/index.tsx Outdated Show resolved Hide resolved
src/components/core/navbar/index.tsx Outdated Show resolved Hide resolved
Copy link
Owner

@Sanchitbajaj02 Sanchitbajaj02 left a comment

Choose a reason for hiding this comment

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

Hi @sneha-4-22, Please do all the changes suggested by me and Coderabbit

src/components/core/navbar/styles.css Outdated Show resolved Hide resolved
src/components/core/navbar/index.tsx Outdated Show resolved Hide resolved
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: 1

Outside diff range and nitpick comments (1)
src/components/core/themeButton/index.tsx (1)

Line range hint 20-20: Ensure to add an explicit type attribute to the button to prevent unintended form submissions.

- <button className="px-2 py-2 md:flex fixed md:static block md:top-0 md:m-0 top-1 m-2 rounded-full hover:bg-primary-light hover:scale-105 bg-primary text-white">
+ <button type="button" className="px-2 py-2 md:flex fixed md:static block md:top-0 md:m-0 top-1 m-2 rounded-full hover:bg-primary-light hover:scale-105 bg-primary text-white">

Apply this change to all buttons within the component to maintain consistency and prevent issues in forms.

Also applies to: 30-33, 38-41

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 19aaa51 and 8e3f3e4.

Files selected for processing (4)
  • src/components/core/navbar/index.tsx (5 hunks)
  • src/components/core/themeButton/index.tsx (1 hunks)
  • src/components/core/utils/startTour.tsx (1 hunks)
  • src/components/core/utils/styles.css (1 hunks)
Files skipped from review due to trivial changes (1)
  • src/components/core/utils/styles.css
Additional context used
Biome
src/components/core/themeButton/index.tsx

[error] 20-20: Provide an explicit type prop for the button element.


[error] 30-33: Provide an explicit type prop for the button element.


[error] 38-41: Provide an explicit type prop for the button element.

src/components/core/navbar/index.tsx

[error] 29-29: Unexpected any. Specify a different type.


[error] 33-33: The computed expression can be simplified without the use of a string literal.


[error] 49-49: Unexpected any. Specify a different type.


[error] 178-178: Do not use template literals if interpolation and special-character handling are not needed.


[error] 256-256: Change to an optional chain.


[error] 141-146: Provide an explicit type prop for the button element.


[error] 154-157: Provide an explicit type prop for the button element.


[error] 184-187: Provide an explicit type prop for the button element.


[error] 223-228: Provide an explicit type prop for the button element.

Additional comments not posted (1)
src/components/core/utils/startTour.tsx (1)

1-158: The implementation of the startTour function looks comprehensive and well-structured.

The function correctly sets up a guided tour with multiple steps, ensuring a smooth user experience. The use of Shepherd.js is appropriate for the task, and the customizations seem to align with the project's styling requirements.

src/components/core/navbar/index.tsx Show resolved Hide resolved
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 (3)
src/components/core/navbar/index.tsx (3)

Line range hint 29-29: Specify a more precise type instead of any for the Redux state.

Consider using a defined interface or type for the state to enhance type safety and maintainability.


Line range hint 33-33: Simplify the computed expression by removing the unnecessary string literal.

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

Line range hint 178-178: Avoid using template literals when not necessary.

- <span className={`flex items-center git`}>
+ <span className="flex items-center git">
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8e3f3e4 and fbd924c.

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

[error] 29-29: Unexpected any. Specify a different type.


[error] 33-33: The computed expression can be simplified without the use of a string literal.


[error] 49-49: Unexpected any. Specify a different type.


[error] 178-178: Do not use template literals if interpolation and special-character handling are not needed.


[error] 256-256: Change to an optional chain.


[error] 141-146: Provide an explicit type prop for the button element.


[error] 184-187: Provide an explicit type prop for the button element.


[error] 223-228: Provide an explicit type prop for the button element.

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

21-22: LGTM! Import statement for startTour is correctly added.


154-159: The "Start Tour" button is correctly implemented with the type="button" attribute to prevent unintended form submissions. Good job addressing previous feedback.

@Sanchitbajaj02 Sanchitbajaj02 merged commit 49276ec into Sanchitbajaj02:master Jun 1, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐ enhancement Feature enhancement ✨ goal: improve interface gssoc GSSOC'24 Required Label level2 25 points MEDIUM Difficulty Level: Medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat: Feature Request: Integrate web App Tour using Shepherd
2 participants