Commit graph

760 commits

Author SHA1 Message Date
Jonatan Kłosko
118cf05d0a
Introduce broadcast communication from runtime (#845)
* Introduce broadcast communication from runtime

* Return broadcast target from group leader

* Increase timeout

* Make the channel test async

* Decouple base topic and ref
2022-01-10 18:38:08 +01:00
Daniel Kukula
618593158d
Set page name when notebook is renamed (#844)
* override tab name when notebook is renamed

* set page_title in after operation function

* add custom page title to all live pages

* Revert "override tab name when notebook is renamed"

This reverts commit 90303e08a8.

* add test for update
2022-01-06 18:37:55 +01:00
jonatanklosko
664e5412d5 Update assets 2022-01-06 15:33:27 +00:00
Jonatan Kłosko
19baf013d5
Introduce a dedicated channel for JS widget communication (#843)
* Introduce a dedicated channel for JS widget communication

* Handle payload serialization errors

* Tie channel lifetime to the session

* Catch serialization errors instead of encoding twice

* Merge JS static and dynamic outputs

* Authenticate socket connection from session

* Update JS output format

* Remove unused helper

* Apply review comments
2022-01-06 16:31:26 +01:00
Jonatan Kłosko
6d82e9e53d
Remove output border from dynamic JS widgets (#842)
* Remove output border from dynamic JS widgets

* Show borders on regular text outputs only

* Increase assertion timeout
2022-01-04 13:28:31 +01:00
jonatanklosko
f5309d2b9a Update assets 2021-12-29 21:08:00 +00:00
Jonatan Kłosko
53869371c2
Update dependencies (#838)
* Update Elixir deps

* Update JS dependencies

* Bump Tailwind to v3

* Update Hex badge color

* Set SameSite for the session cookie
2021-12-29 22:06:19 +01:00
jonatanklosko
ebadc8d4bc Update assets 2021-12-29 14:16:19 +00:00
Jonatan Kłosko
742e3ad70e Update Tailwind palette 2021-12-29 15:14:37 +01:00
jonatanklosko
afa5c2edb4 Update assets 2021-12-29 13:06:31 +00:00
Jonatan Kłosko
d5d4e739d1
Improve errors on reconnecting Mix runtime (#837) 2021-12-29 14:04:51 +01:00
jonatanklosko
54ceaac551 Update assets 2021-12-28 21:41:57 +00:00
Jonatan Kłosko
66390dc677
Support Escape out of multi-cursor mode (#833) 2021-12-28 22:40:24 +01:00
jonatanklosko
4c9b1f374e Update assets 2021-12-28 18:44:10 +00:00
Jonatan Kłosko
145f8a6992
Focus fixes (#831) 2021-12-28 19:42:04 +01:00
jonatanklosko
50aeb6289f Update assets 2021-12-27 20:03:28 +00:00
Jonatan Kłosko
5670e5ccb6
Group Kino notebooks under their own section (#830) 2021-12-27 21:01:31 +01:00
Lee Jarvis
4bacba6b1d
Remove delete prompt for empty sections (#829)
* Remove delete prompt for empty sections

If a section has no cell views or only empty cell views, avoid
prompting the user to delete the section and just go ahead and delete
it.

Closes #800

* Move delete prompt logic to SessionLive

This avoids creating two separate paths in the view for displaying
delete buttons (triggering either a prompt, or deleting the empty
section).

Instead, the `delete_section` callback is always triggered, and the
"display prompt" logic is kept here.

Couple of things I'm unsure about so will discuss on the PR.

See https://github.com/livebook-dev/livebook/pull/829#discussion_r775560671

* Check only against empty cell list in `delete_section`

* Fix indentation

* Handle section not existing on deletion

* Match empty cell list in case expression

Also explicitly set the section and then re-use it. I think this is a
bit nicer than just matching against the empty list since it matches
the following match too
2021-12-27 18:42:27 +01:00
jonatanklosko
91dcb97456 Update assets 2021-12-27 15:19:08 +00:00
Jonatan Kłosko
23330786fa
Bump Monaco editor (#828) 2021-12-27 16:17:05 +01:00
Jonatan Kłosko
8622ae2ec3
Add support for exporting JS output (#826) 2021-12-27 13:56:55 +01:00
Benjamin Philip
fc3fad6543
Disable Choose button if draft file is a directory (#823)
* Disable Choose button if draft file is a directory

* Fix warnings

* Decide if choose is disabled on handle info

* Revert "Decide if choose is disabled on handle info"

This reverts commit 43a2cbc5ea.

* Use the disabled attribute
2021-12-24 23:53:48 +01:00
Benjamin Philip
39fedd43ca
Disable Ecto stats in Phoenix Live Dashboard (#824)
Livebook does not use Ecto, so disable Ecto stats.
2021-12-24 19:05:19 +01:00
jonatanklosko
b687f23132 Update assets 2021-12-24 13:20:17 +00:00
Jonatan Kłosko
844242ba80
Add support for JS output widgets (#818)
* Add support for JS output widgets

* Don't block session when fetching assets and batch calls

* Improve path component sanitisation

* Move fetching check to session caller

* Attach origin to connect and event messages
2021-12-24 14:18:34 +01:00
Michał Gibowski
10b78973cc
Fix spelling in runtime.ex docs (#822) 2021-12-23 13:20:55 +01:00
Benjamin Philip
1f6a75c4e3
Do not show choose file button if file select component is active (#821) 2021-12-23 12:29:49 +01:00
Michał Gibowski
4c5fd9a413
Add missing npm install step to Dev instructions (#815)
* Add missing `npm install` step to Dev instructions

* Update README.md

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-12-22 18:52:17 +01:00
Jonatan Kłosko
87a17f1fc5 Respect \r in individual stdout results 2021-12-22 15:48:35 +01:00
José Valim
4badf40afc Add TODOs 2021-12-17 23:24:17 +01:00
José Valim
d8833be010 Make app.html consistent with live.html 2021-12-16 20:21:49 +01:00
Eksperimental
ba365d7247
Improve command to show current commit (#809)
It `git show` will show the changes, not just the commit. 
It may not be clear to users that they only need to include the commit id.
2021-12-16 19:08:35 +01:00
José Valim
8f25c25c7a
Trigger the GC after evaluation and intellisense (#807)
This reduces memory consumption by the runtime,
especially when using intellisense features which
may generate a lot of garbage.

There is an odd chance this can generate slow downs
in certain cases but, for that to happen, I would
expect the notebook to either have a lot of data
allocated or many users interacting with it and
triggering completion and other features at the same
time.

We don't worry about the second case because the
goal is to move completion to an ephemeral separate
process anyway, which would remove the need for GC
during completion altogether (and allow several
completions to run concurrently). If this happens,
we can consider moving GC out of the evaluator and
have the session explicitly trigger it once it
terminates a chain of evaluation.

It is also worth triggering the GC whenever
we forget an evaluation context.
2021-12-15 12:25:09 +01:00
Kian Meng, Ang
a58d0ed0c2
Fix license section markdown (#801) 2021-12-13 07:33:34 +01:00
Jonatan Kłosko
877ab913c8
Display full module name in hover docs (#798)
* Display full module name in hover docs

* Use inspect

* Return atom names from identifier matcher
2021-12-12 21:34:16 +01:00
Max Veytsman
4aa5447e9d
Add completion for struct keys (#793)
* Add completion for struct keys

Largely ported from `IEx.Autocomplete`.

* Add test for __exception__ field in struct

* Fix exception test

* Fix exceptions assetion

* Create `:in_struct_field` identifier

Along with a refactor

* Fix typespecs for `:map_field`

* Address feedback

* Update lib/livebook/intellisense/identifier_matcher.ex

Co-authored-by: José Valim <jose.valim@gmail.com>

* Use markdown snippet for both docs

* Fix tests

Co-authored-by: José Valim <jose.valim@gmail.com>
2021-12-12 21:19:17 +01:00
jonatanklosko
9598fa6b34 Update assets 2021-12-12 19:27:47 +00:00
Jean Carlos
aa8f431608
Added margin on copy button (#796)
* fix handleDocumentFocus error

* format correction

* Update assets/js/session/index.js

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>

* format correction

* Update assets/js/session/index.js

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>

* Move basic view to the top

* Added margin on copy button

* Update lib/livebook_web/live/output/text_component.ex

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>

* Update lib/livebook_web/live/output/text_component.ex

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-12-12 20:26:10 +01:00
Alex Kwiatkowski
2688a685b9
Support telemetry poller 1.0 (#799) 2021-12-12 09:40:38 +01:00
jonatanklosko
9d85d33926 Update assets 2021-12-11 23:11:47 +00:00
Jonatan Kłosko
b0563d14a6
Fix completion shortcuts (#792)
* Fix completion shortcuts

* Remove shortcut override
2021-12-12 00:10:15 +01:00
Jonatan Kłosko
6f53e3db6a
Add support for form control (#790)
* Add support for form control

* Handle report_changes map

* Assert on input/control events
2021-12-12 00:09:35 +01:00
Thomas Schmidleithner
460668402f
Fix docs after refactoring live_modal to modal (#794) 2021-12-12 00:08:54 +01:00
Jean Carlos
1d6348d7f1
Move basic view in the shortcut pane to the top (#791)
* fix handleDocumentFocus error

* format correction

* Update assets/js/session/index.js

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>

* format correction

* Update assets/js/session/index.js

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>

* Move basic view to the top

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-12-11 01:57:54 +01:00
José Valim
67e73b6f89 Remove autocompletion to deprecated operator 2021-12-10 23:39:30 +01:00
José Valim
bb27fc9fa8 Remove compile time deps from erl_dist 2021-12-10 23:38:57 +01:00
José Valim
8cb511fb87 Move required cell to autocomplation section for clarity 2021-12-10 16:04:48 +01:00
José Valim
69da78c13a Disable consolidation in distributed notebook, closes #786 2021-12-10 11:30:42 +01:00
Jonatan Kłosko
e0c68f30f3
Release 0.4.1 (#783) 2021-12-09 22:36:22 +01:00
Jonatan Kłosko
b422e1d98f
Revert to URI.new! (#784) 2021-12-09 20:46:45 +01:00