Commit graph

163 commits

Author SHA1 Message Date
Jonatan Kłosko 47d29cb389
Require Elixir 1.13 (#737)
* Bump required Elixir version to 1.13 and fix TODOs

* Fix tests

* Remove the deprecated URI.parse/1

* Bump Docker base image

* Bump Elixir on CI
2021-12-03 21:47:20 +01:00
Jonatan Kłosko ac6b423e79
Fix frame rendering (#735)
* Fix frame rendering

* Add test for the dynamic frame
2021-12-03 18:59:08 +01:00
Jonatan Kłosko 264d6c3ff2
Add support for controls output type (#710)
* Add support for controls output type

* Split controls into individual widgets

* Adjust ids

* Improve widget and controls garbage collection

* Allow arbitrary functions as object release hook

* Add type to button and input events

* Add keyboard status event

* Change release hooks into monitor messages

* Rename pointer to reference and return an error on bad monitor
2021-12-02 16:45:00 +01:00
Jonatan Kłosko c2636b8220
Migrate inputs to Kino (#714)
* Migrate inputs to Kino

* Update lib/livebook/session/data.ex

Co-authored-by: José Valim <jose.valim@dashbit.co>

* Try parsing numbers as integers

* Garbage collect input values

* Adjust tests

* Remove unused variable

* Fix frame rendering

* Wrap inputs in border depending on its type

* Add textarea

* Reorder

* Update tests

Co-authored-by: José Valim <jose.valim@dashbit.co>
2021-11-25 18:43:42 +01:00
Jonatan Kłosko f64dd0ea90
Restructure j/k navigation to support headlines (#707)
* Accessibility fixes

* Restructure j/k navigation to support headlines

* Focus modal content when open

* Further focus adjustments

* Fix tests

* Remove unused functions
2021-11-16 21:57:10 +01:00
Jonatan Kłosko 4d92aeba2e
Support file scheme when importing from URL (#706)
* Add test

* Support file scheme when importing from URL
2021-11-12 15:49:22 +01:00
Jonatan Kłosko e72a606dd2
Warn on invalid sequence of notebook comments (#687) 2021-11-08 13:14:55 +01:00
Jonatan Kłosko 982a345ddc
Improve notebook file locking to work across nodes (#675)
* Improve notebook file locking to work across nodes

* Add node check for local file system opreations

* Replace node with host id

* Refactor process down cleanup

* Scope local file system with node

* local? -> type
2021-11-05 00:29:04 +01:00
Jonatan Kłosko 5e5bc2597a
Document how to render notebooks on GitHub (#677)
* Document how to render notebooks on GitHub

* Keep any comments before the notebook title heading
2021-11-04 18:50:53 +01:00
Cocoa a15ec1ca1d
Save static vegalite plot to livemd (#676)
* save static vegalite plot to livemd

* cleanup debug code

* using `vega-lite` as the type in the fenced code block

* wrap the text output in `{:text, output}` in take_outputs/2

* ignore :vega_lite_static when it is empty

* add import and export tests

* using `spec`

* format code

* keep the test focused

* improve tests for not including outputs

* always dump vage_lite spec

* Apply suggestions from code review

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-11-04 12:17:03 +01:00
Jonatan Kłosko 021d6ac42e
Improve icon buttons accessibility and navigation (#667)
* Rename tooltip source attribute

* Add aria-label to icon buttons/links

* Actually focus cell content when navigating around

* Add some descriptions

* Fix dynamically computed tooltips
2021-11-01 18:20:56 +01:00
Jonatan Kłosko 2694007c0e
Compute cell snapshots when an existing notebook is given (#666) 2021-11-01 13:59:04 +01:00
Jonatan Kłosko dbccadfdcf
Redesign save to file modal (#663)
* Redesign save to file

* Always show Save when a file is present

* Fix indentation
2021-10-30 12:02:26 +02:00
Jonatan Kłosko ac1a4a5ffb Add action for clearing evaluation and outputs (#661)
* Move notebook export menu item

* Add action for clearing evaluation and outputs

* Test data operation

* Update wording

* Update wording

* Reorder menu items
2021-10-29 16:34:44 +02:00
Jonatan Kłosko 4493a60380
Improve runtimes UI (#655)
* Show reconnect for all runtime types when applicable

* Make it clear which runtime is the default

* Show Mix.install restart suggestion only for standalone runtimes

* Fix tests not to rely on the default runtime tab
2021-10-28 19:41:07 +02:00
Jonatan Kłosko 394c6daef1
Improve validity check when input changes during evaluation (#651) 2021-10-27 15:36:50 +02:00
Jonatan Kłosko c1a6bc1aa8
Remove reactive inputs (#649) 2021-10-27 13:35:24 +02:00
gpopides 5c0267b547
Added automatic cell evaluation (#637)
* Added automatic evaluation

* apply review changes

* persist reevaluate_automatically and update test

* test for automatic reevaluation

* formatting

* Add import test

* Always show if a cell automatically reevaluates and link to settings

* Evaluate automatically reevaluating cells after queuing

* Always show evaluate button when cell is fresh

* Update icon

* Add test ensuring that fresh cells don't evaluate automatically

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-10-26 20:38:30 +02:00
Jonatan Kłosko 9da44fd541
Fix root directory listing on S3 when empty (#646) 2021-10-26 15:39:24 +02:00
Matheus Cumpian c6d7c81ee9
New import info flash (#630)
* adding a new info flash on imported notebooks

* changing the imported notebook error flashes to warning level

* Update lib/livebook_web/live/session_helpers.ex

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

* adding unit tests for the flash messages and fixing put_import_flash/1 call location

* changing name of put_import_flash_messages/2 to put_import_warnings

* Update lib/livebook_web/live/home_live.ex

* formating code

Co-authored-by: José Valim <jose.valim@gmail.com>
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-10-21 23:21:54 +02:00
Jonatan Kłosko 3ae67ede33
Add support for importing notebook from URL query parameter (#598)
* Add support for importing notebook from URL query

* Update desc

* Update URL and redirect to import form on error

* Update tests

* Remove URL scope
2021-10-16 12:23:08 +02:00
Jonatan Kłosko 5dea204fc9
Fix intermittent test failures (#596)
* Bump Elixir on the CI

* Start permanent node manager in tests

* Adjust timeouts

* Make sure random node cookies are alphanumeric
2021-10-13 22:25:33 +02:00
gpopides d2cdf0a2cb
Display creation date of a session in home (#593)
* add created_at to Session struct

* test + doc enhcncement

* change format creation date function name

* use helper function to format created_at

* use mix format

* apply review suggested  changes and 2 more tests

* Store creation time in session state and sort by date by default

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-10-10 12:29:45 +02:00
Jonatan Kłosko 25d90eabf1
Add public function for converting .livemd to .exs (#573) 2021-10-05 00:26:41 +02:00
Jonatan Kłosko a57927ec2a
Extend ANSI code parser to handle multiple arguments (#569)
* Extend ANSI code parser to handle multiple arguments

* Update changelog
2021-09-30 17:57:14 +02:00
Jonatan Kłosko fad9301ad4
Fix branching section evaluation when the parent section is empty (#560)
* Fix branching section evaluation when the parent section is empty

* Update changelog
2021-09-23 13:20:49 +02:00
Jonatan Kłosko 4ff1ff0d5a
Use Phoenix.Tracker to keep track of sessions within the cluster (#540)
* Use Phoenix.Tracker to keep track of sessions within the cluster

* Apply review comments

* Cleanup topics and updates

* Update lib/livebook_web/live/session_live.ex
2021-09-04 19:16:01 +02:00
Jonatan Kłosko cfb719cbb0 Fix dialyzer warnings 2021-08-31 22:19:52 +02:00
Jonatan Kłosko 2b1cb57a15
Start new notebooks with a focused code cell (#527)
* Start new notebooks with a focused code cell

* Update changelog
2021-08-30 16:33:40 +02:00
Jonatan Kłosko 071ac63cd4
Improve input type parsing (#517)
* Improve input type parsing

* Move type parsing to Cell.Input

* Add info comment
2021-08-25 12:38:30 +02:00
Jonatan Kłosko acd100f3d3
Improve intellisense to handle structs and sigils (#513)
* Update Code.Fragment backport

* Support structs completion and show module subtype

* Support sigil completion

* Update changelog

* Don't show completion items for hidden modules

* Update Code.Fragment backport
2021-08-23 10:42:18 +02:00
Jonatan Kłosko 87b6f6160e
Fix identifier details on local calls (#509) 2021-08-21 01:24:44 +02:00
Jonatan Kłosko f91c71bf3a
Migrate the Evaluator process from GenServer to a regular process (#502)
* Migrate the Evaluator process from GenServer to a regular process

* Update CHANGELOG

* Attach reference to every evaluator and pass in internal messages

* Use start_supervised/2 in tests

* Apply review comments
2021-08-19 13:56:59 +02:00
Jonatan Kłosko 8e6558a83a
Introduce file system abstraction and an S3 implementation (#492)
* Introduce file system abstraction and an S3 implementation

* Support arbitrary absolute paths and delegate resolution to file system

* Remove accidental notebook file

* Apply suggestions from code review

Co-authored-by: José Valim <jose.valim@dashbit.co>

* Apply review comments

* Add missing path assertions

* Apply review comments

* Fix test saving notebook in project root

Co-authored-by: José Valim <jose.valim@dashbit.co>
2021-08-13 21:17:43 +02:00
Jonatan Kłosko f22bf2a21d
Keep inline Markdown unchanged when importing/exporting (#487)
* Merge: [WIP] Make Markdown formatter math-safe #447

* Keep inline Markdown unchanged when importing/exporting
2021-08-02 18:39:50 +02:00
Jonatan Kłosko 634907b49c
Add notebook option for persisting outputs (#485)
* Add notebook option for persisting outputs

* Increase persistence modal spacing
2021-07-30 16:24:46 +02:00
Jonatan Kłosko 37b6a1aa40
Remove untyped metadata (#484) 2021-07-30 13:04:07 +02:00
Jonatan Kłosko 42463c7cb1
Add option to export Live Markdown with output (#483)
* Add option to export outputs in Live Markdown

* Add outputs option to Live Markdown export tab

* Adjust import to handle outputs

* Apply review comments
2021-07-29 18:41:34 +02:00
Jonatan Kłosko 1caff24882
Separate ANSI parsing from HTML rendering (#482) 2021-07-29 14:51:40 +02:00
Jonatan Kłosko cfbba9e2ce
Add Elixir source export (#476) 2021-07-28 13:40:36 +02:00
Jonatan Kłosko afe06517d7
Convert Elixir columns range to JavaScript (#472) 2021-07-27 16:50:05 +02:00
Jonatan Kłosko ee51411299
Rewrite hover details using Code.Fragment.surround_context (#471) 2021-07-27 12:32:53 +02:00
Jonatan Kłosko 7dd80489a3
Preserve subsequent Markdown cells in .livemd (#469)
* Add import/export tests

* Implement live markdown annotation for breaking Markdown cells
2021-07-26 13:35:37 +02:00
Jonatan Kłosko af50646a8e
Convert JavaScript string column to Elixir (#467)
* Fix column/index wording

* Convert JavaScript string column to Elixir
2021-07-26 11:57:51 +02:00
Jonatan Kłosko f9ec058e43
Fix completion crash on higher unicode characters (#466)
* Fix completion crash on higher unicode characters

* Safely rescue from intellisense errors
2021-07-26 11:34:22 +02:00
Jonatan Kłosko 6575791bed
Add notebook source preview and export (#457)
* Add notebook source preview and export

* Build live markdown source outside the session process
2021-07-23 01:18:40 +02:00
Jonatan Kłosko 9bbbd4568f
Completion adjustments (#456)
* Fix function arity completion

* Add support for operator completion in Elixir 1.13
2021-07-21 21:09:28 +02:00
Jonatan Kłosko ef06e49d18
Show full documentation when hovering over an identifier (#453)
* Show full documentation when hovering over an identifier

* Remove leftover function

* Improve determining subject boundaries
2021-07-20 21:30:53 +02:00
Jonatan Kłosko 6276aafa72
Compute cells validity based on snapshots (#452) 2021-07-18 19:05:02 +02:00
Jonatan Kłosko aa95d81729
Fix completion crash on module attribute call (#451) 2021-07-16 23:39:51 +02:00