enso/build-config.yaml

13 lines
443 B
YAML
Raw Normal View History

2022-05-23 05:16:04 +03:00
# Options intended to be common for all developers.
Introduce new focus APIs, and use for CB (#7167) Introduce new APIs for managing focus and using focus to inform delivery of keyboard events. Use new APIs to implement the following behavior: Focus: - If the component browser is opened, its initial state is *focused*. - If the node input area's text component is clicked, the component browser's state becomes *blurred*. - If a click occurs anywhere in the component browser, the component browser's state becomes *focused*. Event dispatch: - When the component browser is in the *focused* state, it handles certain keyboard events (chiefly, arrow keys). - If the component browser handles an event, the event is not received by other components. - If an event occurs that the component browser doesn't handle, the node input area's text component receives the event. [vokoscreenNG-2023-06-29_10-55-00.webm](https://github.com/enso-org/enso/assets/1047859/f1d9d07c-8c32-4482-ba32-15b6e4e20ae7) # Important Notes Changes to display object interface: - **`display::Object` can now be derived.** - Introduce display object *focus receiver* concept. Many components, when receiving focus, should actually be focused indirectly by focusing a descendant. - For example, when the CB Panel receives focus, its descendant at `self.model().grid.model().grid` should be focused, because that's the underlying Grid View, which has its own event handlers. By allowing each level of the hierarchy to define a `focus_receiver`, focus can reach the right object without the CB panel having to know structural details of its descendants. - When delegating to a field's `display::Object` implementation, the derived implementation uses the child's `focus_receiver`, which will normally be the correct behavior. **Changes to `shortcut` API**: - New `View::focused_shortcuts()` is a focus-aware alternative to `View::default_shortcuts()` (which should now only be used for global shortcuts, i.e. shortcuts that don't depend on whether the component is focused). It's based on the *Keyboard Event* API (see below), so events propagate up the focus hierarchy until a shortcut is executed and `stop_propagation()` is called; this allows sensible resolution of event targets when more than one component is capable of handling the same keypress. Keypress dataflow overview: DOM -> KeyboardManager -> FrpKeyboard -> KeyboardEvents -> Shortcut. Low-level keyboard changes to support Focus: - New `KeyboardManager`: Attaches DOM event handlers the same way as `MouseManager`. - New *Keyboard Event* API: `on_event::<KeyDown>()`. Events propagate up the focus hierarchy. This API is used for low-level keyboard listeners such a `Text`, which may need complex logic to determine whether a key is handled (rather than having a closed set of bindings, which can be handled by `shortcut`). - FRP keyboard: Now attaches to the `KeyboardManager` API. It now serves primarily to produce Keyboard Events (it still performs the role of making `KeyUp` events saner in a couple different ways). The FRP keyboard can also be used directly as a global keyboard, for such things as reacting to modifier state. Misc: - Updated the workspace `syn` to version 2. Crates still depending on legacy `syn` now do so through the workspace-level `syn_1` alias.
2023-07-27 01:13:48 +03:00
wasm-size-limit: 16.20 MiB
Bumped the build script (#3489) * The bash entry point was renamed `run.sh` -> `run`. Thanks to that `./run` works both on Linux and Windows with PowerShell (sadly not on CMD). * Everyone's favorite checks for WASM size and program versions are back. These can be disabled through `--wasm-size-limit=0` and `--skip-version-check` respectively. WASM size limit is stored in `build-config.yaml`. * Improved diagnostics for case when downloaded CI run artifact archive cannot be extracted. * Added GH API authentication to the build script calls on CI. This should fix the macOS build failures that were occurring from time to time. (Actually they were due to runner being GitHub-hosted, not really an OS-specific issue by itself.) * If the GH API Personal Access Token is provided, it will be validated. Later on it is difficult to say, whether fail was caused by wrong PAT or other issue. * Renamed `clean` to `git-clean` as per suggestion to reduce risk of user accidently deleting unstaged work. * Whitelisting dependabot from changelog checks, so PRs created by it are mergeable. * Fixing issue where wasm-pack-action (third party) randomly failed to recognize the latest version of wasm-pack (macOS runners), leading to failed builds. * Build logs can be filtered using `ENSO_BUILD_LOG` environment variable. See https://docs.rs/tracing-subscriber/0.3.11/tracing_subscriber/struct.EnvFilter.html#directives for the supported syntax. * Improve help for ci-run source, to make clear that PAT token is required and what scope is expected there. Also, JS parts were updated with some cleanups and fixes following the changes made when introducing the build script.
2022-06-01 14:44:40 +03:00
2022-05-23 05:16:04 +03:00
required-versions:
# NB. The Rust version is pinned in rust-toolchain.toml.
# NB. The Node version is pinned in .node-version.
2022-07-01 04:58:14 +03:00
cargo-watch: ^8.1.1
wasm-pack: ^0.12.1
Bumped the build script (#3489) * The bash entry point was renamed `run.sh` -> `run`. Thanks to that `./run` works both on Linux and Windows with PowerShell (sadly not on CMD). * Everyone's favorite checks for WASM size and program versions are back. These can be disabled through `--wasm-size-limit=0` and `--skip-version-check` respectively. WASM size limit is stored in `build-config.yaml`. * Improved diagnostics for case when downloaded CI run artifact archive cannot be extracted. * Added GH API authentication to the build script calls on CI. This should fix the macOS build failures that were occurring from time to time. (Actually they were due to runner being GitHub-hosted, not really an OS-specific issue by itself.) * If the GH API Personal Access Token is provided, it will be validated. Later on it is difficult to say, whether fail was caused by wrong PAT or other issue. * Renamed `clean` to `git-clean` as per suggestion to reduce risk of user accidently deleting unstaged work. * Whitelisting dependabot from changelog checks, so PRs created by it are mergeable. * Fixing issue where wasm-pack-action (third party) randomly failed to recognize the latest version of wasm-pack (macOS runners), leading to failed builds. * Build logs can be filtered using `ENSO_BUILD_LOG` environment variable. See https://docs.rs/tracing-subscriber/0.3.11/tracing_subscriber/struct.EnvFilter.html#directives for the supported syntax. * Improve help for ci-run source, to make clear that PAT token is required and what scope is expected there. Also, JS parts were updated with some cleanups and fixes following the changes made when introducing the build script.
2022-06-01 14:44:40 +03:00
# TODO [mwu]: Script can install `flatc` later on (if `conda` is present), so this is not required. However it should
# be required, if `conda` is missing.
# flatc: =1.12.0