alexeyinkin opened a new issue, #22147: URL: https://github.com/apache/beam/issues/22147
### What needs to happen? We have a lot of technical debt in frontend architecture, including: 1. **Duplicate `PlaygroundState` creation**. `PlaygroundState` is created above the root navigator. Then for embedded page it is created again under the route in `EmbeddedPageProviders`. Only the bottom one is used in the embedded version. A few other `ChangeNotifier` classes follow the same pattern. This is completely and hard to maintain. 2. **Redundant `CodeController` re-creation**. Language and theme were read-only properties for `CodeController`, so our app had to re-create the controller when any of these were changing. This had been fixed since. 3. **No single source of truth for source code**. It is stored in `CodeController` within `EditorTextArea`. When code changes, the widget looks up the `PlaygroundState` and copies the code there. When running, code is sent from `PlaygroundState`. When the user selects another snippet, there is no way to tell the `CodeController` to pick it up. So the app employs a hack with `EditorKeyObject` to drop the editor state when the snippet or SDK changes, or when reset is pressed. The Flutter framework then re-creates `EditorTextArea`, and on creation it picks up the current code from the selected example. These issues are interconnected and are easier to fix in one take. ### Issue Priority Priority: 2 ### Issue Component Component: beam-playground -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
