Commit Graph

18 Commits

Author SHA1 Message Date
Ilya Bogdanov
717f6bb330
Display argument placeholders for autoscoped constructors (#9737)
Fixes #9635 

<img width="925" alt="Screenshot 2024-04-18 at 2 43 09 PM" src="https://github.com/enso-org/enso/assets/6566674/fbdce484-ac0b-4e30-8577-1c9dc419dffe">
2024-04-24 13:40:42 +02:00
Paweł Grabarz
9d2d9038c9
Fix spurious gui e2e dropdown test failures (#9697)
In GUI E2E `widgets.spec.ts`, be more specific about which tested dropdowns should be visible. Since the tested node actually receives two dropdowns, the test could fail by detecting both and expecting only one. Since we already have a very specific selector for the dropdown we are testing, use it instead of fresh global locator.
2024-04-15 16:05:14 +00:00
Paweł Grabarz
3b21f5579f
Fix node arguments hiding animation, clipping and dropdown styles. (#9685)
Fixes #9492

Implemented generic component for flawless size-based transitions, then used it for hiding arguments and dropdown animation. That replaced the `max-size`-based CSS animation that caused original issue. Refactored dropdown positioning to avoid further issues related to animation overflow clipping. The dropdown also got a bit of a lift to fit closer to styles in current Figma designs.

https://github.com/enso-org/enso/assets/919491/e85fd68c-b2e8-4d58-90e1-4fd7b33f1c9b
2024-04-12 13:44:13 +00:00
Kaz Wesley
b631745c1d
Interaction resumption (#9621)
Prevent interactions such as an open dropdown from being disrupted by the temporary state of absent type information occurring after an edit.

https://github.com/enso-org/enso/assets/1047859/bcc7fa02-847f-4cd0-b9fc-3186a97c5816

All widget-edit interactions that are active when a component is to be unmounted save state and are suspended. When a new component defining a `WidgetEditHandler` is instantiated, if the component is found to be equivalent to a component that was suspended, and no other interaction has been initiated in the interim, the interaction is restarted using the suspended state.

# Important Notes
- Fix a bug caused by a variable tracking an interaction's active state getting out of sync with the interaction. `WidgetEditHandler` now provides a reactive `active` property; using it is simpler and avoids this type of bug in the future.
- Fix a flickering bug that sometimes made it hard to open dropdowns by clicking the arrow.
2024-04-11 15:39:16 +00:00
James Dunkerley
e262801daa
Restructure Standard.Table. (#9559)
Move the types from `Standard.Table.Data` to `Standard.Table`.

Exceptions:
- `Standard.Table.Data.Report_Unmatched` => `Standard.Table.Constants`.
- `Standard.Table.Data.Join_Kind_Cross` => `Standard.Table.Internal.Join_Kind_Cross`.
Also removed constructor as an atom type.
- `Standard.Table.Extensions.Table_Ref` => `Standard.Table.Internal.Table_Ref`.
- `Standard.Table.Data.Type.Value_Type_Helpers` => `Standard.Table.Internal.Value_Type_Helpers`.
- `Standard.Table.Data.Type.Enso_Types` => `Standard.Table.Internal.Value_Type_Helpers`.
- `Standard.Table.Data.Type.Storage` => `Standard.Table.Internal.Storage`.

Changed all `Standard.Table` imports inside project to be project.
Favoured importing from `Standard.Table.Main` in `Standard.Database`.
Also fixed some linting in Enso_File.
2024-03-27 17:10:43 +00:00
Kaz Wesley
22a2c208c0
Multi-select (part 1) (#9516)
* Multi-select
2024-03-25 12:05:20 -04:00
Adam Obuchowicz
aecabfe0de
Drop-down filtering (#9399)
Fixes #9058 - the filtering so far is a bit aggressive, but I tune it up in next PR(s).

[Screencast from 2024-03-13 15-20-17.webm](https://github.com/enso-org/enso/assets/3919101/112ce65a-a8c6-4818-b8b8-9f493caf9c81)

Added new special `WidgetEditHandler,` allowing handling "multi-widget" interactions needed for drop down filtering.

# Important Notes
* Now when clicking on argument name, the edit is accepted (as normal "outside" click), and then the dropdown is opened again (due to handling click event). I didn't figure out how to handle this case properly, left something least confusing.
2024-03-15 15:15:43 +00:00
Ilya Bogdanov
720a72ccb2
Implement file browser widget (#9302)
Closes #8681

https://github.com/enso-org/enso/assets/6566674/46a6de40-cbd0-427e-942d-b58ad4a9fd33
2024-03-14 12:27:15 +00:00
Ilya Bogdanov
793fb8f48e
Use labels from the engine if they are available (#9290)
Fix small regression on develop for dropdown labels.

<img width="645" alt="Screenshot 2024-03-05 at 7 09 22 PM" src="https://github.com/enso-org/enso/assets/6566674/caec9cbc-ef8d-4ac2-8ec1-cf2de909f2d4">
2024-03-11 10:56:56 +00:00
Paweł Grabarz
b7a8909818
Vue dependency update, better selection performance, visible quotes in text inputs (#9204)
- Improved performance by batching simulatenous node edits, including metadata updates when dragging many selected nodes together.
- Updated Vue to new version, allowing us to use `defineModel`.
- Fixed #9161
- Unified all handling of auto-blur by making `useAutoBlur` cheap to register - all logic goes through a single window event handler.
- Combined all `ResizeObserver`s into one.
- Fixed the behaviour of repeated toast messages. Now only the latest compilation status is visible at any given time, and the errors disappear once compilation passes.
- Actually fixed broken interaction of node and visualization widths. There no longer is a style feedback loop and the visible node backdrop width no longer jumps or randomly fails to update.
2024-03-06 15:34:07 +00:00
Kaz Wesley
b0842feea2
Hide placeholders (#9246)
* New menuVisible logic

* Hide placeholders unless sole selected node, required argument, or requested by dynamic config
2024-03-05 09:16:38 -05:00
Michael Mauderer
94666e6727
Dropdown widget improvements. (#9186)
Closes  #8995

[Peek 2024-03-01 16-06.webm](https://github.com/enso-org/enso/assets/1428930/3f62aad8-8426-4f8f-b49e-57769b22bfb4)
2024-03-04 12:54:38 +00:00
Ilya Bogdanov
e1943bdd49
Properly propagate dynamic configuration inside dropdown widget (#8983)
Closes #8932

Now we use a bit more robust mechanism for passing dynamic configuration down the widget tree inside dropdowns, no longer relying on the `label`s used for dropdown items.

Curiously, we still need to use a hotfix implemented earlier, as we won’t have info about the currently selected item otherwise. Highlight for the currently selected item is not crucial as proper dynamic config, so we can leave with the current solution in the meantime.

No visual changes to the IDE, apart from fixed highlight for currently selected item.

# Important Notes
Target branch: #8950, for easier testing.
2024-02-12 10:17:29 +00:00
James Dunkerley
aed59d316d
Text Editor shows up for Text only parameters. (#9014)
- Fix type name so that Text Editor shows for parameters.
- Following on from #9010, now show the default text values.
![image](https://github.com/enso-org/enso/assets/4699705/da68fec4-25b9-4e04-ba13-a2d112cf67c9)
2024-02-09 17:26:15 +00:00
Adam Obuchowicz
e88d8d8756
Fix vector widget in non-argument literal (#8972)
Fix vector widget not appearing in non-argument list literals. Added tests for showing widgets for various literals.
2024-02-06 09:43:38 +00:00
Ilya Bogdanov
45221d9167
A quick fix for incorrectly working dropdowns. (#8933)
Partial fix for #8932 

https://github.com/enso-org/enso/assets/6566674/75a878fb-891b-44fc-bdfd-c3cbb90c9f35

This is not a correct fix, as comparing strings is not what we really want, but it should fix most of use cases.
2024-02-02 15:55:22 +01:00
Ilya Bogdanov
ad6348a12a
Text input widget (#8873)
Closes #8823

https://github.com/enso-org/enso/assets/6566674/966576ec-6507-401c-98d3-bd71c2ffc6b2

Adds a basic text widget for text literals. 

### Important Notes

Several known restrictions:
- Separators would always be replaced with single quotation marks. All types of separators in Enso are supported though, and they would be correctly escaped if needed.
- Logic for widget selection probably needs refinement (works for text literals and `Text` types, but does not work for `Text | Integer`, for example)
- **(!)** There is a very annoying issue when the input field suddenly loses focus, closing the editing mode and discarding any changes. Debugging shows that it happens when we receive an engine update (and probably recreate the node component/widget tree (???)). It requires a separate investigation.
2024-01-30 15:05:28 +01:00
Adam Obuchowicz
057245ea5e
Fix nested drop downs + test scenarios for drop-down and vector widgets. (#8859)
Part of #8518
Closes #8822

The drop downs were missing, because WidgetFunction had a higher score than them and took precedence. The fix was to adjust scores, so drop down is before both argument name and function. Generally, any widget expecting to "overlap" existing code (and possibly further widgets) should go before WidgetFunction.

# Important Notes
* Extended mockExpressionUpdate to accept a subexpression of a node. Also, I removed it from GraphDb - I want this function to have as little impact on app code as possible.
2024-01-26 17:18:27 +00:00