Commit graph

71 commits

Author SHA1 Message Date
Jonatan Kłosko 92c34b8718
Add shortcuts for toggling sections panel and showing settings (#110)
* Add shortcuts for toggling sections panel and showing settings

* List new shortcuts
2021-03-23 15:27:03 +01:00
Jonatan Kłosko ad99680a82
Remove trailing newline in captured outputs (#111)
* Remove trailing newline in captured outputs

* Use String.replace_suffix/3
2021-03-23 14:43:16 +01:00
Jonatan Kłosko af79a0fd2f
Improve tab navigation (#109)
* Ignore editor for tab movement

* Improve tab behaviour within notebook

* Highlight focused regular buttons

* Show tooltips on focused elements
2021-03-23 14:10:34 +01:00
Jonatan Kłosko 2846503da6
Add formatting checks to CI workflow (#108) 2021-03-22 22:16:38 +01:00
Jonatan Kłosko 6d56ef141b
Add tooltips (#107) 2021-03-22 22:15:40 +01:00
Jonatan Kłosko 4061802220
Automatically scroll output (#106) 2021-03-22 16:23:42 +01:00
Jonatan Kłosko 9e69e8f096
Add changed cell indicator (#105) 2021-03-22 15:43:31 +01:00
Jonatan Kłosko 5e20541774
Set proper file in env when the notebook is persisted (#95)
* Set proper file in env when the notebook is persisted

* Fix typo
2021-03-21 16:53:00 +01:00
Jonatan Kłosko e2cd992b78 Add missing monaco import 2021-03-21 16:48:47 +01:00
Jonatan Kłosko 3155d682b8
Enter insert mode when markdown cell is double-clicked (#96) 2021-03-21 16:44:48 +01:00
Jonatan Kłosko 8217fdd118
Don't show explicitly ignored result (#94)
* Don't show explicitly ignored evaluation results

* Fix multiline ANSI formatting with virtualized lines

* Add reference to IEx.Helpers

* Fix typo
2021-03-20 16:48:23 +01:00
Jonatan Kłosko 90e7941fe4
Redesign (#80)
* Update cell actions

* Add new focus indicator

* Update headings typography

* Update cell actions and insert buttons

* Add sidebar menu

* Add settings modal

* Update homepage

* Update settings dialog

* Rename classes

* Add floating menu

* Update icon colors on hover

* Fix homepage tests

* Format assets source

* Update monaco editor

* Fix editor width on resize

* Add more padding to the notebook content

* Update settings dialog title

* Show reevaluate button when the cell is in evaluated state

* Show section actions on focus or hover only

* Pre-fill runtime selector with the current configuration

* Ignore cmd + enter in Markdown cells
2021-03-20 14:10:15 +01:00
Jonatan Kłosko b5a21854d2
Use tailwindcss jit (#79) 2021-03-17 11:17:52 +01:00
Jonatan Kłosko 8b3a7bec6b
Don't check request origin for WebSockets connection (#78) 2021-03-17 11:16:40 +01:00
Jonatan Kłosko 8b37e32e3a
Escript (#77)
* Set up Escript packaging

* Use MD5 digest sa ETAG

* Make sure changes to the static files recompile the relevant module

* Manually start the application in Escript

* Set up basic CLI

* Run formatter

* Start Elixir app before anything else

* Improve version output

* Build Escript to project root directory

* Improve assets handling

* Move plug related modules under plugs directory

* Include bundled assets in the repository

* Use the same plug with different static providers in prod and dev

* Refactor providers

* Rename StaticProvidedPlug to StaticPlug
2021-03-17 01:53:44 +01:00
Jonatan Kłosko 7fa2b44666
Highlight viewed section within the list (#76)
* Add fallback primary fonts

* Highlight viewed section in the navbar

* Fix moving cells with empty sections

* Reword attribute
2021-03-12 16:40:37 +01:00
Jonatan Kłosko a2d1e2f934
Initial redesign (#75)
* Add Remix icons

* Replace existing icons with Remix icons

* Update fonts

* Redesign homepage

* Redesign shortcuts modal

* Fix tests
2021-03-12 11:57:01 +01:00
Jonatan Kłosko 266bf35bd0
Move focus navigation to the client (#74)
* Show all sections and enable cross-section focus navigation

* Move focus to the client

* Add shortcut for evaluating all cells

* Fix and expand tests

* Make section links scroll to the given section
2021-03-11 15:28:18 +01:00
Jonatan Kłosko ac9b5526fe
Make evaluation linear (#73)
* Evaluate stale cells that the run cell depends on

* Make evaluation linear
2021-03-09 19:35:39 +01:00
Jonatan Kłosko e65a5f712c
Virtualize output lines (#70)
* Virtualize output lines

* Remove unused dependency

* Remove VirtualizedLinesComponent

* Pass lines as HTML nodes and use as template

* Validate hook children

* Refactor markup
2021-03-04 22:09:57 +01:00
Jonatan Kłosko 199602016c
Optimise inspect coloring (#69) 2021-03-04 11:22:03 +01:00
Jonatan Kłosko 0b6e8f7ef2 Update web client title to Livebook 2021-03-03 23:22:53 +01:00
Jonatan Kłosko dae6d5c9c3
Rename project (#68)
* Rename references

* Update file and directory names

* Fix homepage tests
2021-03-03 22:56:28 +01:00
Jonatan Kłosko 33409e7564
Format Elixir code in exported LiveMarkdown (#40)
* Format Elixir code in exported LiveMarkdown

* Make it possible to disable code formatting for Elixir cells

* Add tests
2021-03-03 22:23:48 +01:00
Jonatan Kłosko 1996dfada9
Extend ANSI codes support (#67)
* Extend ANSI escape codes support

* Add tests

* Apply suggestions
2021-03-03 14:22:49 +01:00
Jonatan Kłosko 90a7b599df
Fix new cell/section focus (#66)
* Add pid to data operations and use that in post-operation hooks

* Fix tests
2021-03-02 08:50:31 +01:00
Jonatan Kłosko 228c279cea
Keep editor focus when cell actions are executed (#65) 2021-03-01 18:48:19 +01:00
Jonatan Kłosko ca520cf481
Add buttons for moving cell (#64) 2021-03-01 18:17:24 +01:00
Jonatan Kłosko d93ab41e7a
Implement reordering cells using keyboard (#63)
* Implement moving cells with keyboard shortcuts

* Add tests for cell movement operation

* Refactor

* Does not mark cells as stale if Elixir cells did not change order
2021-03-01 13:29:46 +01:00
Jonatan Kłosko 663ec3283e
Support starting runtime in Mix context (#61)
* Prototype standalone mode with mix

* Move runtime initialization into separate LiveViews

* Make standalone node initialization async

* Refactor async node initialization

* Automatically scroll to the bottom of output

* Refactor streaming output

* Move MessageEmitter under Utils

* Add path selector to the mix runtime picker

* Update runtime descriptions

* Add successful or error message at the end of output

* Run formatter

* Rename Standalone to ElixirStandalone for consistency

* Show only directories when looking for a mix project

* Update docs

* Extract shared standalone logic

* Make the remote primary process monitor Manager instead of session

* Further refactoring and docs

* Add tests for collectable Callback

* Add missing macro doc

* Apply review suggestions

* Decouple sending asynchronous notifications from the runtime initialization

* Apply suggestions
2021-02-26 20:53:29 +01:00
Jonatan Kłosko d2cd541ce1
Fixes (#62)
* Ignore compilation warnings in the Evaluator tests

* Make Cmd + Enter evaluate cell even in navigation mode

* Fix homepage responsiveness

* Improve setting insert mode with mouse
2021-02-26 20:39:32 +01:00
Jonatan Kłosko 9fed524ed5
Markdown snippets (#56)
* Extend LiveMarkdown format to support Elixir snippets in Markdown cells

* Highlight Markdown code blocks using Monaco editor API

* Use livebook metadata for forcing markdown as well
2021-02-24 15:41:00 +01:00
Jonatan Kłosko cc630dc9da
Show stderr output (#58)
* Implement IODevice forwarding requests to sender's group leader

* Register custom standard error handler for connection lifetime

* Add tests

* Refactor IOForwardGL
2021-02-24 15:37:35 +01:00
Jonatan Kłosko efd58466f2
Purge old deltas (#57)
* Keep track of connected clients in session data

* Add API for confirming and purging deltas

* Send delta confirmation from clients once received

* Update naming

* Fix and extend Data tests

* Update naming
2021-02-23 21:20:46 +01:00
Jonatan Kłosko 780ca84500
Support ANSI escape codes (#55)
* Implement ANSI to HTML converter

* Enable ANSI escape codes by default in the standalone runtime
2021-02-22 22:08:02 +01:00
Jonatan Kłosko 48c7f9e707 Tiny tokenizer improvements 2021-02-22 16:33:46 +01:00
Wojtek Mach 541a3e2529 Update plug_crypto 2021-02-22 15:27:27 +01:00
Jonatan Kłosko 207f168239
Don't warn on module redefinition (#52) 2021-02-22 15:18:37 +01:00
Jonatan Kłosko dc1930634f
Add UI for cancelling evaluation (#51)
* Add icon for cancelling cell evaluation

* Add shortcut for cancelling evaluation

* Test cancellation
2021-02-22 14:21:28 +01:00
Jonatan Kłosko c1eafc9a2c
Save notebook and notify clients when session is stopped (#45) 2021-02-21 19:17:14 +01:00
Jonatan Kłosko 0925ec77cd
Implement notebook persistence and import (#44)
* Basic filesystem navigation

* Add file picker modal

* Implement autosave when dirty and show the status

* Add hompage link in the session view

* Improve file picker and use in both places

* Move session list to homepage

* Some refactoring

* Show import messages if any

* Fix and extend tests

* Show a message when there are no sessions running

* Rename import to fork and make that clear in notebook name

* Fix old route

* Show info when no file is connected to the given session

* Show runtime type next to filename

* Show button for joining session when a running path is selected

* Move modal components to SessionLive namespace

* Add FileGuard to lock files used for notebook persistence

* Use radio for specifying persistence type

* Don't lock nil path

* Simplify FileGuard implementation

* Test notebook persistence

* Fix typo

* Further simplify FileGuard

* Improve file listing

* Don't show parent dir when there's a basename being typed

* Add path component tests
2021-02-21 16:54:44 +01:00
Jonatan Kłosko 77675ad61e
UI polishing (#43)
* Tiny UI improvements

* Add icon for entering insert mode on a markdown cell

* Highlight selected section

* Improve contenteditable elements

* Highlight notebook/section name while editing
2021-02-18 15:11:24 +01:00
Jonatan Kłosko 0b77fd4279
Add keyboard shortcuts help modal (#41)
* Update keybindings and add help modal

* Add more evaluation shortcuts

* Add shortcut to the help modal

* Show appropriate shortcuts depending on the user system

* Handle missing user-agent header

* Conditionally render shortcut based on user agent

* Implement vim-style navigation

* Remove warning

* Determine platform based on socket on mount

* Improve shortcuts list UI
2021-02-18 13:14:09 +01:00
Jonatan Kłosko 13f9b2b509
Sanitize HTML rendered from Markdown (#39) 2021-02-17 17:16:16 +01:00
Jonatan Kłosko f2f121a63b Set up CI 2021-02-16 23:37:10 +01:00
Jonatan Kłosko 6ac7f94897
Define notebook file format (#27)
* Initial file import/export

* Add renderer tests

* Refactor renderer

* Depend only on EarmarkParser

* Add test for export

* Add import tests

* Improve import

* Document the ExMd file format

* Rename ExMd to ExMarkdown

* Rename ExMarkdown to LiveMarkdown

* Build iodata when exporting a notebook

* Persist metadata as a single JSON object

* Move Markdown to LiveMarkdown.MarkdownHelpers

* Make LiveMarkdown private

* Always move primary heading to the top during import

* Hint the user not to use heading 1 and 2

* Return a list of messages from the import function

* Update headings warning

* Add import and export test for non-elixir snippets

* Merge markdown renderer into MarkdownHelpers

* Add import messages on AST rewrites
2021-02-16 18:39:52 +01:00
José Valim 309c9c8a51
Update to Elixir v1.11 and remove unused files (#32) 2021-02-16 12:29:41 +01:00
Jonatan Kłosko 85806f5e03
Make the Delta behavior consistent for client and server (#26) 2021-02-11 22:02:07 +01:00
Jonatan Kłosko 9d3a2ae264
Some cleanups (#25)
* Remove old js files

* Cleanup styles

* Update page title

* Unify elements rounding

* Fix indentation

* Rename component modules

* Add actions to routes for better helpers
2021-02-11 16:35:32 +01:00
Jonatan Kłosko b487fe6104
Extend Evaluator with response formatter (#23) 2021-02-11 14:04:29 +01:00