Commit graph

33 commits

Author SHA1 Message Date
Cristine Guadelupe 9690e2ac51
Minor design improvements (#858)
* Adds the greens and yellows from the custom color palette

* Keeps the cell status indicators with the original bright colors

* Increases icon-button contrast

* Increases labeled_text font-size

* Removes type: button to fix the runtime sidebar buttons style on Safari

* Increases the toggleable menu contrast on hover

* Use the same color for the stale state in the sections sidebar
2022-01-13 15:06:11 -03:00
Jonatan Kłosko f0606b109d
Automatically back up notebooks without a file (#736)
* Improve file select layout on long paths

* Automatically back up notebooks without a file

* Run formatter

* Add margin when there are no sections

* Add an informative note about autosave directory

* Store autosave path instead of file in the config

* Rename autosave dir to autosave path

* Fix insert mode escape on section headlines

* Show ellipsis on selected file too

* Always create the default directory

* Apply review comments
2021-12-04 16:29:14 +01:00
Jonatan Kłosko e2490c0f7f
Implement signature intellisense (#640)
* Remove Code.Fragment backport

* Fix tests compatibility with Elixir 1.13

* Implement signature intellisense

* Don't show signatures on module attributes

* Add tests for calls with do-end block

* Unify spec formatting

* Insert parentheses when completing a function call

* Send all text until cursor in signature request

* Add configuration for completion/signature popups (#693)

* Add editor settings form

* Add configuration for intellisense defaults

* Read fresh settings when editor mounts

* Scope attribute names

* Fix disabled button styling

* Simplify signature box and enable by default

* Split settings into system and user sections

* Update lib/livebook_web/live/settings_live.ex

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

* Update lib/livebook_web/live/settings_live.ex

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

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

* Fix spacing in documentation tests

Co-authored-by: José Valim <jose.valim@dashbit.co>
2021-12-03 21:57:21 +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 3ed5da0106
Implement menu with JS commands and extract into component (#698) 2021-11-10 19:28:09 +01:00
Matheus Cumpian f6d31a7d86
adding a disabled delete button for sections that have branches (#624)
* adding a disabled delete button for sections that have branches

* Apply suggestions from code review

* Update assets/css/components.css

* Apply suggestions from code review

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-10-20 18:10:11 +02:00
Jonatan Kłosko bf05fb0a50
Add support for configuring file systems using env variables (#498)
* Add support for configuring file systems using env variables

* Add UI for copying file systems env configuration
2021-08-18 14:41:57 +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
Jean Carlos ad999cf9c0
Added input select (#448)
* Added range input (Slider)
* Added range input (Slider)
* Custom css to range input

* Formatting correction

* Defined min and max values of input range

* Revert "Defined min and max values of input range"

This reverts commit 815167ab0f.

* Added input select

* working with a options like list

* Formatting correction

* swapped li for inputs in input settings

* Removed unused attribute

* Final adjustments

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-07-18 19:01:44 +02:00
Jonatan Kłosko 7203813f8d
Add support for input properties (#440) 2021-07-08 11:35:09 +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 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 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 b18c1579bd
Add dynamic table output (#356)
* Add dynamic table output

* Support table name
2021-06-17 01:02:27 +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 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 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 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 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
Jonatan Kłosko 5efd8eb851
Notebook status indicators (#127)
* Add notebook indicators

* Make evaluation status button point to the corresponding cell

* Rename introductory notebook

* Update path highlight when chosen for saving

* Allow specifying nonexistent directories when saving and create those

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

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

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

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

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

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

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

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

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

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

Co-authored-by: José Valim <jose.valim@dashbit.co>
2021-04-01 12:56:19 +02:00
Jonatan Kłosko 5c5b4ece26
Add "Hello Livebook" notebook (#123)
* Limit module result to a single line

* Add introductory notebook to get started with

* Don't show tooltip on focused elements

* Update lib/livebook/notebook/hello_livebook.ex

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

* Update lib/livebook/notebook/hello_livebook.ex

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

* Update lib/livebook/notebook/hello_livebook.ex

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

* Update notebook settings reference

* Add note on package authors

* Add tests

* Update Phoenix version to git master

Co-authored-by: José Valim <jose.valim@dashbit.co>
2021-03-30 21:42:02 +02:00
Jonatan Kłosko 0983a9df77
Add confirmation for session deletion (#117)
* Update sections panel

* Add deletion confirm and unify buttons

* Align notebook title

* Fix whitespace shrinking in the editor

* Update session deletion route
2021-03-25 17:39:18 +01:00
Jonatan Kłosko fe5dfe3b86
Insert section (#114)
* Add section insertion button

* Add shortcut for inserting section

* Pass buttons to the component

* Add mix alias for running both formatter

* Adjustments

* Make the buttons group component stateless
2021-03-24 18:37:50 +01:00
Jonatan Kłosko a18122cfcb
Further redesign (#112)
* Update logo and favicon

* Tiny updates

* Replace checkbox with switch button

* Build assets

* Move assets/static to priv/static

* Update lib/livebook_web/endpoint.ex

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

Co-authored-by: José Valim <jose.valim@dashbit.co>
2021-03-23 17:46:33 +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 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 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 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 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 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