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: route to the onboarding flow when clicking the sending logs in case of no logs #4600

Merged
merged 11 commits into from
Mar 7, 2024

Conversation

vikrantgupta25
Copy link
Collaborator

@vikrantgupta25 vikrantgupta25 commented Feb 26, 2024

Summary

  • refactor the onboarding flow logic to append module in the URL params when selecting it.
  • handle the route from logs / traces to get started in the case of no data yet

Related Issues / PR's

https://linear.app/signoz-io/issue/SIG-534/empty-logs-text-update

Screenshots

NA

Affected Areas and Manually Tested Areas

Summary by CodeRabbit

  • New Features
    • Introduced new routes for application monitoring, logs management, and infrastructure monitoring, enhancing the user's navigation experience.
    • Expanded full-screen mode to support additional monitoring and management routes.
    • Enhanced the onboarding process with improved navigation and module selection based on user choices.
    • Updated the top navigation bar to exclude new monitoring and management routes, streamlining user interface.
  • Bug Fixes
    • Fixed an issue where users could not dynamically navigate to different monitoring or management sections based on the data source selected.

@vikrantgupta25 vikrantgupta25 changed the title feat: refactor onboarding flow to add path params when selecting any module feat: route to the onboarding flow when clicking the sending logs in case of no logs Feb 26, 2024
@vikrantgupta25 vikrantgupta25 marked this pull request as ready for review February 26, 2024 18:52
Copy link

coderabbitai bot commented Feb 26, 2024

Warning

Rate Limit Exceeded

@Vikrant2520 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 15 minutes and 19 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 0b70e47 and 1858a0f.

Walkthrough

This update enhances the onboarding experience for users by introducing new routes and permissions for application monitoring, logs management, and infrastructure monitoring. It also includes UI adjustments to accommodate these new features and ensures a more guided and informative onboarding process. The changes streamline the next steps in user onboarding and improve the application's configurability for different user needs.

Changes

File Path Change Summary
frontend/src/AppRoutes/routes.ts Altered exact property from true to false for better route matching.
frontend/src/constants/routes.ts
frontend/src/container/TopNav/DateTimeSelection/config.ts
frontend/src/container/TopNav/DateTimeSelectionV2/config.ts
Added new routes for application monitoring, logs management, and infrastructure monitoring.
frontend/src/container/AppLayout/index.tsx Expanded renderFullScreen condition to include checks for new routes.
frontend/src/container/OnboardingContainer/...
frontend/src/container/OnboardingContainer/utils/dataSourceUtils.ts
Enhanced onboarding logic with new functions, imports, and updated useEffect for module selection.
frontend/src/utils/app.ts Simplified isCloudUser function to always return true.
frontend/src/utils/permission/index.ts Added permissions for new monitoring features.

Related issues

  • Enable better onboarding of new users #1440: The changes in this PR directly support the objectives outlined in the issue by improving the onboarding experience through guided walkthroughs, enhanced feature discovery, and system component health monitoring.

Poem

In the land of code and sun,
A rabbit hopped, having fun.
"New paths ahead, let's explore,
With monitoring and much more.
🌟 Guided steps, a journey bright,
Through logs and metrics, into light.
Together, we leap, no feat too steep,
In this digital world, our bounds we leap."

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-tests for this file.
  • 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 tests 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 from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@github-actions github-actions bot added the enhancement New feature or request label Feb 26, 2024
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

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.

Review Status

Actionable comments generated: 2

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between c38247a and deb2065.
Files selected for processing (9)
  • frontend/src/AppRoutes/routes.ts (1 hunks)
  • frontend/src/constants/routes.ts (1 hunks)
  • frontend/src/container/AppLayout/index.tsx (1 hunks)
  • frontend/src/container/OnboardingContainer/OnboardingContainer.tsx (6 hunks)
  • frontend/src/container/OnboardingContainer/utils/dataSourceUtils.ts (3 hunks)
  • frontend/src/container/TopNav/DateTimeSelection/config.ts (1 hunks)
  • frontend/src/container/TopNav/DateTimeSelectionV2/config.ts (1 hunks)
  • frontend/src/utils/app.ts (1 hunks)
  • frontend/src/utils/permission/index.ts (1 hunks)
Additional comments: 11
frontend/src/constants/routes.ts (1)
  • 10-13: The addition of new routes for application monitoring, logs management, and infrastructure monitoring under the GET_STARTED section is a positive enhancement. It aligns with the objectives to improve the onboarding flow and routing logic, enhancing the application's navigation and user experience.
frontend/src/container/TopNav/DateTimeSelection/config.ts (1)
  • 84-86: The addition of new routes for application monitoring, infrastructure monitoring, and logs management to the list of routes to skip in the top navigation bar configuration is logical. It enhances the user experience by not displaying irrelevant UI elements on onboarding or setup pages.
frontend/src/utils/permission/index.ts (1)
  • 85-87: The addition of permissions for application monitoring, infrastructure monitoring, and logs management under the GET_STARTED section is crucial for access control. It ensures that only authorized users can access these features, supporting the application's security and user management strategy.
