Commit graph

168 commits

Author SHA1 Message Date
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
José Valim 69890cf43e
Allow errors on boot to be reported (#311)
Because we unregistered standard_error, if there
was an error booting livebook, we would fail to
print the error. This commit makes sure the original
standard error is added back whenever the proxy
process terminates.
2021-06-02 19:01:45 +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
Brett Cannon 5f041d219a
Clarify/tweak some comments (#308)
* Clarify a comment for live_markdown.ex

* Tweak grammar for docs of notebook_from_markdown()
2021-05-31 22:49:56 +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 d6c9ab1783
Ensure hostname is properly resolved when running in shortname distribution (#303)
* Ensure hostname is properly resolved when running in shortname distribution

* Update lib/livebook/application.ex

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

* Pretty print host resolution error

* Add missing env var

Co-authored-by: José Valim <jose.valim@dashbit.co>
2021-05-28 13:41:08 +02:00
Qiu Hua 605c5e397e
fix a display bug when the message wider than the window (#304) 2021-05-28 13:04:07 +02:00
Benjamin Philip 26226a42e0
Update Welcome Notebook (#299)
TeX uses the words 'inline and display math', replace 'formula' with these.
2021-05-26 19:57:47 +02:00
Jonatan Kłosko a7e1d8ba9a
Capture logger output (#298)
* Capture logger output

* Add capture integration test
2021-05-26 19:54:43 +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 74702a4583 Fix assets path in development 2021-05-20 12:28:00 +02:00
Jonatan Kłosko 406c17dc43 Build assets to tmp/static_dev in development 2021-05-19 23:50:18 +02:00
Jonatan Kłosko 889503ad68
Require Elixir v1.12 (#278)
* Require Elixir v1.12

* Update introductory notebook

* Update base Docker images

* Add completion of reserved module attributes

* Move complete_module_attribute/1
2021-05-19 16:46:33 +02:00
Jonatan Kłosko 38db12fbcc
Direct non-captured output to the terminal (#273) 2021-05-16 17:07:19 +02:00
Jonatan Kłosko 61a841a6d2
Handle output even after cell finishes evaluation (#272) 2021-05-15 19:55:25 +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
José Valim 1c45d0777a
Update welcome.ex (#263) 2021-05-07 17:17:49 +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
José Valim c7887a57de Remove sleep from tests 2021-05-07 08:57:39 +02:00
Benjamin Philip ec07e4749a
Use a node pool for node names (#256) 2021-05-07 08:43:36 +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
José Valim 5fede30764 Format 2021-04-28 14:10:52 +02:00
José Valim 2792280e3d
Show how to run tests in notebooks (#153)
This requires Elixir v1.12-rc.1.
2021-04-28 14:05:25 +02:00
Jonatan Kłosko ac8e1e30f4
Setup Docker image with releases (#244)
* Setup Docker image with releases

* Support ip env variable and use it for Docker deployment

* Autofocus auth forms

* Rename ip env var

* Update option lists

* Make distribution cookie configurable

* Update README.md

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

* Include git in the final image

* Remove unnecessary build dependency

* Improve file permissions handling and add more comments

* Use namespaced home directory

* Update README with all running options

* Update base image

* Reference official Docker image in the README

Co-authored-by: José Valim <jose.valim@dashbit.co>
2021-04-27 16:34:02 +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
Akash Hiremath a2eb269cec
Fix undefined function warning (#241) 2021-04-26 08:59:46 +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 193050cae5 Don't print token in URL when disabled 2021-04-21 00:04:17 +02:00
Jonatan Kłosko 5dd3b82e1f
Don't register named supervisors on remote node (#230) 2021-04-20 20:03:13 +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
Jonatan Kłosko 44eda43d02
Fix markdown line breaks rendering (#227) 2021-04-20 19:31:02 +02:00
Frank Hunleth b1ceedc220
Ignore RFC 1468 switch to ASCII code sequence (#225)
This ignores "\e(B" which sometimes shows up even when the other RFC
1468 Japanese character set switch codes aren't used. This also updates
defmodifier so that it can be used with non-CSI escape codes (the
ones that start with '[').
2021-04-20 15:05:30 +02:00
Jonatan Kłosko 5100d2723a Fix invalid File.get_cwd! call 2021-04-20 14:17:09 +02:00