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: Global Search Bar #56

Open
golanglemonade opened this issue Nov 11, 2024 · 0 comments
Open

feat: Global Search Bar #56

golanglemonade opened this issue Nov 11, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@golanglemonade
Copy link
Member

golanglemonade commented Nov 11, 2024

Add a global search bar on the top right of the console.

The UI can hit the search resolver for the backend, e.g.:

query Nodes($query: String!) {
  search(query: $query) {
    nodes {
      ... on ControlSearchResult {
        controls {
          id
          name
        }
      }
      ... on OrganizationSearchResult {
        organizations {
          id
          name
        }
      }
      ... on GroupSearchResult {
        groups {
          id
          name
        }
      }
      ... on ControlObjectiveSearchResult {
        controlObjectives {
          id
          name
        }
      }
      ... on EntitySearchResult {
        entities {
          id
          name
        }
      }
      ... on TaskSearchResult {
        tasks {
          id
          title
        }
      }
    }
  }
}
{
  "query": "mitb"
}

It should look for results for our main object types (for now lets start with) :

  • Organization
  • Group
  • Entity
  • Contols
  • SubControls
  • ControlObjectives
  • Tasks

Add the query to the codegen package: https://github.com/theopenlane/openlane-ui/tree/main/packages/codegen/query and use the generated urql functions for the query to the backend.

@golanglemonade golanglemonade added the enhancement New feature or request label Nov 15, 2024
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

No branches or pull requests

1 participant