frontend/src/container/TopNav/DateTimeSelectionV2/config.ts (1)
  • 120-122: The addition of new routes for application monitoring, infrastructure monitoring, and logs management to the list of routes to skip in the top navigation bar configuration for DateTimeSelectionV2 is consistent with improving user experience. It avoids displaying unnecessary UI components on specific pages.
frontend/src/container/OnboardingContainer/utils/dataSourceUtils.ts (3)
  • 6-10: The addition of the ModulesMap enum is a positive change, providing a clear and maintainable way to reference different modules within the onboarding flow.
  • 91-131: Updating image URLs for various supported languages ensures that the correct assets are used, enhancing the UI's visual aspects. Please verify the correctness and accessibility of these URLs in the deployed environment.
  • 288-293: The introduction of the moduleRouteMap to map modules to specific routes supports the new routing logic, directly aligning with the PR's objectives to refine the onboarding flow and enhance navigation.
frontend/src/AppRoutes/routes.ts (1)
  • 60-60: Changing the exact property from true to false for the ROUTES.GET_STARTED route allows for more flexible route matching. This change likely accommodates the new onboarding flow routes, enabling nested routing under the GET_STARTED path. Please verify its impact on the application's routing behavior to ensure it aligns with the intended user experience.
frontend/src/container/OnboardingContainer/OnboardingContainer.tsx (2)
  • 9-9: The addition of imports for ROUTES, moduleRouteMap, and history is appropriate for the enhancements made to the onboarding flow and routing logic. Ensure that these imports are used efficiently throughout the file to avoid any unnecessary overhead.
  • 205-243: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [187-212]

The introduction of the handleNextStep function and modifications to the handleNext function to incorporate route changes based on selected modules are significant improvements. However, ensure that the activeStep and current state variables are managed correctly to prevent any off-by-one errors or unintended behavior during the onboarding process.

frontend/src/container/AppLayout/index.tsx (1)
  • 234-238: The expansion of the renderFullScreen condition to include checks for GET_STARTED_APPLICATION_MONITORING, GET_STARTED_INFRASTRUCTURE_MONITORING, and GET_STARTED_LOGS_MANAGEMENT routes is a logical enhancement that aligns with the objectives of improving the onboarding flow and user experience. Ensure that these route constants are correctly defined in the ROUTES object and that the logic correctly handles all scenarios where a full-screen layout is desired.

frontend/src/utils/app.ts Outdated Show resolved Hide resolved
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

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.

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between deb2065 and 0b70e47.
Files selected for processing (1)
  • frontend/src/container/NoLogs/NoLogs.tsx (3 hunks)
Additional comments: 1
frontend/src/container/NoLogs/NoLogs.tsx (1)
  • 39-39: The use of onClick={handleLinkClick} within the Typography.Link component is a good practice for enhancing user experience through dynamic routing. However, ensure that the href attribute's value is still accessible to users with JavaScript disabled in their browsers. This ensures that the application remains accessible to all users.

Consider verifying the accessibility of links with JavaScript disabled and ensure fallback URLs are provided if necessary.

frontend/src/container/NoLogs/NoLogs.tsx Outdated Show resolved Hide resolved
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

1 similar comment
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@vikrantgupta25 vikrantgupta25 force-pushed the chore/SIG-534 branch 2 times, most recently from 75df8c4 to f38436d Compare February 28, 2024 15:59
@srikanthccv
Copy link
Member

The simple re-route logic will be annoying because it could be possible that the user sets up the logging by following instructions but stops sending data for some reason or it could be that their ingest pattern is not continuous logging. At this point, they shouldn't be redirected because they already completed the onboarding workflow and sent some logs. The only time the user should be redirected is when they are on the platform for the first time and didn't send any logs/traces in the past.

@vikrantgupta25
Copy link
Collaborator Author

The simple re-route logic will be annoying because it could be possible that the user sets up the logging by following instructions but stops sending data for some reason or it could be that their ingest pattern is not continuous logging. At this point, they shouldn't be redirected because they already completed the onboarding workflow and sent some logs. The only time the user should be redirected is when they are on the platform for the first time and didn't send any logs/traces in the past.

@srikanthccv we are not re-routing the user to the onboarding page , we render the logs screen itself and on click of Start Sending Logs we route them to onboarding instead of docs page , Just wondering if there was a way we can tell if the user has sent logs before and they are empty in the current time frame ? And if yes then we might need to think of better empty state in case of no logs (with logs being sent previously )

@srikanthccv
Copy link
Member

The specifics of re-route are not important. It is annoying if you ask to send logs instead of showing no logs when they already completed the onboarding workflow and sent some logs.

@srikanthccv
Copy link
Member

srikanthccv commented Feb 29, 2024

I don't know the details about the onboarding related things but we shouldn't show that screen if they already sent some logs in the past and completed the onboarding flow.

@vikrantgupta25 vikrantgupta25 merged commit 4cd4039 into develop Mar 7, 2024
11 checks passed
@srikanthccv srikanthccv deleted the chore/SIG-534 branch March 8, 2024 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants