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: Allow to interact with page while log side panel is open #332

Merged
merged 2 commits into from
Mar 3, 2024

Conversation

svc-shorpo
Copy link
Contributor

@svc-shorpo svc-shorpo commented Mar 3, 2024

Allow to interact with page while log side panel is open

Screen.Recording.2024-03-03.at.9.44.16.PM.mov

Ellipsis 🚀 This PR description was created by Ellipsis for commit 0119837.

Summary:

This PR enhances user interaction by allowing page interaction while the log side panel is open, achieved by using the useClickOutside hook in LogSidePanel.tsx and updating the setOpenedLog function in SearchPage.tsx.

Key points:

  • Added useClickOutside hook from @mantine/hooks in LogSidePanel.tsx to create a drawerRef.
  • Used drawerRef to close the drawer when a click is detected outside of it.
  • Updated enableOverlay prop of Drawer component to depend on subDrawerOpen state.
  • Added condition in setOpenedLog function in SearchPage.tsx to prevent unnecessary updates when the log is already open.

Generated with ❤️ by ellipsis.dev

Copy link

changeset-bot bot commented Mar 3, 2024

🦋 Changeset detected

Latest commit: a5d5a9e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@hyperdx/app Patch
@hyperdx/api Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me!

  • Reviewed the entire pull request up to 0119837
  • Looked at 84 lines of code in 3 files
  • Took 41 seconds to review
More info
  • Skipped 0 files when reviewing.
  • Skipped posting 1 additional comments because they didn't meet confidence threshold of 50%.
1. packages/app/src/SearchPage.tsx:321:
  • Assessed confidence : 50%
  • Comment:
    The condition for setting the opened log has been updated to also check if the opened log id is the same as the log id being set. Please ensure this change doesn't introduce any unexpected behavior in the application.
  • Reasoning:
    The changes in the SearchPage.tsx file are related to the handling of the opened log. The condition for setting the opened log has been updated to also check if the opened log id is the same as the log id being set. This seems to be a logical change to prevent unnecessary updates. However, without knowing the exact behavior of the setOpenedLogQuery function and how it affects the application, it's hard to say if this change could introduce any bugs. I would need to explore the codebase further to understand this.

Workflow ID: wflow_6Nb0oeMko31Jeoen


Not what you expected? You can customize the content of the reviews using rules. Learn more here.

Copy link
Contributor

@MikeShi42 MikeShi42 left a comment

Choose a reason for hiding this comment

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

really elegant this time around!

@kodiakhq kodiakhq bot merged commit bc1e84b into main Mar 3, 2024
4 checks passed
@kodiakhq kodiakhq bot deleted the sr/hdx-151 branch March 3, 2024 23:52
colehpage pushed a commit to colehpage/hyperdx that referenced this pull request Mar 7, 2024
…dxio#332)

Allow to interact with page while log side panel is open


https://github.com/hyperdxio/hyperdx/assets/149748269/0c7baa7e-9ffb-4bd4-994f-764dc73eca84






----

| <a href="https://ellipsis.dev" target="_blank"><img src="https://avatars.githubusercontent.com/u/80834858?s=400&u=31e596315b0d8f7465b3ee670f25cea677299c96&v=4" alt="Ellipsis" width="30px" height="30px"/></a> | 🚀 This PR description was created by [Ellipsis](https://www.ellipsis.dev) for commit 0119837.  | 
|--------|--------|

### Summary:
This PR enhances user interaction by allowing page interaction while the log side panel is open, achieved by using the `useClickOutside` hook in `LogSidePanel.tsx` and updating the `setOpenedLog` function in `SearchPage.tsx`.

**Key points**:
- Added `useClickOutside` hook from `@mantine/hooks` in `LogSidePanel.tsx` to create a `drawerRef`.
- Used `drawerRef` to close the drawer when a click is detected outside of it.
- Updated `enableOverlay` prop of `Drawer` component to depend on `subDrawerOpen` state.
- Added condition in `setOpenedLog` function in `SearchPage.tsx` to prevent unnecessary updates when the log is already open.


----
Generated with ❤️ by [ellipsis.dev](https://www.ellipsis.dev)
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.

None yet

2 participants