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

Search: Decouple search-ui components and search business logic #40285

Closed
vovakulikov opened this issue Aug 11, 2022 · 1 comment · Fixed by #40381
Closed

Search: Decouple search-ui components and search business logic #40285

vovakulikov opened this issue Aug 11, 2022 · 1 comment · Fixed by #40381
Assignees
Labels
code-insights Issues related to the Code Insights product insights-aggregation-4.X webapp

Comments

@vovakulikov
Copy link
Contributor

vovakulikov commented Aug 11, 2022

Search UI components are supposed to be consumer agnostic and reusable UI without significant implementation leaks in props and special to consumer logic inside. But currently, if we look at the search-ui package, we will see that this is full of core/business logic, and all UI and logic tuning is happening on the props level. (A good example is that the side panel has a lot of coreWorkflow checks, or it uses a lot of Zustand global stores, which we have to replace in runtime with react context)

All these problems lead to the bad public API of these search UI components and make them hard to reuse, understand and maintain.

This issue implies that we have to unbound search UI from the global, consumer logic, simplify public API of them and make it easy to reuse and compose them in different consumers (search-ui is used primary for two consumers at the moment WebApp and VSCode integration)

/cc @Joelkw @felixfbecker @vovakulikov @unclejustin

@vovakulikov vovakulikov added webapp code-insights Issues related to the Code Insights product insights-search-aggregation-4.0 Aggregation in the search UI feature for Sourcegraph 4.0 labels Aug 11, 2022
@vovakulikov vovakulikov added this to the Insights iteration 24 milestone Aug 11, 2022
@vovakulikov vovakulikov self-assigned this Aug 11, 2022
@vovakulikov vovakulikov added insights-aggregation-4.X and removed insights-search-aggregation-4.0 Aggregation in the search UI feature for Sourcegraph 4.0 labels Aug 24, 2022
@felixfbecker
Copy link
Contributor

I'm moving this out of the iteration since it seems it's not a blocker for 4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-insights Issues related to the Code Insights product insights-aggregation-4.X webapp
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants