mirror of
https://github.com/enso-org/enso.git
synced 2024-11-27 18:12:31 +03:00
71b3a9f40a
[Task link](https://www.pivotaltracker.com/story/show/182194574). [ci no changelog needed] This PR implements a new selection box that will replace an old (not really working) one in the component browser. The old selection box wasn't working well with the headers of the component groups, so we were forced to make a much harder implementation. The new implementation duplicates some visual components and places them in a separate layer. Then, a rectangular mask cuts off everything that is not "selected". This way: - We have more control over what the selected entries should look like. - We can easily support the multi-layer structure of the component groups with headers. - We avoid problems with nested masks that our renderer doesn't support at the moment. To be more precise, we duplicate the following: - Background of the component group becomes the "fill" of the selection. - Entries text and icons - we can alter them easily. - Header background and header text. By placing them in separate scene layers we ensure correct rendering order. https://user-images.githubusercontent.com/6566674/173657899-1067f538-4329-44f9-9dc2-78c8a4708b5a.mp4 # Important Notes - This PR implements the base of our future selection mechanism, selecting entries with a mouse and keyboard still has several issues that will be fixed in the future tasks. - The scrolling behavior will also be improved in future tasks. Right we only restrict the selection box position so that it never leaves the borders of the component group. - I added a new function to `add` shapes to new layers in a non-exclusive way (we had only `add_exclusive`) before. I have no idea how we didn't use this feature before even though we mention it a lot in the docs. - The demo scene restricts the position of the selection box for one-column component groups but does not for the wide component group.
11 lines
325 B
YAML
11 lines
325 B
YAML
# Options intended to be common for all developers.
|
|
|
|
wasm-size-limit: 4.86 MiB
|
|
|
|
required-versions:
|
|
node: =16.15.0
|
|
wasm-pack: ^0.10.2
|
|
# 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
|