botpress / studio

The studio is the main interface you'll use to build and edit your chatbot.
https://botpress.com/docs/quickstart#conversation-studio
38 stars 38 forks source link

feat(layout): added switches to toggle different panels #256

Closed EFF closed 2 years ago

EFF commented 2 years ago

If you look at the file changes, this one looks a bit bigger than it is.

If you look at the final changes, you would be surprised it needed all those changes.

Done

0- renamed the ToolBar component for TopNav (as we have other Toolbar components all around got me confused) 1- broke down the top nav in smaller components, removed logic 2- keep state of explorer (left panel) in global app state 3- use the same component for Container and Explorer panel so that the state is kept between pages and page refresh 4- reworked translations files a little bit (just for top nav) 5- some logic to render the cmd or ctrl

Ouf of scope of this PR

I almost went into doing them 1- review the main layout (Layout/index.tsx) file, it's a mess it would have require a lot of refactor and would have bloat the pr 2- change the window listeners for emulator toggling for a the behavior that is exactly like the 2 other panels 3- re(move) the emulator top right button. As they will eventually change for train and deploy buttons 4- get rid of SplitPane library 5- extract shortcuts in a single place 6- replace all occurence of cmd/ctrl by the logic I wrote

closes DEV-2247

Preview:

https://user-images.githubusercontent.com/955524/151258003-de14c361-5086-4cb9-b73d-1cb4f4314cfb.mp4

linear[bot] commented 2 years ago
DEV-2247 Implement pannel toggles in the top nav (Copy retool)

[29ce1636-f755-4427-b7f8-4bee2a75e34c](https://uploads.linear.app/86b5451b-0c34-4f42-8d54-be35c275a26b/5b439f21-edf7-43a0-af61-7600f6a9a3e1/29ce1636-f755-4427-b7f8-4bee2a75e34c) more specs available here [https://docs.google.com/presentation/d/1B9YHF30Wmnt62yS5Qg5GjI6grM8ZkgSQdmKFyNEtnDY/edit#slide=id.p](https://docs.google.com/presentation/d/1B9YHF30Wmnt62yS5Qg5GjI6grM8ZkgSQdmKFyNEtnDY/edit#slide=id.p)