Commit Graph

950 Commits

Author SHA1 Message Date
somebody1234
0a28d91d35
Switch to AJV for validating JSON Schema (#9191)
As ~~requested~~ suggested by @radeusgd

# Important Notes
None
2024-02-29 10:36:47 +00:00
Kaz Wesley
97033a2ff4
Represent documentation in AST, load into Node (#9205)
Part of #9162.

- Add support for representing and interpreting the full text-literal/documentation syntax (escape codes, platform-independent newlines, string interpolations); build on generalized operations for structured-fields that will simplify future representation of other types like `Vector`.
- Load parsed and interpreted node documentation into `Node`s.
2024-02-28 20:43:23 +01:00
somebody1234
fecdd534b1
Fix Component Browser aliases (#9163)
- Fix #9107
- Allow matching initials of aliases
- Allow matching spaces instead of underscores (aliases use spaces, not underscores)
- Fix only the first alias being detected. This is due to incorrect docs parsing keeping the leading space - `foo, bar` turns into `["foo", " bar"]`

# Important Notes
None
2024-02-28 15:33:22 +00:00
Adam Obuchowicz
c69ba4ee70
Fix area select regression (#9197)
Fixes #9182

Now we are careful when to handle events - before or after updating intersected set.

Added general E2E and detailed unit tests for selecting.

Also discovered, that sometimes the test are running while nodes are not yet in right positions. Added an instruction ensuring the position is right.
2024-02-28 13:14:48 +00:00
somebody1234
d232b9252c
Re-enable vibrancy and add support for Linux (#9003)
- Fixes support for vibrancy
- Disable background when vibrancy is enabled
- Minor refactors to pass the relevant config option to dashboard, so that the dashboard knows whether vibrancy is enabled
- Enable vibrancy on Linux if a special environment variable is set

# Important Notes
- MUST be tested on macOS
- Windows *does not support resizing* when vibrancy is enabled. This is a limitation of Windows - see [this issue](https://github.com/electron/electron/issues/6107).
2024-02-28 13:01:03 +00:00
Kaz Wesley
edb349f8fc
Allow setting CB viz type; determine default from suggestion type info. (#9196)
Fixes #8570.

- Visualization type can be set per suggestion entry.
- Default visualization type for each suggestion is determined by suggestion type info.

# Important Notes
Previewing non-default visualizations seems to be broken (#9194), but this PR updates the GUI to select visualization types appropriately.
2024-02-27 15:49:56 +00:00
somebody1234
e59b422612
"Keyboard shortcuts" settings page (#9071)
- Close https://github.com/enso-org/cloud-v2/issues/896
- Add new settings page for viewing and editing keyboard shortcuts
- Refactor shortcut manager to resemble GUI2's shortcuts module
- Minor refactor moving `dashboard/layouts/dashboard` to `dashboard/layouts`; and moving all moals to `dashboard/modals`

# Important Notes
- The modal for capturing keyboard shortcuts has not been tested on macOS.
2024-02-27 12:52:21 +00:00
Kaz Wesley
e4383cb3bd
Fix CB reloading when vis-selector opened (#9192)
Fixes a bug blocking #8570.
2024-02-26 20:41:47 +00:00
somebody1234
a7251eb8d4
Improve mouse and keyboard UX (#9100)
- Close https://github.com/enso-org/cloud-v2/issues/914
- Add selection brush for selecting multiple assets using mouse
- Port selection brush over from GUI2
- Support <kbd>Ctrl</kbd>-select to select multiple ranges
- Add various actions when *exactly one* asset is selected:
- <kbd>Enter</kbd> for various assets to trigger their double-click actions
- Projects are opened
- Directories are toggled open/closed
- Secrets show the "upsert secret modal"
- <kbd>ArrowLeft</kbd> now collapses the selected folder
- <kbd>ArrowRight</kbd> now expands the selected folder
- <kbd>ArrowUp</kbd> and <kbd>ArrowDown</kbd> change the selected asset to the previous/next asset
- The newly selected asset (technically: any asset that is the only selected asset, whether this is a result of a drag, mouse click, or keypress) is automatically smoothly scrolled to.
- Improvements to the search bar
- <kbd>Escape</kbd> cancels tabbing through suggestions (and discards the selected suggestion)
- <kbd>ArrowUp</kbd> and <kbd>ArrowDown</kbd> behave like <kbd>Shift</kbd>+<kbd>Tab</kbd> and <kbd>Tab</kbd> to move to the previous/next suggestion respectively
- <kbd>Shift</kbd>+<kbd>ArrowUp</kbd> and <kbd>Shift</kbd>+<kbd>ArrowDown</kbd> to select multiple assets using the keyboard
- <kbd>Ctrl</kbd>+<kbd>Space</kbd> to toggle assets using the keyboard
- <kbd>Escape</kbd> to deselect all assets
- Add CSS-only focus ring to highlight most recently selected item, but only when navigating via keyboard
- Enter and double-click to temporarily open the sidebar to edit a Data Link

Optional features that have not yet been implemented:
- Move the "update secret" modal to the sidebar as well

# Important Notes
None
2024-02-26 16:49:49 +00:00
somebody1234
86d268b198
Fix type error caused by bad merge (#9189) 2024-02-26 17:40:52 +01:00
somebody1234
d71e8c4742
Move "change password" to settings (#9079)
- Close https://github.com/enso-org/cloud-v2/issues/893
- Remove "Change Password" modal
- Remove "Change Password" option from user menu
- Add "Change Password" section to "General -> Account" in settings

# Important Notes
None
2024-02-26 15:50:00 +00:00
somebody1234
207f6a06e5
Fix E2E tests (#9185)
- Fix #9184
- It turns out the logic for handling macOS was already present elsewhere - and even *in the same file*! It seems like this was an oversight

# Important Notes
None
2024-02-26 15:34:43 +00:00
somebody1234
65f66fabb6
Remove forceCreate from backend requests; minor bugfixes (#9074)
- Remove unused `forceCreate` parameter from backend requests
- Also undo bad change to behavior of sorting assets:
- https://github.com/enso-org/enso/pull/7540#issuecomment-1683699696
- Fix https://github.com/enso-org/cloud-v2/issues/910
- Closing a project now doesn't close other projects.
- Unable to properly test, as I cannot get the second project to open
- Fix https://github.com/enso-org/cloud-v2/issues/908
- Use the `download` module that already exists to download the app...
- Add correct arrow icon for collapsing/expanding folders
- Turns out this icon had always existed, and I just didn't see it for the longest time
- Hide irrelevant parts of search bar on Local Backend
- The row of labels
- `no:`, `has:`, `label:`, `-label:`, `description:`, `-description:` (and their corresponding autocomplete entries)
- Also change text to say "Type to search for projects." because the other asset types mentioned do not (and will never) exist on the Local Backend.
- Fix search bar eating up `"` and ` ` keypresses
- Fix icons for Data Links and Secrets being swapped in `AssetIcon`

# Important Notes
- The fix for https://github.com/enso-org/cloud-v2/issues/908 has not been tested on Safari (I don't have a macOS machine.)
2024-02-26 15:10:38 +00:00
somebody1234
4e8f066ec0
Use backend errors in toast notifications (#9078)
Adds the `message` returned by the backend to the toast notification, so that the user gets a more detailed error message.

# Important Notes
- Not sure what's the best way to properly test this, as for a lot of the backend endpoints there is no easy way to (even intentionally) trigger them from the frontend, because the frontend does a decent amount of validation as well.
2024-02-26 14:51:44 +00:00
Kaz Wesley
92624126ba
Fix minor visual glitch in record-control background (#9170)
Before:
![image](https://github.com/enso-org/enso/assets/1047859/dcf083b2-c169-42a9-a120-4aa730f05962)

After:
![image](https://github.com/enso-org/enso/assets/1047859/7d9b774a-1ccd-4225-9a2d-a313e40e0c4f)
2024-02-26 08:38:43 +00:00
Kaz Wesley
245ec7afe8
Replace execution context controls with record mode controls (#9133)
Closes #8673. Stacked on #9132.

Before:
![image](https://github.com/enso-org/enso/assets/1047859/1b1ca9f4-eda9-45fd-bec1-cd7e255112fa)
![image](https://github.com/enso-org/enso/assets/1047859/b8cf6de1-d75c-48d0-ac0d-9e6e0c659dd4)

After:
![image](https://github.com/enso-org/enso/assets/1047859/91d13862-96e7-4175-a61e-40aecd6d62b0)
![image](https://github.com/enso-org/enso/assets/1047859/ef20511f-00f2-4042-b4d4-97728817500b)

# Important Notes
- The model has been refactored from execution-modes (live/design) to record-mode (on/off) up to the point of the project store, where it's translated (since the backend still uses the live/design concepts).
2024-02-23 20:10:43 +00:00
James Dunkerley
880562a503
Add comment, warning, error icons. (#9169)
Add some state icons.
![image](https://github.com/enso-org/enso/assets/4699705/ab4060f5-7814-4a0d-a0af-bb775235ff98)
2024-02-23 17:25:17 +00:00
Kaz Wesley
9c872c653e
Checkbox shows argument name if not already shown (#9146)
Fixes #9002. This is not a great solution; doing this properly would require some refactoring of widget selection. Proposal:  #9145.
2024-02-23 15:48:10 +00:00
Adam Obuchowicz
8c286da21b
Proper fix for editing node (#9153)
The replacement for https://github.com/enso-org/enso/pull/9144

We try to match bindings using "buttons" field, but it in fact does not contain the just-released buttons.

# Important Notes
I added tests for editing node. Also, I decided that the cursor position should be at the end of line when starting editing by clicking at "edit" icon.
2024-02-23 14:54:34 +00:00
Kaz Wesley
bc99941736
Move project name (#9132)
Closes #8672.

Before:
![image](https://github.com/enso-org/enso/assets/1047859/9d95178f-24c1-4e82-bf90-a37c3d1ca450)

After:
![image](https://github.com/enso-org/enso/assets/1047859/84e6dae9-e309-46c5-9be8-6b82dcb9ddc4)

# Important Notes
- The execution context controls are no longer aligned nicely, but we are about to make major changes to their display anyway: #8673
2024-02-23 13:48:33 +00:00
Kaz Wesley
990ba2fc64
Fix flickering when resizing visualization (#9147) 2024-02-23 08:47:57 -05:00
Kaz Wesley
d650798898
Display alias when searching by alias (#9148)
* Display alias when searching by alias

* Fix tests
2024-02-23 08:47:11 -05:00
somebody1234
bdebe904b3
Make alt key keep dropdown open (#9157)
- Fix #9083

# Important Notes
None
2024-02-23 13:41:58 +00:00
Adam Obuchowicz
e7a9221618
Fix escaping \ (#9155)
Fixes #9151

In one of my previous PRs I merged two `escape` implementations having exactly the same documentation. However, one of it missed escaping `\` character.

# Important Notes
One test even expected that `\` are _not_ escaped, but I doubt it should, given the above bug report?
2024-02-23 12:10:45 +00:00
Michael Mauderer
a900fb5c43
Add docs to highlight order of processing dirty nodes in readFunctionAst. (#9141) 2024-02-23 11:19:35 +00:00
Nikita Pekin
5e4a7cf01c
Add Stripe for Billing Support (#8841)
* feat: Stripe billing support

Squashed commit of the following:

commit b7ab361d2e2a3b11819ee0c964dd25dde2850eac
Author: Nikita Pekin <nikita@frecency.com>
Date:   Wed Jan 10 04:14:14 2024 -0500

    fixes

commit 2b7f525be95d8d9e50dea9c5f31828dc2c823eae
Merge: 717fba94a1 942e6c2305
Author: Nikita Pekin <nikita@frecency.com>
Date:   Mon Jan 8 08:54:15 2024 -0500

    Merge branch 'develop' into wip/np/payment-page-2

commit 717fba94a1b900318ae7d32664b1cb292cb47364
Author: Nikita Pekin <nikita@frecency.com>
Date:   Mon Jan 8 08:32:38 2024 -0500

    fix

commit 66a278effddfe57d326acfe93b9fd6ce9f849a65
Author: Nikita Pekin <nikita@frecency.com>
Date:   Mon Jan 8 06:10:37 2024 -0500

    rename endpoints

commit 05ca2276d796d5431a19623f18d97503d730746c
Author: Nikita Pekin <nikita@frecency.com>
Date:   Thu Jan 4 03:13:07 2024 -0500

    update for new API

commit ecc65a4b3bbf8167c91eb9cc9a71f05367ee41f6
Author: Nikita Pekin <nikita@frecency.com>
Date:   Tue Jan 2 09:02:23 2024 -0500

    make subscribe appear in app

commit 048883e343cc42ba75e2e1ebbfa50b9d3033255c
Author: Nikita Pekin <nikita@frecency.com>
Date:   Mon Jan 1 05:13:04 2024 -0500

    unify pricename and price

commit 5439299eaa01732bcee3204c72987845a569029b
Author: Nikita Pekin <nikita@frecency.com>
Date:   Sun Dec 31 22:57:52 2023 -0500

    rename checkout sessions endpoint

commit 67537302f9183918272324723b34e26659d10dbe
Author: Nikita Pekin <nikita@frecency.com>
Date:   Sun Dec 31 22:57:44 2023 -0500

    fix session ID

commit 637968331bf3d2c10b9c6130ae994529b9606fdd
Author: Nikita Pekin <nikita@frecency.com>
Date:   Sun Dec 31 19:59:29 2023 -0500

    fix stripe JS

commit 051a01e1988f62931e2b7f3f436b6490a09602e0
Author: Nikita Pekin <nikita@frecency.com>
Date:   Sat Dec 30 23:32:41 2023 -0500

    tmp: add AWS profile and refactor

commit 9f4199b22dfc5565bea737e31f8d379e098712a7
Author: somebody1234 <ehern.lee@gmail.com>
Date:   Sat Nov 4 04:49:29 2023 +1000

    Fix `ALL_PATHS_REGEX`

commit 4b53bcf7f82fe30c21db013d01dae58e20afb605
Author: somebody1234 <ehern.lee@gmail.com>
Date:   Mon Dec 18 17:15:33 2023 +1000

    Expose `unauthenticatedBackend` from backend context

commit 8d554ac16747392c9cd5d10a2c3ad6d79afb7268
Author: somebody1234 <ehern.lee@gmail.com>
Date:   Mon Dec 18 17:12:17 2023 +1000

    Add methods for making HTTP requests to unauthenticated backend

commit 2010890cbd38bff31b18e0847ea22a5b71f926d1
Author: somebody1234 <ehern.lee@gmail.com>
Date:   Mon Dec 18 17:04:49 2023 +1000

    Add unauthenticated backend

commit 04ac84533bee493194e32129f934ccd9c1df78d6
Merge: 1fa45bc73c d4714af826
Author: somebody1234 <ehern.lee@gmail.com>
Date:   Mon Dec 18 16:26:27 2023 +1000

    Merge branch 'develop' into wip/np/payment-page-2

commit 1fa45bc73cbbf50e53c6f3273559210e85b66c7e
Author: Nikita Pekin <nikita@frecency.com>
Date:   Sun Nov 12 07:01:45 2023 +0000

    tmp: Complete checkoutSession flow

commit 30ec2792256db5b2b448119b07213b79e3f8a3c5
Author: somebody1234 <ehern.lee@gmail.com>
Date:   Wed Nov 1 19:20:15 2023 +1000

    Initial Stripe integration

* revert requestedPlan changes

* switch to path from query

* Prettier

* Fix type error

* Switch environment back to production

* Fix errors

* Fix dev server by removing COOP/COEP/CORP on the dev server specifically

* Redirect after upgrading plan is successful

* Fix errors; fix initial size of Subscribe page

---------

Co-authored-by: somebody1234 <ehern.lee@gmail.com>
2024-02-22 19:56:36 +03:00
Adam Obuchowicz
7f5b2edbf5
Fix interfering click handlers (#9127)
Fixes one failure in #8942 which caught a real issue: clicks at various panels were triggering many handlers at once, often unexpectedly - for example quick clicking at breadcrumbs (and automatic tests always click fast) we could also trigger getting out the current node.

Therefore, I added `stopPropagation` for all mouse events on "panel" level + where I think the event should be considered "handled" and no longer bother anyone. Also, to unify things, most actions are for `click` event.

Additionally I spotted and fixed some issues:
* When "clicking-off" Component Browser, it creates new node only if anything was actually typed in (no more dangling `operatorX.` nodes)
* Filtering now works for operators
* When, after opening CB with source node, user starts typing operator, we replace dot with space
* Fixed our shortcut handler, so it works properly with `click` event.
* Fixed problems with defocusing input in CB when clicking at links.

# Important Notes
I removed `PointerMain` binding for deselectAll, because it was triggered every time did the area selection.
2024-02-22 15:18:28 +00:00
Kaz Wesley
323d46ec4e
Add property test for textChangeToEdits and applyTextEdits. (#9131)
Add a test for some functionality introduced in #9055.
2024-02-21 21:48:37 +00:00
Kaz Wesley
fdec1d0671
Self-arrows: Distinguish self arguments (#9116)
Distinguish self arguments; render edges to them as arrows, and use icons for their widgets.
2024-02-21 08:40:08 -08:00
Kaz Wesley
01fc65eec5
Self-argument arrows: New edge rendering mode (#9099)
Self-argument arrow rendering
2024-02-21 09:43:22 -05:00
somebody1234
c60d1ba36d
Fix bug in map visualization (#9119)
- Fix a bug where longitude was used as both latitude and longitude, due to a typo....

# Important Notes
- As our Mapbox token is no longer valid, the map visualization no longer works, even with this fix. As a result, this cannot be tested properly.
- However, this can still be tested somewhat, by seeing that the error is no longer present in the repro:
- Open the `Colorado COVID` template
- Open the viz on this node (at the bottom right of graph. it may help to zoom out using Ctrl+Shift+A.):
![image](https://github.com/enso-org/enso/assets/4046547/54849e5f-8a53-4f5b-8bdf-f08fe8ca51f0)
- Compare the errors logged in the console between `develop`, and this branch. This branch should not have the error about `lat` (latitude) being out of range.
2024-02-21 12:21:20 +00:00
Michael Mauderer
6c4c791d87
Display warnings on components (#9108)
Closes #8678

[Peek 2024-02-20 12-45.webm](https://github.com/enso-org/enso/assets/1428930/6bb6c4ad-5507-4b11-b2c9-b295bf10c745)
2024-02-21 11:40:07 +00:00
Paweł Grabarz
d415d133bb
Fix node edits (#9111)
* Prevent duplication of external IDs in syncTree

* trim component browser accepted value

* use flush post for visualization data watcher

* do not create empty nodes when closing component browser

* Lint

---------

Co-authored-by: Kaz <kaz@lambdaverse.org>
2024-02-20 16:40:50 -05:00
Michael Mauderer
e264189f6a
New ... menu in the top bar with zoom controls (#9073)
Closes #8614

https://github.com/enso-org/enso/assets/1428930/8b5b47e4-5ce5-4bf0-a42f-0b6c3d7d9323
2024-02-20 15:44:49 +00:00
mwu
3a2ca2ae0f we don't need to hardcode version numbers probably 2024-02-20 16:32:04 +01:00
Kaz Wesley
c811a5ae8b
Enable the Code Editor, with new apply-text-edits algo. (#9055)
- Fix the UI problems with our CodeMirror integration (Fixed view stability; Fixed a focus bug; Fixed errors caused by diagnostics range exceptions; Fixed linter invalidation--see https://discuss.codemirror.net/t/problem-trying-to-force-linting/5823; Implemented edit-coalescing for performance).
- Introduce an algorithm for applying text edits to an AST. Compared to the GUI1 approach, the new algorithm supports deeper identity-stability for expressions (which is important for subexpression metadata and Y.Js sync), as well as reordered-subtree identification.
- Enable the code editor.
2024-02-19 23:57:42 +00:00
Kaz Wesley
d75523b46f
Render target attachment bit as part of port. (#9068)
Fixes one issue from #8139.

Before:
![image](https://github.com/enso-org/enso/assets/1047859/1db71cda-7f9e-4d15-ac0f-14cb3c0b7c09)

After:
![image](https://github.com/enso-org/enso/assets/1047859/c5aafc56-d81d-447e-b725-fcb2e30b3c4e)
2024-02-19 20:02:29 +00:00
AdRiley
27ec236c19
rename database Table to DB_Table (#9067)
Rename database.Table to database.DB_Table to avoid name collisions as part of https://github.com/enso-org/enso/issues/8981
2024-02-19 17:31:58 +00:00
Kaz Wesley
760afbc7f4
Render unconnected edges above nodes. (#9069)
Fixes one issue from #8139.

Before:
![image](https://github.com/enso-org/enso/assets/1047859/b6d05734-f186-4213-b943-81fd868cf565)

After:
![image](https://github.com/enso-org/enso/assets/1047859/4e42907f-8579-4869-99a3-74aac920e65b)
2024-02-19 15:12:15 +00:00
somebody1234
50d5f32570
Fix dashboard tests (#9050)
Fixes issues that were causing CI to fail.

# Important Notes
None
2024-02-19 11:47:48 +00:00
Adam Obuchowicz
fddfa1150a
Fix for adding node in collapsed functions (#9060)
Fixes #9049

There were still some stubs left in node creation code.

# Important Notes
I haven't added any tests, as unit testing the graph store is very difficult - it has much tangled logic there. I'm going to try to untangle it a bit, but in a separate PR.
2024-02-19 09:14:46 +00:00
Michael Mauderer
6746bdc148
Implement full wheel component menu (#9029)
Closes #8612.


[Peek 2024-02-12 14-11.webm](https://github.com/enso-org/enso/assets/1428930/504a0e17-9d75-46b2-b5e9-d23ec09d6613)

# Important Notes
The `...` menu was added at the top of the menu as there is less visual interference with an opened visualisation.
2024-02-15 14:01:38 +00:00
Michał Wawrzyniec Urbańczyk
06c8776099
CI: Fix macOS notarization (#9066) 2024-02-15 11:53:51 +01:00
Adam Obuchowicz
8489316d83
WidgetFunction: merge dynamic config for a call with inherited one (#9042)
Fixes #9008

Now, even if we inherit FunctionCall config from parent widget (e.g. drop down), we still ask for config of the current call and try to merge them (preferring the inherited parameters).
2024-02-14 23:05:45 +00:00
Kaz Wesley
cfe3d99da0
Fix Code Editor click (#9051)
Clearing the selection on mouseup breaks the CodeMirror integration. Adding this exception for contenteditable elements would fix it. Is this compatible with whatever this event handler is needed for?
2024-02-14 17:27:27 +00:00
Adam Obuchowicz
ee381369b0
Remove vite-plugin-top-level-await plugin (#9038)
We've used the vite-plugin-top-level-await to support top level await. But most of them were removed anyway, because the ide-desktop/lib/client is bundled as CJS and use some of gui2 code. And the plugin [is causing problems](https://github.com/Menci/vite-plugin-top-level-await/issues/25), [also in our CI](https://github.com/enso-org/enso/actions/runs/7842841953/job/21402194728?pr=9013#step:8:458)
2024-02-14 09:42:37 +00:00
AdRiley
5c7947ce60
Rename database column to DB_Column (#9046)
Rename database column to DB_Column to avoid name collisions as part of https://github.com/enso-org/enso/issues/8981
2024-02-14 09:11:52 +00:00
somebody1234
92f420efec
Add "Invite" button on top right (#8987)
- Implement https://github.com/enso-org/cloud-v2/issues/884
- Add an "Invite" button that is present when the "Share" button is not present

# Important Notes
None
2024-02-13 12:17:45 +00:00
Adam Obuchowicz
36722eaf55
Retry E2E tests on CI (#9040)
To guard us from flaky tests, CI will run every test three times and fail if _any_ of the run fails.

This way we hope most flakiness will be catch before merging PR.

Configured dashboard in the same way.
2024-02-13 11:43:56 +00:00
somebody1234
f7a84d06e4
Organization settings page (#8960)
- Close https://github.com/enso-org/cloud-v2/issues/840
- Add organization page
- Add wrappers for required API endpoints (get, update, delete org; upload org picture)

# Important Notes
None
2024-02-13 09:21:40 +00:00