Commit graph

158 commits

Author SHA1 Message Date
Jonatan Kłosko 357985eef4
Apply editor theme to markdown snippets (#873)
* Apply editor theme to markdown snippets

* More tailwind
2022-01-16 13:50:44 +01:00
José Valim 68e81356f6
Improvements to theme (#871) 2022-01-16 12:40:14 +01:00
Jonatan Kłosko 35e42d1bad
Keep editor background on rerender (#869) 2022-01-15 23:08:45 +01:00
Cristine Guadelupe 67fa155f3d
High-contrast option for the code editor (#868)
* High-contrast option for the code editor

* Small refactor

* Creates a high-contrast theme from the custom theme

* Refactor to store the theme as a string

* Fix prettier
2022-01-15 18:46:25 -03:00
Cristine Guadelupe 36aab4357c
Adds an option to increase the font size of the editor (#860)
* Adds an option to increase the font size of the editor

* Update lib/livebook_web/live/settings_live.ex

Co-authored-by: José Valim <jose.valim@gmail.com>

* Editor font size options as constants

Co-authored-by: José Valim <jose.valim@gmail.com>
2022-01-13 15:06:50 -03:00
Cristine Guadelupe 89835f5e60
Adds a bit of contrast to the comments in the code editor (#859)
* Adds a bit of contrast to the comments in the code editor

* Changes the ansi-color-light-black to the new color of the comments

* Color hex in lowercase

* Reverts to the old light-black
2022-01-13 15:06:30 -03:00
Jonatan Kłosko 118cf05d0a
Introduce broadcast communication from runtime (#845)
* Introduce broadcast communication from runtime

* Return broadcast target from group leader

* Increase timeout

* Make the channel test async

* Decouple base topic and ref
2022-01-10 18:38:08 +01:00
Jonatan Kłosko 19baf013d5
Introduce a dedicated channel for JS widget communication (#843)
* Introduce a dedicated channel for JS widget communication

* Handle payload serialization errors

* Tie channel lifetime to the session

* Catch serialization errors instead of encoding twice

* Merge JS static and dynamic outputs

* Authenticate socket connection from session

* Update JS output format

* Remove unused helper

* Apply review comments
2022-01-06 16:31:26 +01:00
Jonatan Kłosko 66390dc677
Support Escape out of multi-cursor mode (#833) 2021-12-28 22:40:24 +01:00
Jonatan Kłosko 145f8a6992
Focus fixes (#831) 2021-12-28 19:42:04 +01:00
Jonatan Kłosko 844242ba80
Add support for JS output widgets (#818)
* Add support for JS output widgets

* Don't block session when fetching assets and batch calls

* Improve path component sanitisation

* Move fetching check to session caller

* Attach origin to connect and event messages
2021-12-24 14:18:34 +01:00
Jonatan Kłosko b0563d14a6
Fix completion shortcuts (#792)
* Fix completion shortcuts

* Remove shortcut override
2021-12-12 00:10:15 +01:00
Jean Carlos b92bf3ae7c
fix handleDocumentFocus error (#778)
* fix handleDocumentFocus error

* format correction

* Update assets/js/session/index.js

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>

* format correction

* Update assets/js/session/index.js

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-12-09 12:51:32 +01:00
Jonatan Kłosko ee2602c932
Keep indentation when pasting code into the editor (#779) 2021-12-09 12:18:41 +01:00
Jonatan Kłosko 89ea67861f
Improve "changed" indicator and batch evaluation shortcuts (#766)
* Make cell status italic when content changed

* Add Ctrl+Shift+Enter for evaluating all cells

* Improve the behaviour of evaluating all cells

* Fix typo
2021-12-07 19:14:32 +01:00
Jonatan Kłosko 84222d0a0c
Allow editor command palette to overflow (#764) 2021-12-06 14:15:44 +01:00
Jonatan Kłosko 859dfd9eb2
Disable word suggestions on Elixir cells (#763) 2021-12-06 13:10:16 +01:00
Jonatan Kłosko d909272746
Improve completion (#747)
* Add keywords to completion

* Fix signature request caching for call without parentheses

* Don't insert parentheses for def* macros

* Don't trigger missing runtime message when auto completion is enabled

* Don't insert parentheses for keyword macros

* Improve completion of env macros

* Apply review comments

* Update locals without parentheses

* Apply suggestions from code review

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

* Format

Co-authored-by: José Valim <jose.valim@dashbit.co>
2021-12-05 14:58:30 +01: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
Adam Lancaster a764073848
Allow for XML syntax highlighting in markdown cells (#743)
* Update webpack.config.js

Allows for xml syntax highlighting in markdown cells

* Extend theme to cover XML and JSON specific tokens

* Refactor theme colors into a single palette

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-12-04 15:02:53 +01:00
Jonatan Kłosko cc772f4ffe
Never show automatic completion popup in Markdown cells (#742) 2021-12-04 13:44:07 +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 4debf2c1fb
Fix evaluation timer on page refresh (#732) 2021-12-03 14:23:50 +01:00
Jonatan Kłosko 264d6c3ff2
Add support for controls output type (#710)
* Add support for controls output type

* Split controls into individual widgets

* Adjust ids

* Improve widget and controls garbage collection

* Allow arbitrary functions as object release hook

* Add type to button and input events

* Add keyboard status event

* Change release hooks into monitor messages

* Rename pointer to reference and return an error on bad monitor
2021-12-02 16:45:00 +01:00
Alex Reichert 236ea4dd96
Fix typo in drag_and_drop directory name (#723)
* Fix typo in drag_and_drop directory name

* Fix import
2021-12-01 19:44:42 +01:00
Jonatan Kłosko c2636b8220
Migrate inputs to Kino (#714)
* Migrate inputs to Kino

* Update lib/livebook/session/data.ex

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

* Try parsing numbers as integers

* Garbage collect input values

* Adjust tests

* Remove unused variable

* Fix frame rendering

* Wrap inputs in border depending on its type

* Add textarea

* Reorder

* Update tests

Co-authored-by: José Valim <jose.valim@dashbit.co>
2021-11-25 18:43:42 +01:00
Jonatan Kłosko bfe2036d34 Fix headline blur on click and improve editor focus 2021-11-18 17:34:04 +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 7eac7a83ac
Implement clipboard copy with JS commands (#699) 2021-11-10 20:17:32 +01:00
Jonatan Kłosko 3ed5da0106
Implement menu with JS commands and extract into component (#698) 2021-11-10 19:28:09 +01:00
Jonatan Kłosko d8d52c9e89
Add runtime info panel (#692)
* Add runtime info panel

* Remove intro from the runtime modal

* Show default runtime in the panel if no runtime is set
2021-11-09 18:37:22 +01:00
Jonatan Kłosko c473a8c469
Add an option to amplify cell outputs (#689)
* Add an option to amplify cell outputs

* Reorder actions
2021-11-09 10:45:05 +01:00
Jonatan Kłosko 19f92c9e72
Don't sanitize KaTeX rendered SVGs (#684) 2021-11-06 21:25:07 +01:00
Jonatan Kłosko 8889f11244 Don't scroll when focusing cell output 2021-11-05 18:23:26 +01:00
Jonatan Kłosko 8c923f7bda
Show new directory section immediately on the client (#674) 2021-11-03 17:16:09 +01:00
Jonatan Kłosko e38d075fc2
Dynamically import Vega-Lite JS when needed (#673) 2021-11-03 15:58:46 +01:00
Jonatan Kłosko ad4867ddfb
Refactor modals with JS commands (#669)
* Use JS commands for closing the modal with animations

* Refactor modal to render content as slot

* Bump LV
2021-11-02 22:34:44 +01:00
Jonatan Kłosko 021d6ac42e
Improve icon buttons accessibility and navigation (#667)
* Rename tooltip source attribute

* Add aria-label to icon buttons/links

* Actually focus cell content when navigating around

* Add some descriptions

* Fix dynamically computed tooltips
2021-11-01 18:20:56 +01:00
Jakub Perżyło ace64eab37
Add show/hide button for password inputs #566 (#664)
* Added visibility toggle for password cell

* Formatted code

* Moved password toggle to separate component

* Adjusted to review

* Added password toggle for add filesystem component

* Update lib/livebook_web/helpers.ex

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-11-01 16:04:11 +01:00
Jakub Perżyło fbef386aa8
Allow importing a livebook via file upload #645 (#665) 2021-11-01 13:59:39 +01:00
Jean Carlos 421b1c69a1
Show indicators of state on session sidebar (#657)
* 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

* Improve users connected display

* Update lib/livebook_web/live/session_live.ex

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>

* Update lib/livebook_web/live/session_live.ex

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>

* Adjust elements

* Change favicon based on notebook status

* Format correction

* "operation" is unused

* Improvements for better functioning of icons

* Renamed icons files

* Update favicons

* Update changelog

* Show indicators of state on session sidebar

* Changes to status colors

* Improve spacing

* Scroll to cell on status click

* global_evaluation_status -> global_status

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-11-01 13:15:21 +01:00
Jonatan Kłosko 40158aa6cc
Improve scroll on cell focus/blur (#659)
* Stay in insert mode only if evaluate is clicked

* Never scroll when focusing cell with click
2021-10-29 15:05:59 +02:00
Owen Bickford b6793d6630
Type1fool-smooth-scrolling (#638)
* add scroll behavior to html, body, & notebook elems

* don't append base url or set target on intra-page links

* add back-to-top link, class autosorting/formatting

* add convert global style to `.scroll-smooth` util

* add `isPageAnchor` function

* remove `go-to-top` link

* use `isAbsoluteUrl` and add a semicolon ;)
2021-10-24 19:38:57 +02:00
Matheus Cumpian fe77823685
Removing "Evaluate All Below" shortcut functionality (#621) 2021-10-19 23:36:44 +02:00
Jonatan Kłosko c354c46d89
Update dependencies (#606)
* Update dependencies

* Update dependencies major

* Update mix deps
2021-10-19 00:37:48 +02:00
Jonatan Kłosko 866abe8dee
Update favicon when navigating across sessions (#603) 2021-10-18 22:36:00 +02:00
Jean Carlos 238635a6be
Changed favicon with base on notebook status (#594)
* Change favicon based on notebook status

* Format correction

* "operation" is unused

* Improvements for better functioning of icons

* Renamed icons files

* Update favicons

* Update changelog

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-10-16 12:24:19 +02:00
Jonatan Kłosko fedbf4f53b
Update matching brackets style (#595) 2021-10-13 14:56:33 +02:00
Jonatan Kłosko 2b1cb57a15
Start new notebooks with a focused code cell (#527)
* Start new notebooks with a focused code cell

* Update changelog
2021-08-30 16:33:40 +02:00
Jonatan Kłosko b1807b1192
Don't sanitize class on icon tags in markdown (#522) 2021-08-28 18:56:56 +02:00