Commit graph

130 commits

Author SHA1 Message Date
Jonatan Kłosko
c1654345b7
Migrate to latest LV (#437)
* Update phoenix deps

* Update reference to LiveDashboard encode_pid

* Fix form input id references

* Move to HEEx

* Update back to filesystem LV npm package

* Further HEEx rewrites

* Refactor icons into function components

* .html.leex -> .html.heex

* Further refactoring

* Move render helpers into function components

* Add doctype back

* Further refactoring

* Refactor cell component

* Further refactoring

* Compose sidebar using function components

* Rewrite notebook card component as function component

* Fruther refactoring

* Fix race condition in runtime tests

* Rewrite tooltips into function component

* Update Tailwind purge rules

* Revert "Rewrite tooltips into function component"

This reverts commit bd6ca8f0b5.

* Refactor conditional tooltip
2021-07-07 14:32:49 +02:00
Jean Carlos
db22a7cccb
Added range input (Slider) (#435)
* Added range input (Slider)
* Added range input (Slider)
* Custom css to range input

* Formatting correction
2021-07-06 11:22:04 +02:00
Jonatan Kłosko
d0ec965fad Fix persistent insert mode in modals 2021-07-05 23:33:21 +02:00
Jonatan Kłosko
6d9fb90953
Merge undo stack for collaborative editing (#433) 2021-07-05 14:44:00 +02:00
Jonatan Kłosko
557df4a5bf
Add UI for file deletion and renaming (#426) 2021-07-02 23:06:05 +02:00
José Valim
2dbfb562ea Hardcode font size to 14 for consistency 2021-07-02 16:52:38 +02:00
Jonatan Kłosko
5637d09c09 Fix Enter behaviour on buttons 2021-07-01 17:06:06 +02:00
Jonatan Kłosko
c0d9f8253a
Support Enter to enter insert mode (#422) 2021-07-01 16:38:08 +02:00
Jonatan Kłosko
b92afcef8e
Highlight matching brackets only in insert mode (#421) 2021-07-01 15:58:18 +02:00
Jonatan Kłosko
2100451df7
Document editor shortcuts and add basic view (#419)
* Document more editor shortcuts

* Add basic shortcuts view

* Improve sizing

* More shortcuts

* Fix replace-all editor shortcut

* Show tab in basic view, hide find shortcut
2021-07-01 15:02:56 +02:00
Jonatan Kłosko
20ff5c95b8
Suggest restarting runtime on Mix.install error and add restart shortcut (#418)
* Suggest restarting runtime on Mix.install error and add restart shortcut

* Apply review comments
2021-07-01 13:23:07 +02:00
Jonatan Kłosko
86316e9460
Add code formatting integration to Elixir cells (#416) 2021-07-01 11:50:04 +02:00
Jonatan Kłosko
2ff327e742
Implement cells bin (#414)
* Implement cells bin

* Temporarily keep cells source

* Send complete bin entries from session to clients when a cell gets removed

* Polish styles

* Hydrate bin entries on section deletion as well
2021-06-30 17:48:27 +02:00
Jonatan Kłosko
44dc3d9041
Improve section management (#411)
* Allow inserting section anywhere in the notebook

* Improve section deletion

* Polishing

* Remove section insertion shortcuts
2021-06-28 23:46:50 +02:00
mcintyre94
4241866b5d
Add support for a color input type (#410)
This renders as input type=color, and stores a 6 digit hex color with leading hash
2021-06-28 20:05:56 +02:00
Jonatan Kłosko
8e5b387f04
Update VegaLite layout when the data changes (#405) 2021-06-26 18:05:52 +02:00
Jonatan Kłosko
69803806b5 Update default alignment in Markdown table header 2021-06-26 17:02:16 +02:00
Jonatan Kłosko
73a79cbdae
Add support for markdown output (#404)
* Add support for markdown output

* Make cell indicator absolute

* Update output typespec

* Move rendering to the client

* Polishing
2021-06-26 16:47:52 +02:00
Kevin
ea83e294c0
Update z-index of menu (#396) 2021-06-24 16:45:19 +02:00
Jonatan Kłosko
6c53c09a61
Add copy to clipboard button to virtualized output (#393)
* Add copy to clipboard button to virtualized output

* Move text output into its own component

* Update button background
2021-06-24 12:15:12 +02:00
Jonatan Kłosko
e49aaa62d2 Bump Monaco editor version 2021-06-21 11:12:26 +02:00
Jonatan Kłosko
8415ba311e
Show ticking timer while cell is evaluating (#374) 2021-06-20 17:06:30 +02:00
Shavit
a104d9d73b
Show the evaluation time next to the cell indicator (#366)
* Display the time in seconds

Show the evaluation time next to the cell indicator

* Test session data

* Send evaluation time to session

Start the evaluation time inside the evaluator, display the time in seconds
or milliseconds.

The output is not a string but a map

* Add metadata to evaluation_response

* Wrap the evaluation indicator in a tooltip

  • Add metadata argument to the evaluation_response message
  • Use a tooltip to display the evaluation time

* Display the toolip below the indicator

* Remove the evaluation start time

* Make the tooltip optional

* Rename finish_cell_evaluation

* Evaluator tests

* Update test to accespt metadata

* Pass the evaluated time as a third argument

* Make status tooltip more generic

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-06-20 14:48:00 +02:00
Jonatan Kłosko
cbdc91d68d
Show insert actions when hovering over free space between cells (#369) 2021-06-18 16:14:20 +02:00
Jonatan Kłosko
56c087e79a
Improve section links behaviour (#367)
* Limit the impact of section html id changing

* Make sure section links scroll to section after loading finishes
2021-06-18 13:21:48 +02:00
Jonatan Kłosko
9d4139529e
Show clear error when rendering VegaLite plot fails (#362) 2021-06-17 18:24:03 +02:00
Jonatan Kłosko
b18c1579bd
Add dynamic table output (#356)
* Add dynamic table output

* Support table name
2021-06-17 01:02:27 +02:00
Jonatan Kłosko
3df6508b56
Disable autoscroll when focusing in insert mode (#355) 2021-06-16 16:16:26 +02:00
Wojtek Mach
8cf8f2697c
Use <kbd> for keyboard keys (#351)
* Use <kbd> for keyboard keys

* Show keyboard icon

* Render each key explicitly

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

Co-authored-by: Wojtek Mach <wojtekmach@users.noreply.github.com>

* Add Livebook specific icons to the introductory notebooks

* More updates

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-06-16 13:31:53 +02:00
Jonatan Kłosko
4657ad17c3
Update Monaco and use the built-in Elixir definition (#345) 2021-06-14 15:57:13 +02:00
José Valim
e4cd38a1f1 Add portal images, closes #330 2021-06-14 11:37:57 +02:00
Jonatan Kłosko
b0bd7540c0
Compute cell source digest on the client (#341) 2021-06-10 14:54:55 +02:00
Edmundo Biglia
e16992dbc1
fix markdown codeblocks overflowing container (#333) 2021-06-09 11:02:47 +02:00
José Valim
9eaa98ce56
Portal guide (#318) 2021-06-08 14:53:41 +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
José Valim
2f38e3454e
Improvements to Markdown CSS (#326)
* Move ul/ol to list-outside so we can render paragraphs inside them
* Add left margin to ul/ol
* Add margin-top to headers
* Change the style of nested lists

Closes #317
2021-06-07 11:35:25 +02:00
Jonatan Kłosko
a8073ceac1
Add attributions to Delta-related packages (#324) 2021-06-06 15:27:09 +02:00
Jonatan Kłosko
7b89e1ec83
Improve markdown links (#315)
* Make sure link/button clicks don't trigger cell focus

* Open external links in new browser tab
2021-06-03 16:31:41 +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
f4a479b14e
Improve output container behaviour with horizontal overflow (#295) 2021-05-25 18:55:57 +02:00
Jonatan Kłosko
2e0195f658
Make sure math equations are rendered sequentially (#294) 2021-05-25 14:36: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
Tomasz Tomczyk
a750d528c4
Only focus when needed (#283) 2021-05-21 01:59: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
eea546d59c Add styles for kbd tag in rendered Markdown 2021-05-13 15:52:11 +02:00
Jonatan Kłosko
2c965b4bdf
Update webpack (#268) 2021-05-12 23:44:45 +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
Simon McConnell
056d01cee7
check contentElement exists - fixes #264 (#265) 2021-05-08 23:47:57 +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
dc605aa209 Specify editor fallback font 2021-05-04 15:48:26 +02:00