Commit Graph

3165 Commits

Author SHA1 Message Date
Dmitry Bushev
1ddd36308e
Filter suggestion constructors when searching by self type (#6813)
close #6627

Changelog:
- update: search method excludes constructors when searched by the self type

# Important Notes
Component Browser doesn't show the `Between` constructor when called on the `Range` node.

![2023-05-23-172446_1203x865_scrot](https://github.com/enso-org/enso/assets/357683/a2553c46-6a0e-4842-ba91-7c2b76c56c6d)
2023-05-23 16:14:41 +00:00
Stijn ("stain") Seghers
8e62ed60e9
Add dashboard button (#6474)
Closes #6399: Adding a button to the top bar in the project view to return to the dashboard.

Note that this just fires a DOM event (see #6399). To test it, you can add an event listener: `document.addEventListener('show-dashboard', console.log)`

https://user-images.githubusercontent.com/607786/235687669-ab04339f-0f07-439a-9cd3-59d96815edaa.mp4
2023-05-23 14:23:23 +00:00
somebody1234
cbc3568cf3
Use state sent with GET /directories instead of querying state separately (#6794)
* Use inline project state

* Fixes

* Fix type error
2023-05-23 13:01:28 +02:00
somebody1234
efd33c0928
Run TypeScript typechecking and eslint on Lint CI (#6603)
* Run typecheck and eslint on Lint CI

* Address reviews; fix type errors in `.d.ts` files

* Remove unused parameter

* Run prettier

* Fix lint error

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-05-23 12:22:53 +02:00
somebody1234
e35bc17794
Disable cloud backend for unverified users; use local backend as default backend; minor bugfixes (#6779)
* Disable cloud backend for unverified users

* Use local backend as default backend

* Try to fix Project Manager reconnection logic

* Set default backend to remote backend when local backend is not available

* Attempt to suppress WebSocket error console message

* Minor fix for loading spinner

* Hide "Open as folder" context menu option, when on local backend

* Remove duplicate `onSubmit` handler

* Fix live-reload

* Remove debug `console.log`

* Minor refactor; properly unset modals on click

* "created" project state for local backend, for parity with remote backend

* Hide directory path when on local backend

* Undo minor refactor

* set newDashboard & authentication flags to true

* Revert "set newDashboard & authentication flags to true"

This reverts commit 5974170866.

---------

Co-authored-by: Paweł Buchowski <pawel.buchowski@enso.org>
2023-05-23 11:05:10 +02:00
Adam Obuchowicz
a27f19fd02
Reloading file in LS after desynchronization. (#6752)
Fixes #5203

This PR changes behavior when `text/applyChange` returned error.

Before we always assumed that the change was _not_ applied, and tried to send full synchronization still assuming old file content. But this was not the case on some errors (timeouts for example). Now we instead reopen the file (getting its actual content) and then make a full invalidation.

Also added a shortcut allowing manual file reloading, what may be useful in some kinds of error (and also allowed me testing of reopening file in the application).

# Important Notes
The unit tests of sending text updates were improved: now we actually check if all expected messages are emitted from the IDE.
2023-05-23 08:19:27 +00:00
Jaroslav Tulach
a49743f00c
Missing conversion of hash key in EqualsNode (#6803) 2023-05-23 10:10:22 +02:00
Dmitry Bushev
7471e38ff6
feat: set constructor args tag values (#6801)
related #6611

Changelog:
- update: set tag values for arguments with ascribed types

# Important Notes
![2023-05-23-002112_697x311_scrot](https://github.com/enso-org/enso/assets/357683/10d1c03b-45b7-4133-b4aa-80d1f1ea8e84)
2023-05-23 08:07:40 +00:00
JP Moresmau
f8cb908095
Link to new 101 tutorial and not deprecated one. (#6793) 2023-05-23 02:14:37 +02:00
Dmitry Bushev
b353b35f54
Add logs section to the bug template (#6798)
related #6775

Remind users to attach the logs when filing a bug report. Logs will help with the investigation.
2023-05-22 15:35:06 +00:00
Stijn ("stain") Seghers
9a4b7d1976
Fix #6521: Main module function calls shouldn't use project namespace (#6719)
Fixes #6521: Picking a function from the CB that's defined in the main module now resolves to `Main.<func-name>` instead of `<project-name>.<func-name>`.

Note that, when collapsing nodes to a function, this referral style was already used, so this is just a change in the behaviour of the CB.
2023-05-22 14:50:25 +00:00
Dmitry Bushev
0318880990
Add project creation time to project metadata (#6780)
close #6686

Changelog:
- add: `created` field to the project metadata response
- update: project manager tests
2023-05-22 13:40:10 +00:00
Pavel Marek
2b1e5cd017
Add a compiler pass to analyze non-existing imported symbols (#6726)
Add diagnosis for unresolved symbols in `from ... import sym1, sym2, ...` statements.

- Adds a new compiler pass, `ImportSymbolAnalysis`, that checks these statements and iterates through the symbols and checks if all the symbols can be resolved.
  - Works with `BindingsMap` metadata.
- Add `ImportExportTest` that creates various modules with various imports/exports and checks their generated `BindingMap`.

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Jaroslav Tulach <jaroslav.tulach@enso.org>
2023-05-22 10:41:15 +02:00
James Dunkerley
62fecfa474
Widgets, Vector as Column, Viz Fixes and Rename Columns (#6768)
- Fix couple of bugs in Table viz: rounding of bottom div, missing character, not including row count as an option.
- Add better JSON format for `Row`, add support for visualization in the Table viz both for `Vector Row` or `Row`.
- Fix some type signature errors.
- Move `Column_Format` to `Standard.Table.Internal`.
- Move `format_widget` to `File_Format.default_widget` and sort the signature of `Widget` methods.
- Added utility to make `Single_Choice` widgets.
- Added dropdown for delimiter on split methods.
- Removed `default_widget` from `Problem_Behavior` and `Filter_Condition`.
- Altered signature and widgets for table functions.
- Added `to_column` extension to allow easy conversion of Range and Vector to Column.
- Added `compute`, `compute_bulk`, `running` to Column to allow statistic computation.
- Added drop down for `Table.write` format parameter.
- Added drop down for `Table.rename_columns`.
- Added support for Vector of pairs for renaming columns.
- Added check when making a map from Vector if not 2 items.

![image](https://github.com/enso-org/enso/assets/4699705/beed257c-efe3-44a3-9e3a-041354701735)
2023-05-19 23:24:47 +00:00
Radosław Waśko
a9a464af37
Implement simple variants of parse for the Database backend (#6731)
Implements the simplest `parse` scenarios for the Database backend.

Before #6711 these could have been done by `cast`, but in #6711 the APIs were unified to only allow casting to the same set of types in both in-memory and Database. Converting Text to other types is supposed to be done by `parse` and not `cast`, so the ability to use `cast` for rudimentary parsing is removed in the Database backend to make it consistent with in-memory. But now it is lacking any, even simplest, Text->Int/Text->Date support. To alleviate that, the simple scenarios for `parse` are implemented (no support for format customization yet, will boil down to a cast under the hood).
2023-05-19 22:11:23 +00:00
somebody1234
658395e011
Enable require-jsdoc lint and add two lints related to React (#6403)
- Enables the `require-jsdoc` lint
- Fixes all lint errors caused by enabling this lint.

# Important Notes
- There is no option to require JSDoc for other constructs, like top-level constants.
2023-05-19 19:55:29 +00:00
GregoryTravis
4f71673718
Decimal/Integer .round and .int #6654 (#6743) 2023-05-19 19:23:17 +00:00
Dmitry Bushev
9ec7415ded
Set suggestion reexports when serializing the library (#6778)
close #6613

Changelog
- feat: during the library serialization, build the exports map and set the reexport field of the suggestion

# Important Notes
IDE does not create additional imports for re-exported symbols.

![2023-05-18-192739_2019x828_scrot](https://github.com/enso-org/enso/assets/357683/5ef20dfe-d6a5-4935-a759-4af10b0817a5)
2023-05-19 17:35:27 +00:00
Adam Obuchowicz
029b900335
Fix file uploading node expression. (#6689)
Partially fixes https://github.com/enso-org/enso/issues/5051

Fix the expression of the node representing a file being uploaded after drag'n'dropping, so it relates to the actually existing standard library function.
2023-05-19 15:03:46 +00:00
Jaroslav Tulach
995b3c9f42
Using WarningsLibrary to query for warnings (#6751)
Fixes #6616 by using `WarningsLibrary`.
2023-05-19 13:39:14 +00:00
Radosław Waśko
447786a304
Implement cast for Table and Column (#6711)
Closes #6112
2023-05-19 10:00:20 +00:00
Jaroslav Tulach
08e6d21885
Display Initializing project... message when initializing project (#6661)
The current `"Project Name Uninitialized"` seems a bit scary. Why not display text describing what's really happening?

![Initializing project...](https://github.com/enso-org/enso/assets/26887752/b852ccdc-b1e4-4d3d-aa40-9e23e18ef43c)

Isn't `Initializing project...` better?
2023-05-19 06:56:37 +00:00
Hubert Plociniczak
a32a2eafba
Only send suggestions updates when type changes (#6755)
The change adds an additional field to `ExpressionUpdates` messages sent by `ProgramExecutionSupport` to indicate if the type of value (or its method pointer) has changed and therefore would potentially require a suggestions' update.

Prior to #3729 that check was done during the instrumentation. However we still want to continue to support "pending expression" functionality therefore `SuggestionsHandler` will use the additional information to filter only the required expression updates.

Most of the changes are related to adapting our tests to the new field.

Closes #6706.

# Important Notes
The associated project now loads and navigates smoothly.
Also attaching a screenshot from the project that illustrates that pending functionality continues to work:
[Kazam_screencast_00006.webm](https://github.com/enso-org/enso/assets/292128/35918841-f84f-4e1c-b1b0-40e45d97e111)
2023-05-18 16:44:38 +00:00
Jaroslav Tulach
2bc7d346a8
sbt runEngineDistribution --debug to ease debuggging (#6745) 2023-05-18 15:00:52 +02:00
somebody1234
9e491e7c0b
Display "modified at" column on the cloud dashboard (#6687)
* Fix cloud-v2/#433

* Implement "last modified" for local backend

* Minor improvements to documentation

* Show nothing instead of 1970-01-01 if last modified date does not exist

* Fix type errors
2023-05-18 13:25:04 +02:00
Jaroslav Tulach
8c370008bc
Meta.meta Integer . methods (#6740) 2023-05-18 11:40:44 +02:00
somebody1234
0055973f62
Show spinner while loading directory (#6714) 2023-05-18 09:51:57 +02:00
somebody1234
fbd6db7047
Add cloud dashboard to changelog (#6688) 2023-05-17 23:20:49 +02:00
Paweł Grabarz
dcdba8d1ac
Fix list editor panics during insertion (#6540)
# Important Notes
The mouse handling changes involve an unfortunate huge hack, where we enable mouse events on the mouse shape during box selection. That way we know for sure that no other shape will be able to receive mouse enter event. Then the list editor widget is modified to only actually respond to events when its background is hovered. We will definitely want a more proper way to handle mouse event contention, but it's definitely out of scope for current bugfixing.
2023-05-17 18:53:51 +00:00
Wojciech Daniło
34b7e9efb2
Update bug-report.yml 2023-05-17 17:56:09 +02:00
somebody1234
384d3148d5
Remove project create form (#6710) 2023-05-17 13:02:33 +02:00
Stijn ("stain") Seghers
102ce7ae56
Change full-screen visualisation shortcut to shift-space (#6663)
Fixes #6260: The shortcut to open the full-screen visualisation is now `shift-space` so it doesn't interfere with the `space` shortcut to toggle the mini-visualisation.
2023-05-17 09:07:47 +00:00
Paweł Buchowski
10eeed1944
Revert "Show spinner when opening/creating a project (#6321)" (#6712)
This reverts commit 341f1275e0.
2023-05-16 22:53:59 +02:00
Michael Mauderer
3e739a76c2
Fix FRP events that deactivate visualizations. (#6638)
Addresses the issue described here: https://github.com/enso-org/enso/issues/6561#issuecomment-1536205322 .
This was caused by FRP events that would re-set the visualization path when ending the node editing. This would eventually clear the visualization before setting it again, losing the already received data.


https://github.com/enso-org/enso/assets/1428930/6e324ddf-f365-48b8-bb2a-c68b2fbd24ef

also addresses the issue described here https://github.com/enso-org/enso/issues/6561#issuecomment-1543856257


https://github.com/enso-org/enso/assets/1428930/437f7822-7c35-48ba-a055-59d6f712a813

Note that now the default visualization is already shown on the first hover of the action bar, where before it was empty. This was caused by a faulty initialization.
2023-05-16 15:51:00 +00:00
Pavel Marek
f38033b037
Add verbose logs mention to CONTRIBUTING.md (#6703) 2023-05-16 11:14:19 +00:00
somebody1234
25eeeb7da1
Hide "shared with" column on local backend (#6684)
* Hide "shared with" column on local backend

* Constant column widths
2023-05-16 12:30:33 +02:00
somebody1234
0a3a82c07f
Fix top bar styles (#6695) 2023-05-16 12:18:38 +02:00
somebody1234
7bf9d3614c
Fix opening cloud projects (#6683) 2023-05-15 17:58:20 +02:00
Stijn ("stain") Seghers
341f1275e0
Show spinner when opening/creating a project (#6321)
Closes #5505: A spinner with the Enso logo is now shown for most of the duration when opening and creating a project.

https://user-images.githubusercontent.com/607786/234019207-e34096c7-2cb3-4ae3-abd3-291fcaf43084.mp4

# Important Notes
There's still a tiny bit of lag between the end of the spinner and when the nodes pop up, but that seemed less trivial to me to work around.
2023-05-15 14:08:56 +00:00
somebody1234
23e75f5e97
Fix logic for enabling dashboard (#6696)
* Fix logic for enabling dashboard

* Run prettier
2023-05-15 16:06:56 +02:00
Dmitry Bushev
b7d51ed5c6
Create unique atom getter suggestions (#6694)
related #6611

Prevent creating atom getters with the same name.
2023-05-15 14:03:18 +00:00
Hubert Plociniczak
06624f34a8
Ensure slow shutdown of LS always kicks off hooks (#6665)
This change fixes the rather elusive bug where shutdown hooks could not be fired when shutdown was taking too long and termination was forced.

Under the circumstances described in detail in ticket #6515 there was a small chance that we could have a shutdown race condition. Essentially the messages received when client was disconnected and language server forced the termination could lead to language server not sending the public `ProjectClosed` message which triggers shutdown hook. Now we always do.

Also made sure that multiple `ProjectClosed` messages don't lead to firing multiple shutdown hooks, which was another possibility.

No tests as one would have to be able to introduce different delays in various message handlers to simulate the problem.
Having ability to do such chaos testing would be nice but it is beyond the scope of this ticket.
I was able to reproduce the problem 100% with my specially crafted setup so I'm fairly confident about the change.

Closes #6515.
2023-05-15 12:15:37 +00:00
somebody1234
8569ab98c2
Fix --startup.project to bypass opening dashboard (#6671) 2023-05-15 13:47:51 +02:00
Michał Wawrzyniec Urbańczyk
1c89430597
Build nightlies every day. (#6681) 2023-05-15 04:05:08 +02:00
Michał Wawrzyniec Urbańczyk
7748289873
Force newDashboard default on the CI-built packages. (#6680) 2023-05-15 04:03:09 +02:00
Jaroslav Tulach
41bb52c901
Verify ascribed types of parameters really exist (#6584)
Verify ascribed types `(a : Xyz)` are checked for existence.
2023-05-14 07:23:18 +00:00
Dmitry Bushev
706791779b
SuggestionBuilder needs to send ascribedType of constructor parameters (#6655)
close #6611

Changelog:
- update: run compiler passes on the `ascribedType` field of the constructor arguments
- update: suggestion builder uses the type information attached to `ascribedType`
- feat: resolve qualified names in type signatures
2023-05-13 18:33:03 +00:00
James Dunkerley
00110b8dec
Improvements to the Table visualization. (#6653)
- Moved the row count out of the grid.
- Shown for all cases.
- Added some of the JS wiring to do pages but currently hidden.
- Dropdown allowing the user to control the number of rows rendered.
- `Nothing` rendered as a italic light Nothing not just empty now.
- Function rendered as `[Function]`.
- Rounded corners on top to make it align more with look of panel.
- Dropdown for `Text.split` delimiter feed.
2023-05-12 16:51:31 +00:00
Wojciech Daniło
32fd228c12
Removing flush (#6670) 2023-05-12 18:10:13 +02:00
Radosław Waśko
f5071a17fd
Improving widgets for take/drop (#6641)
Related to #6410

# Important Notes
- Updated some `Meta` methods (needed for error handling):
- `Meta.Type` now has `name` and `qualified_name`.
- `Meta.Constructor` has `declaring_type` allowing to get the type that this constructor is associated with.
2023-05-12 15:33:15 +00:00