Commit graph

471 commits

Author SHA1 Message Date
Joe Martinez 961581bfc7
bump phoenix_live_view to 0.17.6 (#919)
* bump phoenix_live_view to 0.17.6

* revert change to static dir

* fix deprecation warning
2022-01-24 11:30:07 +01:00
Wojtek Mach 97c64cedb8
Open Livebook homepage on :reopen_app event (#928) 2022-01-23 20:46:30 +01:00
Cristine Guadelupe 930b3293f0
Doctests for format bytes (#921)
* Doctests for format bytes

* Update lib/livebook/utils.ex

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

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2022-01-22 20:04:20 -03:00
Cristine Guadelupe 4f197698ae
Favicon as png to work on Safari (#920) 2022-01-22 18:15:06 -03:00
Cristine Guadelupe c2feceba37
Redesign the memory info chart on home (#918) 2022-01-22 17:46:53 -03:00
José Valim c58ab447e5 Compute memory information on every session list render 2022-01-22 18:30:37 +01:00
Jonatan Kłosko e9ea88e180
Fix race conditions in message scheduling (#916)
* Fix race conditions in message scheduling

* Flush already fired timer message

* Move unscheduling to a separate function
2022-01-22 18:23:16 +01:00
José Valim 70a9a95d4e
Improvements to memory tracking (#917)
* Address race condition on cancel timer
* Include memory measurement as part of evaluation metadata
* Move periodic resource computation to a single process
* Have a explicit call out for total memory
2022-01-22 17:17:20 +01:00
Cristine Guadelupe 6180bb1ff2
Track memory usage - visualization (#898)
* Utils to fetch and format system and node memory usage

* Order by memory

* Track memory on session

* Show memory usage on runtime sidebar

* Shows memory usage percentage on home

* Layout adjustments

* Sidebar design adjustments to match Figma

* Home design adjustments to show the memory information

* Move memory calculations to utils

* Shows disconnected notebooks as consuming 0mb on home

* Simplifies the data structure of memory usage

* Node memory tracker on runtime

* Clean up

* Renames node memory to runtime memory

* Standardizes the data structure of memory usage

* Sends evaluation_finished to the runtime to update the memory usage after an evaluation

* Fix: The evalutor does not notify when there is no notify_to option

* Adds a test with the notify_to option to the evaluator

* Documents the notify_to option

* Minor fixes on runtime and runtime_server

* Minor fixes on sessions

* Minor adjustments

* Updates docs and specs on Utils

* Minor adjustments on session_live

* Fix total memory used by sessions on home

* Put duplicated functions on helpers

* Better filter by memory

* Fix the tooltip text for memory information on sidebar

* Minor alignment adjustment on home
2022-01-21 19:24:47 -03:00
José Valim bd3363acde
Allow LIVEBOOK_PORT to be set to 0 for a random port (#906) 2022-01-21 09:18:02 +01:00
Jonatan Kłosko 5411035937
Remove unnecessary scrollbar in Mix runtime modal (#903) 2022-01-20 11:35:54 +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
José Valim 112b47908d
Small fixes (#896)
* Hide app builder unless target matches
* Fix compile-time warnings on Elixir v1.14+
2022-01-19 22:20:05 +01:00
Jonatan Kłosko 81c9871802
Release 0.5.0 (#895)
* Update Kino version

* Bump version
2022-01-19 19:58:54 +01:00
Jonatan Kłosko 5c1c61d0f2
Update broadcast_event in Kino.JS.Live guide (#894) 2022-01-19 19:39:57 +01:00
José Valim b9b901648c
Further improvements to pong and custom kino notebooks (#886) 2022-01-19 19:01:27 +01:00
Jonatan Kłosko 6aaf1d5b58
Fix output ambiguity in livemd import/export (#892)
* Fix output ambiguity in livemd import/export

* Update test/livebook/live_markdown/import_test.exs

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

Co-authored-by: José Valim <jose.valim@dashbit.co>
2022-01-19 18:27:56 +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 89ca95be10
Reuse DOM elements when replacing frame outputs (#881)
* Reuse DOM elements when replacing frame outputs

* Keep less persistent indices
2022-01-18 15:13:50 +01:00
Jonatan Kłosko 6e570ed05b
Improve branch selection menu (#882) 2022-01-18 15:12:09 +01:00
Wojtek Mach e8c80bf6a7
Add Mac app release (#865) 2022-01-17 17:34:38 +01:00
José Valim 4d79706c01
Revamp Explorer section for Kino (#879)
Pong and custom Kinos chapters are still pending.
2022-01-17 17:14:25 +01:00
Jonatan Kłosko fe0bf660a2
Remove outputs from the page on erase outputs (#878) 2022-01-17 17:13:29 +01:00
José Valim 0c61f4dec0 Normalize explorer fonts 2022-01-17 17:11:06 +01:00
Jonatan Kłosko d450444f04 Fix global indicator colors 2022-01-17 14:19:20 +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
Jonatan Kłosko 6615422613
Restructure frame output (#857)
* Restructure frame output

* Reboot JSComponent when ref changes

* Prune outputs from LV, handle frame and stdout updates via component messaging

* Keep ANSI modifiers as keyword list

* Don't re-render pruned outputs

* Improve empty frame styling

* Use more specific id

* Add clarification on trailing CR

* Handle output group borders with CSS

* Keep only relevant outputs in memory

* Adjust borders

* Update lib/livebook/live_markdown/import.ex

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

* Apply review comments

Co-authored-by: José Valim <jose.valim@dashbit.co>
2022-01-16 20:37:00 +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 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
José Valim dbe4fdeda4
Add shutdown button (#862)
The button only appears on interactive mode because
we assume embedded mode is running inside a release
or similar.
2022-01-13 12:22:34 +01:00
José Valim a1c5521115
Fix about section in settings (#861) 2022-01-13 12:02:06 +01:00
Jonatan Kłosko fc20b662ce Fix dashboard path 2022-01-12 20:16:27 +01:00
Julian Gomez bf94998d83
Add current version section to settings page (#851)
* Add version section to settings

* Add System Settings Version subsection

* Apply suggestions from code review

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2022-01-12 13:28:10 +01:00
Milo Lee 8ba0857369
Show deprecated and since doc metadata on mouse over (#852)
* Show deprecated and since doc metadata on mouse over

* Make deprecated indication stronger

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

Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
2022-01-11 19:18:47 +01: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
Daniel Kukula 618593158d
Set page name when notebook is renamed (#844)
* override tab name when notebook is renamed

* set page_title in after operation function

* add custom page title to all live pages

* Revert "override tab name when notebook is renamed"

This reverts commit 90303e08a8.

* add test for update
2022-01-06 18:37:55 +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 6d82e9e53d
Remove output border from dynamic JS widgets (#842)
* Remove output border from dynamic JS widgets

* Show borders on regular text outputs only

* Increase assertion timeout
2022-01-04 13:28:31 +01:00
Jonatan Kłosko 53869371c2
Update dependencies (#838)
* Update Elixir deps

* Update JS dependencies

* Bump Tailwind to v3

* Update Hex badge color

* Set SameSite for the session cookie
2021-12-29 22:06:19 +01:00
Jonatan Kłosko d5d4e739d1
Improve errors on reconnecting Mix runtime (#837) 2021-12-29 14:04:51 +01:00
Jonatan Kłosko 145f8a6992
Focus fixes (#831) 2021-12-28 19:42:04 +01:00
Jonatan Kłosko 5670e5ccb6
Group Kino notebooks under their own section (#830) 2021-12-27 21:01:31 +01:00
Lee Jarvis 4bacba6b1d
Remove delete prompt for empty sections (#829)
* Remove delete prompt for empty sections

If a section has no cell views or only empty cell views, avoid
prompting the user to delete the section and just go ahead and delete
it.

Closes #800

* Move delete prompt logic to SessionLive

This avoids creating two separate paths in the view for displaying
delete buttons (triggering either a prompt, or deleting the empty
section).

Instead, the `delete_section` callback is always triggered, and the
"display prompt" logic is kept here.

Couple of things I'm unsure about so will discuss on the PR.

See https://github.com/livebook-dev/livebook/pull/829#discussion_r775560671

* Check only against empty cell list in `delete_section`

* Fix indentation

* Handle section not existing on deletion

* Match empty cell list in case expression

Also explicitly set the section and then re-use it. I think this is a
bit nicer than just matching against the empty list since it matches
the following match too
2021-12-27 18:42:27 +01:00
Jonatan Kłosko 8622ae2ec3
Add support for exporting JS output (#826) 2021-12-27 13:56:55 +01:00
Benjamin Philip fc3fad6543
Disable Choose button if draft file is a directory (#823)
* Disable Choose button if draft file is a directory

* Fix warnings

* Decide if choose is disabled on handle info

* Revert "Decide if choose is disabled on handle info"

This reverts commit 43a2cbc5ea.

* Use the disabled attribute
2021-12-24 23:53:48 +01:00