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: display node details in sidepanel #1072 #1151

Merged

Conversation

faisal7008
Copy link
Contributor

@faisal7008 faisal7008 commented Oct 31, 2023

Problem

The current implementation of the Resources Explorer does not provide details about a node when it is clicked on the sidepanel.

fixes #1072

Solution

To address this issue, we propose to add a side panel that displays details about a node when it is clicked. This information will be fetched from the API using the resource ID, which is part of the node data.

Changes Made

  • Made existing sidepanel generic and added it to storybook along with its variants.
  • Reused the existing InventorySidepanel for the Resources Explorer.
  • Added resource details tab to the sidepanel which is displayed on inventory page as well as explorer page.
  • Implemented an onClick event handler for nodes that triggers an API call using the resource ID.
  • The API response is then used to populate the side panel with details about the clicked node.
  • Also, created a pill component used in node details section and added it to storybook.

How to Test

[Provide instructions on how to test the changes you made, including any relevant details like configuration steps or data to be used for testing.]

Screenshots

Screenshot 2023-10-31 at 3 25 38 PM Screenshot 2023-10-31 at 3 27 15 PM Screenshot 2023-10-31 at 3 27 24 PM Screenshot 2023-10-31 at 3 27 53 PM

Notes

[Any additional notes or information that you would like to share with the reviewers.]

Checklist

  • Code follows the contributing guidelines
  • Changes have been thoroughly tested
  • Documentation has been updated, if necessary
  • Any dependencies have been added to the project, if necessary

Reviewers

@Traxmaxx @mlabouardy @AllieMendes

Copy link
Contributor

@Traxmaxx Traxmaxx left a comment

Choose a reason for hiding this comment

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

LGTM with the new changes. Thanks a ton for this great PR! Also thanks for adding all the new Storybook components! 🔥 💚

@faisal7008
Copy link
Contributor Author

LGTM with the new changes. Thanks a ton for this great PR! Also thanks for adding all the new Storybook components! 🔥 💚

Appreciate the feedback! Glad you like the changes. Let me know if you need anything else. 😊

@mlabouardy
Copy link
Collaborator

@faisal7008 great job on this one 👏🏻 could you please fix the conflict so I can merge the PR :)

@mlabouardy mlabouardy added the ui label Oct 31, 2023
@mlabouardy mlabouardy merged commit bc9bb99 into tailwarden:develop Oct 31, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show node details in side panel
4 participants