SpecterOps / BloodHound

Six Degrees of Domain Admin
https://bloodhoundenterprise.io/
Apache License 2.0
1.07k stars 106 forks source link

BED-4594+BED-4686: Styling fixes for `ExploreSearch` and `GraphButtons` components on the Explore page #826

Closed elikmiller closed 2 weeks ago

elikmiller commented 1 month ago

Description

This is accomplished by placing the ExploreSearch and the GraphButtons components in the same vertical flexbox container and dynamically changing the size used by the cypher query input between 4 and 12 lines based on the available vertical viewport space.

In order to co-locate these components (specifically the GraphButtons component) we make use of React's useImperativeHandle hook to enable ourselves to call functions which manipulate the Sigma.js graph instance from outside of the graph context. To learn more about this pattern please read https://react.dev/reference/react/useImperativeHandle#exposing-your-own-imperative-methods

Motivation and Context

This PR addresses:

How Has This Been Tested?

Unit tests have been updated

Screenshots (optional):

https://github.com/user-attachments/assets/3f4d22c9-1f53-441f-ac6a-e221910aeeba

Types of changes

Checklist: