Commit graph

352 commits

Author SHA1 Message Date
Jonatan Kłosko fbd03d6725
Update Phoenix LV (#656)
* Wrap live routes in live_session

* Update Phoenix LV

* Migrate to live_component component call

* render_block -> render_slot

* phx-disconnected -> phx-loading

* phx-capture-click -> phx-click-away

* Add hook dealing with current user

* Bump LV

* Bump LV
2021-11-01 19:33:43 +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
Jonatan Kłosko 2694007c0e
Compute cell snapshots when an existing notebook is given (#666) 2021-11-01 13:59:04 +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
Kian Meng Ang e16c8a5dab
Fix typos (#654) 2021-10-31 07:14:35 +01:00
Jonatan Kłosko dbccadfdcf
Redesign save to file modal (#663)
* Redesign save to file

* Always show Save when a file is present

* Fix indentation
2021-10-30 12:02:26 +02:00
Jonatan Kłosko 529339c8a2
Remove configuration env vars on boot (#662)
* Remove configuration env vars on boot

* Update lib/livebook/application.ex

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

Co-authored-by: José Valim <jose.valim@dashbit.co>
2021-10-29 20:49:25 +02:00
Jonatan Kłosko ac1a4a5ffb Add action for clearing evaluation and outputs (#661)
* Move notebook export menu item

* Add action for clearing evaluation and outputs

* Test data operation

* Update wording

* Update wording

* Reorder menu items
2021-10-29 16:34:44 +02:00
José Valim 8a0d218cbe The first address for a shortname must be the one that matches 2021-10-29 16:29:27 +02:00
Jonatan Kłosko 4493a60380
Improve runtimes UI (#655)
* Show reconnect for all runtime types when applicable

* Make it clear which runtime is the default

* Show Mix.install restart suggestion only for standalone runtimes

* Fix tests not to rely on the default runtime tab
2021-10-28 19:41:07 +02:00
José Valim 8fe8d27d3d Allow any address we might be listening on 2021-10-27 17:27:52 +02:00
Jonatan Kłosko 386fe5b531 Redesign flash message snackbars 2021-10-27 17:04:33 +02:00
Jonatan Kłosko 394c6daef1
Improve validity check when input changes during evaluation (#651) 2021-10-27 15:36:50 +02:00
Jonatan Kłosko 6ba5d0017a
Allowapplication/octet-stream content type for import (#650) 2021-10-27 13:49:03 +02:00
Jonatan Kłosko c1a6bc1aa8
Remove reactive inputs (#649) 2021-10-27 13:35:24 +02:00
gpopides 5c0267b547
Added automatic cell evaluation (#637)
* Added automatic evaluation

* apply review changes

* persist reevaluate_automatically and update test

* test for automatic reevaluation

* formatting

* Add import test

* Always show if a cell automatically reevaluates and link to settings

* Evaluate automatically reevaluating cells after queuing

* Always show evaluate button when cell is fresh

* Update icon

* Add test ensuring that fresh cells don't evaluate automatically

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-10-26 20:38:30 +02:00
Wojtek Mach 453eabb6d4
Fix urls on Elixir master (#647)
Before Elixir master, empty path is represented as `nil`:

    ~% asdf shell elixir 1.12.3-otp-24 ; elixir -e 'IO.inspect URI.parse("http://localhost")'
    %URI{
      authority: "localhost",
      fragment: nil,
      host: "localhost",
      path: nil,
      port: 80,
      query: nil,
      scheme: "http",
      userinfo: nil
    }

On Elixir master, it is an empty string:

    ~% asdf shell elixir git ; elixir -e 'IO.inspect URI.parse("http://localhost")'
    %URI{
      authority: "localhost",
      fragment: nil,
      host: "localhost",
      path: "",
      port: 80,
      query: nil,
      scheme: "http",
      userinfo: nil
    }

The new default, the empty string, caused a bug on this line:

    Map.update!(:path, &((&1 || "/") <> path))

because we never prepended the leading `/` and thus we ended up with
path `"health"`, not `"/health"`, which now on Elixir master crashes:

    iex> URI.parse("http://localhost") |> Map.replace!(:path, "health") |> to_string()
    ** (ArgumentError) :path in URI must be empty or an absolute path if URL has a :host, got: %URI{authority: "localhost", fragment: nil, host: "localhost", path: "health", port: 80, query: nil, scheme: "http", userinfo: nil}
        (elixir 1.13.0-dev) lib/uri.ex:863: String.Chars.URI.to_string/1
2021-10-26 16:48:17 +02:00
Jonatan Kłosko 9da44fd541
Fix root directory listing on S3 when empty (#646) 2021-10-26 15:39:24 +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 c6d7c81ee9
New import info flash (#630)
* adding a new info flash on imported notebooks

* changing the imported notebook error flashes to warning level

* Update lib/livebook_web/live/session_helpers.ex

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

* adding unit tests for the flash messages and fixing put_import_flash/1 call location

* changing name of put_import_flash_messages/2 to put_import_warnings

* Update lib/livebook_web/live/home_live.ex

* formating code

Co-authored-by: José Valim <jose.valim@gmail.com>
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-10-21 23:21:54 +02:00
Matheus Cumpian 887a4ad0d1
adding a new message to close session modal (#629)
* adding a new message to close session modal when the session has a file attached to it

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

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

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-10-21 15:01:45 +02:00
Jonatan Kłosko e2e9c95880
Update hostname resolution check (#628) 2021-10-21 12:45:07 +02:00
José Valim b930d8620a
Prepare to make Explore section extensible (#626) 2021-10-20 22:27:00 +02:00
José Valim 3ab2a56924
Fix shortnames not pointing to 127.0.0.1 (#625)
Someone reported an issue where their shortname
host was not pointing to 127.0.0.1, which caused
connections to fail. Therefore we also check and
detect this case.
2021-10-20 22:02:25 +02: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 aefe8d03c8
Fix intermediate output ids to not change on finished evaluation (#622) 2021-10-20 00:32:48 +02:00
Matheus Cumpian fe77823685
Removing "Evaluate All Below" shortcut functionality (#621) 2021-10-19 23:36:44 +02:00
Matheus Cumpian 7094433b5d
Change color for aborted and queued status (#620) 2021-10-19 20:32:00 +02:00
José Valim 0b6f416bbc Improvements to notebooks that rely on distribution 2021-10-19 19:19:25 +02:00
Jonatan Kłosko 05490b43cb
Open standalone runtime ports in binary mode (#608) 2021-10-19 14:27:38 +02:00
Jonatan Kłosko 06f83def3d
Normalize session tmp directory path (#604) 2021-10-18 22:35:51 +02:00
Jonatan Kłosko a41dda9c7c
Keep static files outside priv (#602)
* Keep static files outside priv

* Override generated assets on the CI
2021-10-18 22:32:09 +02:00
Jonatan Kłosko 3a8c11cb10
Remove version from the health endpoint (#601) 2021-10-18 18:28:19 +02:00
Jonatan Kłosko 5131a9e683
Enable CORS for health check (#600) 2021-10-18 18:07:18 +02:00
José Valim 861fc3110b Remove paragraph leading to other notebooks 2021-10-16 20:53:52 +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 3ae67ede33
Add support for importing notebook from URL query parameter (#598)
* Add support for importing notebook from URL query

* Update desc

* Update URL and redirect to import form on error

* Update tests

* Remove URL scope
2021-10-16 12:23:08 +02:00
Jonatan Kłosko 06822b6e7e
Prefix base64 encoded cookie (#597) 2021-10-13 23:07:50 +02:00
Jonatan Kłosko 5dea204fc9
Fix intermittent test failures (#596)
* Bump Elixir on the CI

* Start permanent node manager in tests

* Adjust timeouts

* Make sure random node cookies are alphanumeric
2021-10-13 22:25:33 +02:00
gpopides d2cdf0a2cb
Display creation date of a session in home (#593)
* add created_at to Session struct

* test + doc enhcncement

* change format creation date function name

* use helper function to format created_at

* use mix format

* apply review suggested  changes and 2 more tests

* Store creation time in session state and sort by date by default

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-10-10 12:29:45 +02:00
Jean Carlos a13e691e44
Improvement users connected display (#591)
* 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

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2021-10-10 12:15:15 +02:00
Dimitris Zorbas 6391b65060
Fix doc typo in cell_component.ex (#592) 2021-10-09 20:20:13 +02:00
José Valim d8a7af62e7
Increase the default stack for dirty io threads (cuda requires it) (#585)
Closes #579.
2021-10-05 18:23:50 +02:00
Frank Hunleth b3df13dd77
Fix typo (#578) 2021-10-05 07:30:03 +02:00
José Valim 354aae9467
Encapsulate compile and runtime configuration (#577) 2021-10-05 00:49:01 +02:00
Jonatan Kłosko ac60aba2fb
Make it possible to configure custom plug for all requests (#576)
* Make it possible to configure custom plug for all requests

* Apply review comments

* Use fetch_env!
2021-10-05 00:44:27 +02:00
Jonatan Kłosko 25d90eabf1
Add public function for converting .livemd to .exs (#573) 2021-10-05 00:26:41 +02:00
Jonatan Kłosko a57927ec2a
Extend ANSI code parser to handle multiple arguments (#569)
* Extend ANSI code parser to handle multiple arguments

* Update changelog
2021-09-30 17:57:14 +02:00