[feature] tracking for ast-grep-search-panel minimum viable product
SoonIter opened this issue · comments
Context
See #31. Currently, ast-grep only has a CLI operation panel, and some users from the community would like to have a visual expression. If we provide a VSCode search panel in plugin, we will be better able to cover the usage scenarios in the developer's daily work.
There are two ways to achieve this, one is to integrate into the official VSCode search menu, but according to the microsoft/vscode#59921, there is currently no stable API in VSCode and the progress is very slow.
The other is to implement our own webview and UI. In my experiments in #48 , this method is more flexible but requires more work.
Currently, we have to choose the second option. If VSCode provides APIs that meet our needs in the future, we can also reuse some of the code and migrate it. (IMO, it will take at least two years)
Tracking
To achieve all our features in #31, there is currently a huge amount of work to be done and we can't finish it all at once.
This issue is mainly to achieve all the prerequisite tasks and provide a minimum implementation, on which we can iterate our core features.
Here is the task list I think need to be completed. If there are no major problems, I will create corresponding issues for each task and we can have deeper discussions in specific issues.
Step 1 Necessary infrastructure
In UI development, it is unbearable to work without hot module replacement.
Step 2 UI
I referred to VSCode source code to draw a simple prototype sketch. It is simple and practical, containing three main parts SearchWidgetsContainer
TextSearchProviderMessages
and SearchResultList
If there are other better designs from other tools such as Codeque, please feel free to point them out.
![image](https://private-user-images.githubusercontent.com/79413249/292666418-19e12bf9-dd87-40a3-be23-9003cfbd8f90.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE2MDE2MTcsIm5iZiI6MTcyMTYwMTMxNywicGF0aCI6Ii83OTQxMzI0OS8yOTI2NjY0MTgtMTllMTJiZjktZGQ4Ny00MGEzLWJlMjMtOTAwM2NmYmQ4ZjkwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIxVDIyMzUxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBjNGJjYzE1ODE1NmFhOTI0MmUwZjIzN2RmNmJiY2Y5MDkxNTA1MjRiYTZkZmFjMWIwYzk1ZTRmMTc5MzdiZmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.HNiupadsjYKbf7u6ViBPSOhiLpHiXr3d5M7dszQVfYI)