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: open left nav items in new tab on cmd ctrl click #4561

Merged
merged 1 commit into from
Feb 17, 2024

Conversation

YounixM
Copy link
Member

@YounixM YounixM commented Feb 16, 2024

open left nav items in new tab on cmd ctrl click
open 'Inspect in Trace' in new tab on cmd ctrl click

logs explorer

  • fix links

Summary by CodeRabbit

  • New Features
    • Added new routing options for license management.
    • Introduced a hyperlink to "Sending Logs to SigNoz" documentation for easier access to information.
    • Enhanced navigation experience with the ability to open links in a new tab using specific key presses.
    • Implemented a direct contact support option based on the user type for improved assistance.
  • Enhancements
    • Improved event handling in the log detailed view for more intuitive user interactions.
    • Updated navigation item components to include pointer cursors for better visual feedback.
  • Style
    • Updated styling for navigation items to enhance user interface interaction.

Copy link

coderabbitai bot commented Feb 16, 2024

Walkthrough

The recent updates across various frontend components enhance user interaction and accessibility. Key enhancements include the integration of a new LIST_LICENSES route, refined event handling in table views and navigation items, improved support contact functionality, and the addition of helpful external links. These changes collectively aim to improve the user experience by making navigation more intuitive, support more accessible, and information more readily available.

Changes

File(s) Summary
.../AppRoutes/Private.tsx Added LIST_LICENSES to routes mapping.
.../LogDetailedView/TableView.tsx, .../SideNav/NavItem/NavItem.tsx, .../SideNav/SideNav.tsx Updated event handling to support additional behaviors, like opening links in new tabs based on key presses.
.../LogsError/LogsError.tsx Enhanced support interaction with a new handleContactSupport function and updated element tags and event handling.
.../NoLogs/NoLogs.tsx Added a hyperlink to external documentation for better user guidance.
.../SideNav/NavItem/NavItem.styles.scss Improved visual feedback with cursor: pointer; style.

🐇✨
Changes afoot in the land of code,
Where routes and clicks now smoothly flowed.
A rabbit hopped through screens so bright,
Tweaking and improving with every byte.
"To better experiences," it softly sighed,
As into the digital sunset it hopped and glided.
🌟🐾

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.

Copy link

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

@github-actions github-actions bot added the enhancement New feature or request label Feb 16, 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: 7

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between b10f17d and bb3e39d.
Files selected for processing (7)
  • frontend/src/AppRoutes/Private.tsx (2 hunks)
  • frontend/src/container/LogDetailedView/TableView.tsx (3 hunks)
  • frontend/src/container/LogsError/LogsError.tsx (2 hunks)
  • frontend/src/container/NoLogs/NoLogs.tsx (1 hunks)
  • frontend/src/container/SideNav/NavItem/NavItem.styles.scss (1 hunks)
  • frontend/src/container/SideNav/NavItem/NavItem.tsx (1 hunks)
  • frontend/src/container/SideNav/SideNav.tsx (12 hunks)
Additional comments: 7
frontend/src/container/SideNav/NavItem/NavItem.tsx (1)
  • 19-28: The changes to include an event parameter in the onClick function signature and its explicit passing are correctly implemented. This allows for more flexible event handling, supporting the new feature for enhanced navigation.
frontend/src/container/LogsError/LogsError.tsx (1)
  • 1-20: > 📝 NOTE

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

The addition of the handleContactSupport function and its usage as an onClick event handler for the contact-support div are correctly implemented. This change enhances the user support interaction by navigating to the appropriate support page based on the user type.

frontend/src/container/SideNav/NavItem/NavItem.styles.scss (1)
  • 10-10: The addition of cursor: pointer; to the .nav-item class is a good UI/UX practice that enhances user interaction cues by indicating that the element is clickable.
frontend/src/AppRoutes/Private.tsx (1)
  • 20-26: > 📝 NOTE

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

The import and inclusion of LIST_LICENSES in the mapping function alongside the existing routes array are correctly implemented. This change appears to be aimed at enhancing the application's routing structure, possibly to accommodate new licensing-related features or pages.

frontend/src/container/LogDetailedView/TableView.tsx (1)
  • 122-133: > 📝 NOTE

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

The modifications to the onTraceHandler function, including the addition of an event parameter and the logic to handle ctrl/cmd clicks for opening links in new tabs, are correctly implemented. This enhances navigation and usability by allowing users to open traces in new tabs based on specific key presses.

frontend/src/container/SideNav/SideNav.tsx (2)
  • 194-205: The onClickHandler function is well-implemented to support dynamic navigation based on the Ctrl/Meta key press. It's a good practice to ensure that all paths and query strings are properly encoded to avoid potential security issues with URL manipulation.

Consider verifying that all dynamic parts of the URL (key and queryString) are properly encoded to prevent security vulnerabilities related to URL manipulation.

  • 283-292: The handleMenuItemClick function correctly implements the feature of opening settings and other navigation items in new tabs based on the Ctrl/Meta key press. Ensure consistency in handling URLs and paths across the application for maintainability.

frontend/src/container/SideNav/SideNav.tsx Show resolved Hide resolved
frontend/src/container/SideNav/SideNav.tsx Show resolved Hide resolved
frontend/src/container/SideNav/SideNav.tsx Show resolved Hide resolved
frontend/src/container/SideNav/SideNav.tsx Show resolved Hide resolved
frontend/src/container/SideNav/SideNav.tsx Show resolved Hide resolved
frontend/src/container/NoLogs/NoLogs.tsx Show resolved Hide resolved
@YounixM YounixM merged commit 0c59953 into develop Feb 17, 2024
9 of 10 checks passed
@YounixM YounixM deleted the open-pages-new-tab branch February 17, 2024 09:31
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.

2 participants