Commit Graph

761 Commits

Author SHA1 Message Date
Michał Wawrzyniec Urbańczyk
b51dfe5a5b
macOS notarization fix (#8392) 2023-11-27 16:05:09 +01:00
Ilya Bogdanov
8516ed5cbb
Imports in CB (#8315)
Closes #8066


https://github.com/enso-org/enso/assets/6566674/ecd3d032-286b-4bfa-8dc6-96e178f595f3
2023-11-24 14:22:26 +00:00
somebody1234
b33285c634
Fix auto layout (#8345)
So it turns out auto-layout was broken if there were existing, already positioned nodes

# Important Notes
None
2023-11-24 10:49:15 +00:00
Paweł Grabarz
ec5c60b74d
fix incorrect byte array comparison (#8379)
Fixes an exception when opening the code editor. `indexedDB.cmp` doesn't accept `undefined` values. Moved its usage to a separate function to guard against that.
2023-11-24 08:54:23 +00:00
Michał Wawrzyniec Urbańczyk
8021109d8c
Build script fixes & improvements (#8285) 2023-11-23 21:19:31 +01:00
Michael Mauderer
76fb9f5c4b
All ways of creating node (+ button, dragging out edges) (#8341)
Closes #8054

[Peek 2023-11-20 13-50.webm](https://github.com/enso-org/enso/assets/1428930/064ad921-25dc-44f4-bed4-10b4f0ec0242)
2023-11-23 17:47:53 +00:00
Adam Obuchowicz
ce584862ff
Fix a set of issues in Component Browser (#8377)
Part of #8372

* Sorting was broken (sort's argument was removed)
* searching by initials now does not skip words
* icons: now we use same logic as existing nodes.
* local entities has worse score if "showLocals" option is toggled off.

# Important Notes
Please be aware that there is still an important issue with groups; sometimes they're not loaded. Reported [here](8376)
2023-11-23 15:53:59 +00:00
Dmitry Bushev
4b3ba78b52
Add shortcuts to start and stop the backend profiling (#8358)
close #8329

Changelog:
- add: `cmd`+`shift`+`,` and `cmd`+`shift`+`.` shortcuts to start and stop the backend profiling. Profiling data is stored on disk.
2023-11-23 15:31:17 +00:00
somebody1234
87dfb57f53
Show diagnostics in Code Editor (#8375)
As suggested by @JaroslavTulach.

- Shows diagnostics sent by `executionContext/executionStatus`
- Shows `Panic`s and `DataflowError`s sent by `executionContext/expressionUpdates`

# Important Notes
None
2023-11-23 14:15:48 +00:00
Adam Obuchowicz
2ddcaad6fe
Fix startup in the electron package (#8365)
Fixes #8334

There were two issues: one is bad code generated by vite. I needed to rephrase Rect.Zero definition. The second were missing widgets - that was caused by the fact that Vue components have a bit different properties than on test builds, apparently.
2023-11-23 11:03:23 +00:00
Adam Obuchowicz
fbe4221c46
Edges from alias analysis (#8316)
Fixes #8252

As we use proper alias analysis, we no longer display connections to overshadowed identifiers.

![Screenshot from 2023-11-16 15-50-27](https://github.com/enso-org/enso/assets/3919101/691aac6c-1951-4988-a338-4449c0413ef7)

# Important Notes
I've changed the meaning of edge's "source" - now it's expression ID of the constituted identifier, not the node ID. This will allow proper handling nodes like `[x, y] = Main.get_point` once the engine will support them.
2023-11-23 10:54:35 +00:00
James Dunkerley
ed9e71c4eb
Make ICON section work consistently between old and new GUI. (#8369)
- Handle name mismatch in icons between old and new IDE.
- Set the default icon for a few types.
- If can't find and icon use the Enso logo.

![image](https://github.com/enso-org/enso/assets/4699705/43d828b4-58cf-429e-b659-b1c389953b23)
2023-11-23 09:03:34 +00:00
somebody1234
1cf5ea96d6
More consistent reactive indices (#8353)
- Renames all `ReactiveIndex` and `ReactiveDb`s into the format `<key>To<value>`
- `ReactiveMapping`s (in `graphDatabase.ts`) currently have not been renamed - I'm not sure they need to be
- Removes various methods that have been made unnecessary by this change
- Simplifies some other methods
- Changes `SuggestionDb` to extend `ReactiveDb`

# Important Notes
None
2023-11-23 04:48:12 +00:00
Paweł Grabarz
e492d3f260
[GUI2] Render widget arguments (#8339)
Fixes #8256 #8257

Implemented displaying node argument placeholders. Refactored widgets to allow arbitrary input types, and split widget matching into two phases, separating input type validation step and allowing it to influence the derived TypeScript type of widget component props.

Connecting an edge to the placeholder is not implemented yet. Only connections to existing arguments are supported for now.

https://github.com/enso-org/enso/assets/919491/ad3bf254-5f56-4f2f-8c0d-616a7195c6d8


Nested argument lists are also supported:
<img width="396" alt="image" src="https://github.com/enso-org/enso/assets/919491/b61f6870-0f01-48c3-9b45-c7c6bc464638">
2023-11-22 14:43:58 +00:00
somebody1234
d136c8e40c
Fix dashboard issues (#8347)
- Fixes https://github.com/enso-org/cloud-v2/issues/770
- Fixes https://github.com/enso-org/cloud-v2/issues/772
- Fixes https://github.com/enso-org/cloud-v2/issues/775
- Fixes #8335

# Important Notes
The fix for "Reopening cloud projects" has not been tested, as opening projects on the cloud are currently broken - *however*, the logic change is very small - the only thing it does is make the reopening conditional. This means that, at the very least, it should not be a regression.
2023-11-21 10:37:45 +00:00
somebody1234
feb59be0a1
Fix styles for confirm delete modal (#8312)
The background for the "confirm delete" modal was offset - the fix is to add `inset-0`.

# Important Notes
None
2023-11-21 06:51:15 +00:00
somebody1234
5e1a3124dc
Download and upgrade buttons (#8265)
- Adds a download button in the user menu

# Important Notes
- The "upgrade to" button will be absent when the user already has a plan, as the only place where an "upgrade to" button shows up is the cloud view, when the user's account has not yet been enabled.
- The upgrade button currently links to https://enso.org/pricing - which does not yet exist. This is intentional, as another PR would be required to switch the URL, if we were to initially point to the one at https://enso-org.github.io.
- The pricing page would still not work, as that requires payment functionality, which is not yet complete
2023-11-21 06:34:46 +00:00
somebody1234
375e610660
Layout nodes without position (#8326)
- Closes #8071

# Important Notes
There is currently no way to predict the width a node, taking into account the width of widgets.
This should probably be done in another task.
2023-11-20 14:17:34 +00:00
somebody1234
062992bb8b
Fixes for GUI2 (#8310)
Addresses several issues found during book club.
- Add placeholder icons for visualizations (see screenshot)
- Also add the corresponding export to visualizations, and relevant support in the visualization store and visualization metadata DB.
- Show icon both on the visualization selector button, and in each visualization selector entry
- Adjust gaps between visualization selector entries
- Port table viz fixes (#8102) to Vue
- Fix height of table rows to avoid cutting off descenders on letters like `y` and `g`
- Make the space and enter keys work on visualization toolbar buttons, if they are selected
- `.blur()` code editor when clicking outside of it
- And similarly `.blur()` visualization selector
- Move selection brush on scroll by scaling the delta of `scrollTop` and `scrollLeft`
- Note that mouse position is technically still incorrect when scrolling past the end. I think this is fine - the new behavior is less broken, plus I am not aware of any way to fix this.

# Important Notes
None
2023-11-20 13:23:50 +00:00
somebody1234
9edc94afa0
Unify GUI2 headers (#8327)
- Closes #8304

# Important Notes
- A better long-term solution may be to remove COOP/COEP/CORP headers instead, but that is out of scope of this PR.
- Feel free to create a new issue, or discuss elsewhere, if this is something we want to do eventually
2023-11-20 11:32:40 +00:00
somebody1234
078260d8e7
Fix Geo Map visualization (#8311)
- Fixes #8300
- Fixes Geo Map visualization being completely broken
- Fixes Mapbox attribution icon in bottom right being invisible
- Fixes Mapbox attribution button being unclickable

# Important Notes
None
2023-11-20 11:25:23 +00:00
Michael Mauderer
85e2c72204
Fix component browser interactions. (#8303)
Fixes: #8064

Fixes broken interactions with of the component browser.
2023-11-17 15:28:45 +00:00
Michael Mauderer
aef3a4ffc0
enso-8194 Copy and pasting a single node (#8298)
Implements  #8194

[Peek 2023-11-13 14-15.webm](https://github.com/enso-org/enso/assets/1428930/22882487-7288-4eb7-af08-6539060b4967)
2023-11-17 03:57:30 +00:00
Michał Wawrzyniec Urbańczyk
4b181c38d0
Bump electron-builder on CI macOS runners. (#8284)
This PR avoids #8119 by selectively bumping the `electron-builder` on macOS CI runners. We do this only on macOS, as we do not want to trigger https://github.com/electron-userland/electron-builder/issues/6865 on Windows.
2023-11-16 19:07:29 +00:00
Paweł Grabarz
febce5dad7
[GUI2] Selection and rendering of basic node widgets (#8253) 2023-11-15 16:26:18 +00:00
Adam Obuchowicz
dc4de729b6
Fix CORS problems on built package (#8301)
Fixes #8297

Some external resources were failing due to CORS policies. This is the simplest fix.
2023-11-14 17:31:11 +00:00
Michael Mauderer
198fdece0b
Opening searcher with source node (#8279)
Implements #8065.
2023-11-14 14:42:33 +00:00
somebody1234
85a1bda213
Fix build-dashboard (#8292) 2023-11-14 15:34:33 +01:00
somebody1234
3046e152dc
Add Google Analytics (#8278)
- Add Google Analytics
- Add cross-domain linking between website homepage and cloud dashboard
- Highlight buttons on authentication flows on hover
- Save logged in state as `logged_in` cookie
- Remove saved access token from disk when signing out
- Support `redirect_to` parameter on `/register` page

# Important Notes
None
2023-11-14 12:28:10 +00:00
Adam Obuchowicz
5baec46466
Fix node placement (#8277)
Fixes: #8230

Fixes some rare cases caught by property tests, involving nodes with 0 width. `MultiRange` does not handle those. The thing is fixed by not using MultiRange, but by sorting nodes by the axis along which we're searching for free place.

All three reported seeds seem to be fixed.

# Important Notes
`MultiRange` is not used now, but I decided to spare it, violating YAGNI rule, as it is tested, and I feel it's a structure which may be useful.
2023-11-14 08:53:07 +00:00
Ilya Bogdanov
876cbd7b5d
Displaying progress for file uploads (#8227)
Closes #8182

Also, improved handling of multiple files – they are placed with a small vertical gap now.

The design for uploading files is non-existent, so I implemented something simple and good-looking. We can easily adjust it at any time.

You can’t move or otherwise interact with nodes while they are uploading.

https://github.com/enso-org/enso/assets/6566674/c0709d8f-3b95-4913-a6eb-caae225b6598
2023-11-13 13:50:57 +00:00
somebody1234
be413b5c5e
Fix dropzone conditions; disable creating assets when on "Recent" category (#8155)
- Closes https://github.com/enso-org/cloud-v2/issues/742

Other fixes:
- Fixes another bug I found while testing, with an obscure trigger condition: specifically, dragging a file when the app is initializing
- Removes CSS property transition on hover - I could swear it was working at some point, but seems to no longer work

# Important Notes
None
2023-11-13 13:16:33 +00:00
Adam Obuchowicz
c01ba83a3a
Use alias analysis to handle internal variables in CB input. (#8268)
Fixes #7926

See the new test cases to see what is the improvement.

The self still will be not ideal, but it's because it uses same logic as edges discovery. [When it will be improved](https://github.com/enso-org/enso/pull/8252) this should be improved as well.

https://github.com/enso-org/enso/assets/3919101/25efd56d-5aaa-4f10-957d-8ed6a40f3d9b

# Important Notes
It contains part of #8250. That PR may be reviewed, or here both PRs may be reviewed at once.
2023-11-13 12:59:15 +00:00
somebody1234
6cf75daea9
Add 404.html for static hosting (#8276)
Adds a `404.html` to allow client-side routing to work when using static hosting.

# Important Notes
- The routing uses the existing logic to infer the base path. This means that if the user accesses an invalid path, the invalid path will be used as the base path.
2023-11-13 09:09:01 +00:00
Michael Mauderer
148f34f778
Adding a new node with searcher (#8241)
Implements #8064 /

@kazcw Could you double-check that this plays well with your edge dragging implementation. Some of the code seemed a work in progress, and I want to avoid any issues with what you had planned there.
2023-11-10 14:10:44 +00:00
somebody1234
ce1ef7df03
Make UI for authentication flow match the rest of the dashboard (#8211)
- Changes all authentication screens to look similar to the rest of the dashboard
- Greatly simplifies HTML structure

# Important Notes
- This is being added before the official design is ready, *but* it should be useful anyway, because it greatly simplifies the HTML, which should make it easier to implement the new design
- The auth screens have a larger border-radius than all other elements in the app. This is intentional, to make them look like they continue naturally from the fully rounded submit buttons.
- Basic testing done:
- Logging in should still work
- Signing up should still work
- Setting username should still work
- Changing password should still work
- Forgot password should still work
- Password reset should still work
2023-11-09 10:48:41 +00:00
Kaz Wesley
ce042569b0
line:col positions in parser (#8203)
Add `line:column` information to source code references produced by the parser. This information will be used by GUI2 as part of the solution to #8134.

# Important Notes
- `parse_all_enso_files.sh` has been used to ensure this doesn't affect tree structures.
- `parse_all_enso_files.sh` now checks emitted locations for consistency, and has been used to verify that all line:col references match the values found by an independent scan of the source up to the given UTF8 position.
2023-11-08 16:53:39 +00:00
Hubert Plociniczak
1388fe1cf9
More fine grained initialization for resources (#8242)
A long running initialization of the component blocks the execution significantly. Removed the `BlockingInitialization` and replaced it with a more fine grained locking.

# Important Notes
Added a simple workaround for potential slow initialization of backend - more retries. We should have a better UX in that case anyway, but due to absence of work on that in old GUI, this will have to do.
The main should be problem should be addressed already by other backend changes. Changes in `app` should only be treated as _just in case something bad happens_.
2023-11-08 08:57:31 +00:00
Michał Wawrzyniec Urbańczyk
2c04b1424e
Alias Analysis for the New GUI (#8189) 2023-11-08 02:44:22 +01:00
Adam Obuchowicz
3b12b6e17b
Refactor Input class to be composable (#8244)
Part of #7926

I found myself wanting to use graph store in the `Input` class. As I learned about composables recently, I decided to refactor the class into a composable, to be more vue-like. Putting it in a separate PR because [other task may wanting to do the same](8066)

Also contains some preparations for my actual implementation.
2023-11-07 17:07:44 +00:00
Adam Obuchowicz
579d83a450
Magnet algorithm when dragging nodes. (#8224)
Fixes #8070

When dragging a node, it is snapped to any axis being an extension to another node's boundary. This helps user keeping their nodes neatly aligned.

https://github.com/enso-org/enso/assets/3919101/36dd4d5f-55d3-4f3c-ba49-e8425fae8270

# Important Notes
* Now the position is saved to Yjs doc only when drag is finished.
* Node structure in graph store has two position fields: one representing what is currently stored in the node's metadata, and where the node is displayed. `nodeRects` use the visible rectangles.
2023-11-07 15:51:30 +00:00
Michael Mauderer
faf8cb715a
Added editable node functionality integrated with the Component Browser. (#8183)
Fixes #7786

[Peek 2023-10-30 14-21.webm](https://github.com/enso-org/enso/assets/1428930/9acca794-4b08-4c8a-a9f3-4bdbfdbf66e5)
2023-11-06 15:02:44 +00:00
somebody1234
168e222fcc
Read custom visualizations (#8180)
- Closes #8077

# Important Notes
Tests are still WIP
2023-11-03 20:09:45 +00:00
somebody1234
a7dba72b84
Rename tsx files without JSX to ts files (#8085)
This makes it clearer which files contain React components, and which do not.

# Important Notes
The main things that should be tested to confirm that this did not break anything is the two files containing Tailwind classes:
- Shortcuts ("delete" in context menu should still be red. `text-delete` is used elsewhere though, so this should not be broken either way)
- Indentation of directory contents (multiple levels)
Many of the others should more or less be self-testing:
- `index.tsx` -> `index.ts` would break the entire app if not handled properly
- `hooks.tsx` contains `useNavigate` which would break routing if absent, and `useToastAndLog` which would break most  toast notifications.
- `http.tsx` contains the HTTP client which would break all backend requests
- `useRefresh.tsx` would... break login and logout if it was broken I guess
2023-11-03 00:39:08 +00:00
somebody1234
8e20fc66dc
Sentry React integration (#8086)
- Closes https://github.com/enso-org/cloud-v2/issues/720
- Integrate Sentry with React and React Router.

# Important Notes
This is currently BROKEN as it requires the Sentry DSN, otherwise no requests are part of a transaction. Not sure how feasible this is unfortunately, especially as (I'm assuming) it will be different for each backend...
... I guess worst case it can be configured via an environment variable like some other build-time defines.

Also the sampling rates should be checked.
2023-11-03 00:38:30 +00:00
somebody1234
00341cd89b
Add loading screen when page is opened (#8167)
Adds a loading screen when the page is opened, for users with high latency

# Important Notes
None
2023-11-02 23:53:32 +00:00
somebody1234
5fb887a563
Fix cloud project toast message not appearing (#8165)
- Closes https://github.com/enso-org/cloud-v2/issues/744

# Important Notes
None
2023-11-02 23:51:24 +00:00
Ilya Bogdanov
fb3d65df2d
Upload files by drag and drop (#8214)
The first part of #8158. No progress indication for the user implemented.


https://github.com/enso-org/enso/assets/6566674/2d8157d4-748f-4442-a9c3-a96ba0029056

# Important Notes
A few notable changes:
- A fix for `DataServer/writeBytes`
- Using `@noble/hashes` instead of `sha3` because the latter only works with node. I also tried using `js-sha3`, but it does not work well with Vite (see https://github.com/emn178/js-sha3/issues/36)
- Fixed initialization of the ID map for new nodes. Also, all new nodes are prepended by four spaces to have proper indentation inside the `main` function.
- Fixed random pattern name generation because the previous approach sometimes produces identifiers starting with a number.
2023-11-02 15:32:14 +00:00
Michał Wawrzyniec Urbańczyk
a9118ee0c3
Use the new notarization tool from Apple (#8192) 2023-11-01 20:58:28 +01:00
somebody1234
8bc17bd370
Fix flaky partitionPoint test (#8198)
The tests for `partitionPoint` were previously failing when `NaN` or duplicates were present in the array.

# Important Notes
None
2023-11-01 13:07:18 +00:00