sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.1k stars 1.27k forks source link

Code Insights: Improve creation UI live preview flow #39066

Open vovakulikov opened 2 years ago

vovakulikov commented 2 years ago

Background

We shouldn't block live previews from fetching data if the non-essential fields aren't filled out (like colours or names). Also, changing colour settings shouldn't trigger data re-fetching and should just "hot-reload" the live chart without the loading step.

Original comment from @AlicjaSuska

general flow-related thought: we load the live preview only after user fills out both query and the name. Maybe we could load it after entering only the search query and use a temporary name 'data series 1' until user enters their own name? Not necessary for this issue, but I think it would make the flow smoother.

sourcegraph-bot-2 commented 2 years ago

Heads up @joelkw @felixfbecker @vovakulikov @unclejustin - the "team/code-insights" label was applied to this issue.

unclejustin commented 2 years ago

Need to make sure we cover testing for

May need to extract the function that populates colors to a utility so we can consume without pulling data.

Joelkw commented 2 years ago

It seems like names are the only thing we block on (we already don't block on colors).