Commit graph

210 commits

Author SHA1 Message Date
Jonatan Kłosko 39a294abbe
Add an option for wrapping words in Markdown editor by default (#1107) 2022-04-13 23:54:05 +02:00
Jonatan Kłosko 5fa9bbe01c
Fix JS view connection timeout under heavy load (#1106) 2022-04-13 21:59:43 +02:00
Jonatan Kłosko aafdc12015
Mount Markdown cell editor lazily (#1102) 2022-04-13 12:45:29 +02:00
Jonatan Kłosko 8b17365bf9
Don't show output init timeout message on serialization error (#1096) 2022-04-09 15:48:44 +02:00
Jonatan Kłosko 5117fd6e64
List database types when adding database connection for the first time (#1090)
* List database types when adding database connection for the first time

* Rename classes
2022-04-04 19:48:57 +02:00
Jonatan Kłosko a3018dc522 Fix element type check on shortcut actions 2022-04-04 17:07:16 +02:00
Jonatan Kłosko 17a0893809
Clear URL hash when the user clicks outside the element (#1089) 2022-04-04 16:34:01 +02:00
Jonatan Kłosko 902c993098
Adjustments (#1087)
* Fix horizontal scrollbar on smaller screens

* Apply navigation shortcuts without an additional roundtrip

* Shorten the data element selector

* Fix URL in changelog

* Return reference from handle_intellisense
2022-04-04 12:19:11 +02:00
Jonatan Kłosko 75eb031719
Automate searching and adding new dependencies (#1081)
* Automate searching and adding new dependencies

* Restructure runtime management

* Leave search restrictions up to the runtime

* Support predefined dependencies in Embedded runtime dependency search

* Use the embedded runtime for dependency search test

* Fix typo

* Use module for loading embedded runtime dependencies

* Improve naming
2022-04-01 20:13:37 +02:00
Jonatan Kłosko df765f2dd3
List predefined smart cells and automatically add their dependencies (#1078)
* List predefined smart cells and automatically add their dependencies

* Generalize dependency insertion to multiple entries

* Add runtime setup modal

* Don't evaluate setup when restarting the runtime fails

* Automatically add vega_lite for chart builder

* Improve confirmation modal actions when the action is not destructive
2022-03-30 21:55:50 +02:00
Jonatan Kłosko 5476fd001d
Introduce a setup cell (#1075)
* Introduce a setup cell

* Don't collapse setup cell when dirty

* Collapse fresh setup cell when empty

* Reword collapsed setup cell text
2022-03-28 21:36:57 +02:00
Jonatan Kłosko ac5a71bf85
Show a message when JS view data is not available (#1067)
* Multiplex initialization of JS views

* Show timeout message when JS view data fails to load

* Refactor JS view channel

* Update tests
2022-03-22 18:25:42 +01:00
Jonatan Kłosko 0145d68593
Limit standard output to last 1000 lines (#1063) 2022-03-19 12:22:36 +01:00
Jonatan Kłosko 7d30aab07b
Enable SQL highlighting in the editor (#1056) 2022-03-17 13:27:28 +01:00
Jonatan Kłosko b3b79afed4
Refactor JS hooks (#1055)
* Restructure hook files

* Simplify app.js

* Refactor hooks

* Implement password toggle with JS commands
2022-03-16 11:33:53 +01:00
Jonatan Kłosko e7835c73f2
Use the first cell in viewport as the default for j/k navigation (#1054) 2022-03-15 11:52:29 +01:00
Jonatan Kłosko 580116ea97
Keep cell hover when moving cursor to iframe (#1051) 2022-03-15 11:52:21 +01:00
Jonatan Kłosko 6db36ea7e6
Add support for smart cell editor (#1050)
* Add support for smart cell editor

* Log an error when smart cell fails to start
2022-03-14 22:19:56 +01:00
Jonatan Kłosko e27ff5a960
Rename Elixir cell to Code cell (#1035) 2022-03-02 12:48:02 +01:00
Jonatan Kłosko d191b7eb9d
Set up confirmation modals (#1033)
* Set up confirmation modals

* Add temporary fix for the global hook remount
2022-03-02 00:26:40 +01:00
Jonatan Kłosko 9d7fe44253
Introduce smart cells (#1029)
* Introduce smart cells

* Apply review comments
2022-02-28 13:53:33 +01:00
Jonatan Kłosko f699575b45
Cache mermaid graph rendering (#1023)
* Cache mermaid graph rendering

* Bump mermaid

* Update naming
2022-02-22 12:02:53 +01:00
Jonatan Kłosko 0386a032a1
Reinitialize hooks on reconnection (#1018)
* Reinitialize cells on reconnection

* Send initial session data without additional roundtrip
2022-02-21 20:39:29 +01:00
Cristine Guadelupe 72da7da3b5
Live region for home page (#1007)
* Live region on home

* Live region: bulk actions

* Live region: ordered by info

* Makes the live region helper global
2022-02-16 15:50:32 -03:00
Jonatan Kłosko 5cb0c68c41
Delay appearing input focus (#1001) 2022-02-14 21:22:58 +01:00
Jonatan Kłosko 53aea7af6e Leave JS output channel only if it exists 2022-02-10 11:25:37 +01:00
Jonatan Kłosko 565f65d0fc
JS output fixes (#991)
* Explicitly leave the JS channel before disconnecting the socket

* Reposition iframe when the sidebar is toggled and on window resize
2022-02-08 20:12:03 +01:00
Jonatan Kłosko e5e13d86c2
Serve iframes from another local port when running on http (#989)
* Serve iframes from another local port when running on http

* Use relative hostname in local iframe URL

* Simplify server start check

* Use random iframe port when Livebook runs on a random port

* Rename space/ to iframe/

* LivebookWeb.IframePlug -> LivebookWeb.IframeEndpoint
2022-02-08 14:45:58 +01:00
Jonatan Kłosko ccc64876a8
Add support for widget binary payloads (#982)
* Add support for widget binary payloads

* Migrate LV auth to a separate hook

* Properly set user buffer when encoding
2022-02-07 21:03:25 +01:00
Jonatan Kłosko 9fab78d2a6
Load iframe using the same protocol as the app (#985) 2022-02-05 22:41:58 +01:00
Jonatan Kłosko 2e17ad48d6 Correctly handle boolean attributes with data-keep-attribute 2022-02-04 00:37:46 +01:00
José Valim 995082b9ab
Add data-keep-attribute to reapply attribute on morphdom patch (#978) 2022-02-03 23:25:12 +01:00
Jonatan Kłosko a42e11a2ad
Show an error message when loading the JS module fails (#975) 2022-02-03 18:51:33 +01:00
José Valim aafa5cc642
Add delayed top bar (#973) 2022-02-03 15:05:16 +01:00
Milo Lee 6826939840
Controls how lines should wrap of the editor (#961)
* Configuring word wrapping temporarily on editor-level

* Split into enable and disable word wrapping actions

* Move toggle word wrapping code to __mountEditor
2022-02-02 13:58:46 +01:00
Jonatan Kłosko 178df3dac9
Load output iframe from a different origin (#968)
* Load output iframe from a different origin

* Update iframe source
2022-02-02 00:10:17 +01:00
Cristine Guadelupe 4dd28388a5
Bulk actions for sessions (#939)
* Initial implementation to close multiple sessions

* Sessions: bulk actions with components

* Rename Disconnect sessions to Disconnect runtime

* Select all and disabled when nothing is selected

* Styled checkbox

* Renames toggle events

* Warning about not persisted notebooks

* Adds disconnect runtime option for a single session

* Edit sessions on right

* Fix: typos and plural

* Minor adjustments

* Removes the loop for rendering the menu

* Menus with fixed width

* Minor adjustments

* Pluralize as global helper

* Bulk actions form on client side

* Track bulk actions buttons state

* Fix: home live tests

* Doctests for pluralize

* Fix: bulk actions buttons losing state on session update

* Fix: format

* Minor adjustment on toggle_edit

* Review-based adjustments

* Reset the Edit state after single-session actions

* Minor adjustments

* Fixes bulk action events

* Submit the bulk action form directly

* Tests for bulk actions

* Indentation

* Update lib/livebook_web/live/home_live/close_session_component.ex

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

Co-authored-by: José Valim <jose.valim@gmail.com>
2022-01-28 17:45:04 -03:00
Jonatan Kłosko f8a216f8ee
Highlight code errors on formatting and evaluation (#948) 2022-01-28 21:00:31 +01:00
Jonatan Kłosko 2acefde9f7
Fix line break support in Mermaid graph definition (#932) 2022-01-25 16:19:33 +01:00
Jonatan Kłosko 2f55b87171
Allow downloads inside JS output iframe (#931) 2022-01-25 14:29:57 +01:00
Joe Martinez cd958f1492
warn if clipboard support is missing (#922)
* warn if clipboard support is missing

* make the message a bit more helpful

* Update assets/js/app.js

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2022-01-24 11:21:13 +01:00
Roberto Estrada cdb17e8573
Adds font-awesome when is required (mermaid). (#913)
* Adds font-awesome when is required (mermaid).

* applied suggestions

* format with prettier vscode plugin
2022-01-22 19:36:00 +01:00
Jonatan Kłosko a9f9c68cfa
Compute iframe base URL based on page origin (#902)
* Compute iframe base URL based on page origin

* Format
2022-01-20 11:29:45 +01:00
Jonatan Kłosko 0b58ba9331
Adjust JS iframe default styles (#893) 2022-01-19 18:32:58 +01:00
Jonatan Kłosko ae0f083c5c
Fixes (#889)
* Fix title test

* Fix editable element check

* Fix duplicate output ids
2022-01-19 14:43:35 +01:00
Jonatan Kłosko 3a0d77d879
Disable keyboard control when an editable element is focused (#885) 2022-01-19 13:05:21 +01:00
Jonatan Kłosko 0b1f308b13
Fix cell insertion while editing Markdown cell (#883) 2022-01-19 11:34:38 +01:00
Jonatan Kłosko c57e5448b7
Remove old output formats (#876)
* Remove old outputs

* Remove other occurrences
2022-01-17 13:24:59 +01:00
Jonatan Kłosko 6d1d4de767
Push cells source to the client on initial render (#875) 2022-01-17 13:20:59 +01:00
Pete Jodo 384a59e5f0
fix bad import for mermaidjs (#874) 2022-01-16 22:16:08 +01:00