Commit graph

81 commits

Author SHA1 Message Date
Jonatan Kłosko 6274731c8d Make sure session is forked with complete data 2021-06-10 20:03:47 +02:00
Jonatan Kłosko e02bcce0bf
Drop cell source text from data in LV when no longer needed (#342) 2021-06-10 15:41:40 +02:00
Jonatan Kłosko b0bd7540c0
Compute cell source digest on the client (#341) 2021-06-10 14:54:55 +02:00
José Valim d0c47557a2
Warning on Mix.install for Mix standalone (#336) 2021-06-09 16:51:53 +02:00
Jonatan Kłosko 11246cdb8f
Add an option to preload session images from memory (#329)
* Add an option to preload session images from memory

* Remove images
2021-06-08 13:28:53 +02:00
Jonatan Kłosko 8dea99e600
Support inputs (#328)
* Render basic input

* Make each cell type a separate struct

* Add operation to set input value

* Prototype communication

* Make input name editable

* Refactoring

* Unify cell attribute setters

* IO tests

* Document input communication protocol in Runtime

* Add more tests

* Add persistence

* Fix status update on cell attributes change

* Rework persistence

* Integrate input cell with insert mode

* Add missing users keybinding

* Mimic autofocus for dynamically inserted elements

* Support input type selection

* Support URL input and set up validation

* Convert input error into a more meaningful io error

* Add missing client checks

* Consume every input only once per evaluation

* Fixes
2021-06-08 12:33:50 +02:00
Jonatan Kłosko da64f51589
Show an informative message on completion when there is no runtime (#316) 2021-06-03 19:43:22 +02:00
Jonatan Kłosko 91a9f62fb9 Make images in explore cards clickable 2021-06-03 14:55:25 +02:00
Jonatan Kłosko c07da9880c
Update LV version and remove deprecations (#312)
* Bump LiveView

* Remove deprecated socket argument to live_component

* Point to an exact LV version
2021-06-03 13:53:03 +02:00
Jonatan Kłosko f70581f255
Introduce an Explore section (#310)
* Add explore page

* Move sidebar to a configurable component

* Fix homepage test

* Add images

* Store example notebooks in files and make explore notebooks linkable

* Fix tests

* Raise on invalid notebook slug

* Keep just the file contents in notebook info

* Move notebook lookup to Explore

* Exclude notebooks in progress
2021-06-02 21:51:43 +02:00
Jonatan Kłosko 80bed1aa06
Delegate output formatting rules to Kino (#309)
* Delegate output formatting rules to Kino

* Update naming

* Group output components and views

* Fallback to inspect when Kino.Render.to_output/1 fails

* Update naming

* Add reference to Kino
2021-06-01 17:47:03 +02:00
Jonatan Kłosko ce7adef7e4
Add VegaLite widget integration (#306)
* Add support for LiveWidget.VegaLite

* LiveWidget -> Kino

* Show an error when rendering unsupported Kino widget

* Match on Kino.Widget

* Add catch-all for unknown outputs
2021-05-31 22:48:05 +02:00
Jonatan Kłosko 617a51e723
Fix completion shortcut listing for mac (#291) 2021-05-24 15:45:28 +02:00
Brian Underwood 8dfe12da68
Change anchor tags for sections to be based on the titles, not randomly generated (#288)
* Change anchor tags for sections to be based on the titles, not randomly generated

* Update lib/livebook_web/helpers.ex

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-05-23 18:22:55 +02:00
Jonatan Kłosko 7804ff1d82
Set up Vega-Lite plots rendering (#287)
* Set up Vega-Lite plots rendering

* Automatically recognise VegaLite specification

* Improve matching VegaLite result

* Update naming

* StringFormatter -> DefaultFormatter
2021-05-21 17:51:31 +02:00
Jonatan Kłosko 1a1057153e
Optimise data view recomputation for delta operations (#286)
* Optimise data view recomputation for delta operations

* Use generic access_by_id/1 for nested updates

* Use access_by_id/1 for nested notebook updates

* Use Enum.split_while
2021-05-21 14:56:25 +02:00
José Valim 7416975376
Infer short vs longname from actual node and use longname in example (#284) 2021-05-21 13:03:47 +02:00
José Valim 00edceafc9
Update import URL text (#282) 2021-05-21 08:11:53 +02:00
Jonatan Kłosko ea93edcc86
Add embedded runtime for evaluating code in the Livebook VM (#266)
* Add embedded runtime for evaluating code in the Livebook VM

* Update lib/livebook_web/live/session_live/embedded_live.ex

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

* Use standard error proxy globally in the Livebook node

* Add configuration env variable for setting the default runtime

* Increase evaluation response assertion timeouts

Co-authored-by: José Valim <jose.valim@dashbit.co>
2021-05-10 14:37:38 +02:00
Jonatan Kłosko cd80bd7804
Implement user cursor and selection tracking (#260)
* Implement user cursor and selection tracking

* Separate jump-to-user and follow
2021-05-07 16:41:37 +02:00
Jonatan Kłosko 5c8e117800
Setup user profiles (#253)
* Add initial user config modal

* Assign user ids

* Update session data to hold user ids

* Get users list for specific ids

* Render user avatar

* User update

* Refactor user changes

* Subscribe to individual user updates

* Show users in side panel

* Add sidebar to homepage

* Don't generate the same color twice in a row

* Add documentation notes

* Fix tests

* Add tests

* Keep users in session data

* Rename color to hex_color
2021-05-03 20:03:19 +02:00
Jonatan Kłosko 3694576244
Require cookie for connecting to an attached node (#245)
* Require cookie for connecting to an attached node

* Fix modals sizing
2021-04-28 14:28:28 +02:00
Jonatan Kłosko cc2820f17e
Add anchor links to sections (#243) 2021-04-26 15:24:43 +02:00
Javier Goday 790b9e764b
Feature cell link (#239)
* #99: Add anchor links to sections and cells

* Restores some css classes removed by error

* Focus cell based on anchor link

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-04-26 14:22:33 +02:00
Wojtek Mach c3a0b7c01d
Add autofocus to import inputs (#240) 2021-04-24 11:15:37 +02:00
Jonatan Kłosko aaba58a933
Set up importing notebook from URL or clipboard (#237)
* Set up importing notebook from URL or clipboard

* Extract loading functions into separate module

* Replace import icon with text

* Add TLS peer verification

* Remove unnecessary tests setup step
2021-04-23 17:40:13 +02:00
Jonatan Kłosko e755ff8122
Restructure settings (#233)
* Force menu items into a single line

* Add shortcut for saving the notebook

* Make the disk icon always show file dialog

* Split runtime and file settings into separate modals

* Add ctrl+s to the shortcuts list

* Add togglable menu to the session page

* Make sure newly saved file appears in the file selector

* Fix path seletor force reloading

* Remove notebook generated in tests

* Add test for file list refresh after save
2021-04-21 23:02:09 +02:00
Jonatan Kłosko 91af8a46ed Make the sidebar floating on small screens 2021-04-21 17:42:03 +02:00
José Valim 02f46fd912 Improve responsive features 2021-04-21 13:50:55 +02:00
Jonatan Kłosko dd7453c706 Improve homepage responsiveness 2021-04-21 12:43:43 +02:00
José Valim 982759844f Do not tab over file container (it does so on Firefox) 2021-04-21 12:34:49 +02:00
José Valim 48b611faeb Run formatter 2021-04-21 12:17:35 +02:00
Benjamin Philip d41f3a73fe Beautify match file selector results
- Makes the file selector results to have a "box"/"container" of its own

- Seperates the filtred files from rest of the files with a border

- Optimize path selector to only traverse the filesystem if the directory
  changes
2021-04-21 12:16:28 +02:00
Jonatan Kłosko 700987dc02
Add editor completion to Elixir cells (#208)
* Implement editor completion for Elixir cells

* Add completion tests

* Refactor completion

* Only extract Markdown docs for now

* Fix Elixir version-dependent test

* Fix docs matching

* Use upcoming Code.cursor_context/2

* Start temporary completion processes under a supervisor

* Show Erlang docs in completion items

* Update to latest Code.cursor_context

* Refactor completion

* Fix module completion when alias expands to Erlang module

* Remove tests-generated notebook

* Show variables and map fields differently

* Adjust signatures formatting
2021-04-20 19:34:17 +02:00
Jonatan Kłosko 04edc75181
Scroll to section when moved (#226) 2021-04-20 19:31:23 +02:00
Benjamin Philip 682ee396d0
Allow re-ordering of sections (#221)
* Allow server-side re-ordering of sections

* `Livebook.Notenook.move_section` definition
* Management and implementation of requests
* tests

This commit allows a person to send a request to the server to move a
section. However, the functionality in not yet available in the UI.

* Allow "Move up" and "Move down" functionality for sections

* Rendering of up and down "arrows" at Section's side
* Request from UI on click

This commit enables a user to move a section upwards or downwards, much
like a cell. However, after the section moves, the focus is not changed
to it.

* Apply formatting

* Define a function to update cell status

* Defines a common function for `move_cell` and `move_section` to use to
update cell status.
2021-04-20 12:12:29 +02:00
Juha 08c4025bd7
Remove assumption about root path (#209) 2021-04-17 20:32:19 +02:00
José Valim d00393ca86 Keep uppercase letters together 2021-04-16 22:18:59 +02:00
Frank Hunleth 3a19021983
Support config of the root path for storing notebooks (#191)
This adds a `:root_path` key to the application environment so that
file dialogs can default to known location where notebooks are stored.
2021-04-15 14:51:27 +02:00
Jonatan Kłosko 69343bfc3c
Link to live dashboard for each running session to show process info (#186)
* Link to live dashboard for each running session to show process info

* Update lib/livebook_web/live/home_live/sessions_component.ex

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

Co-authored-by: José Valim <jose.valim@dashbit.co>
2021-04-14 22:37:17 +02:00
James Baldwin 9c6d747aca
Remove extra word in comment (#185) 2021-04-14 21:02:47 +02:00
Jonatan Kłosko 9e026ee4b9
Make sure write-protected files can only be forked (#182)
* Format file errors into readable messages

* Make sure write-protected files can only be forked

* Show tooltip when the file is write protected
2021-04-14 16:27:35 +02:00
TED 623c5b3290
Add notbook runtime settings shortcut (#176) 2021-04-14 12:20:51 +02:00
Jonatan Kłosko 2887527dc9
Fix sections sidebar overflow (#171) 2021-04-14 11:35:54 +02:00
Jonatan Kłosko d8213c3f68
Change wording from delete session to close session (#160) 2021-04-12 23:24:26 +02:00
Jonatan Kłosko 5f5ef1d0b6
Improve path selector (#159)
* Synchronously save file when the location is chosen and fix default path

* Handle enter press in the path selector
2021-04-12 22:59:48 +02:00
Jonatan Kłosko 70be004ee0
Make autoscroll behaviour more intuitive (#143)
* Fix editor shift

* Make autoscrolling more intuitive
2021-04-05 15:06:14 +02:00
Jonatan Kłosko 7d1d1f4d98
Respect CR in cell output (#137)
* Respect CR in cell output

* Update test/livebook_web/helpers_test.exs

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

* Improve rewind implementation

Co-authored-by: José Valim <jose.valim@dashbit.co>
2021-04-04 21:22:28 +02:00
Jonatan Kłosko d93b5d8450
Set up image uploads for Markdown content (#132)
* Add cell image upload modal

* Add controller for serving the images and handle this on markdown side

* Use per-session images dir

* Add etag header to session image responses

* Adjust markdown image styling

* Properly manage session images dir

* Add tests

* Set maximum file size for image uploads

* Move images dir specifics to the Session module

* Move images when nonpersistent session becomes persistent

* Update lib/livebook_web/live/session_live.ex

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

* Update lib/livebook_web/live/session_live.ex

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

* Update lib/livebook_web/live/session_live/cell_upload_component.ex

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

* Test that close gets rid of session temporary dir

Co-authored-by: José Valim <jose.valim@dashbit.co>
2021-04-04 18:55:51 +02:00
José Valim 5fb753c4d1
Logo and README (#133) 2021-04-04 12:42:46 +02:00