* 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
* 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>
* 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
* 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>
* 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
* Add version section to settings
* Add System Settings Version subsection
* Apply suggestions from code review
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
* Introduce broadcast communication from runtime
* Return broadcast target from group leader
* Increase timeout
* Make the channel test async
* Decouple base topic and ref
* 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
* 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
* 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
* Fix error on back after closing session
Clicking the browsers back button after closing a session
resulted in an error since it was trying to close an already closed notebook
* Overwrite back history on section delete
* Make cell status italic when content changed
* Add Ctrl+Shift+Enter for evaluating all cells
* Improve the behaviour of evaluating all cells
* Fix typo
* 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>
* 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
* 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>
* 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
* 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>
* Move notebook export menu item
* Add action for clearing evaluation and outputs
* Test data operation
* Update wording
* Update wording
* Reorder menu items
* 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
* 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>
* 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 ;)
* 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>
* 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>
* 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>
* 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>
* 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>
* Use Phoenix.Tracker to keep track of sessions within the cluster
* Apply review comments
* Cleanup topics and updates
* Update lib/livebook_web/live/session_live.ex
* 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>
* Add option to export outputs in Live Markdown
* Add outputs option to Live Markdown export tab
* Adjust import to handle outputs
* Apply review comments
* 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>
* Introduce branching sections
* parent_index -> branch_parent_index
* Flip the branch icon
* Don't mark branching sections as aborted if the main flow crashes
* Outline more details about branching sections in the Elixir and Livebook notebook
* Add branch indicator to the sections sidebar
* Update phoenix deps
* Update reference to LiveDashboard encode_pid
* Fix form input id references
* Move to HEEx
* Update back to filesystem LV npm package
* Further HEEx rewrites
* Refactor icons into function components
* .html.leex -> .html.heex
* Further refactoring
* Move render helpers into function components
* Add doctype back
* Further refactoring
* Refactor cell component
* Further refactoring
* Compose sidebar using function components
* Rewrite notebook card component as function component
* Fruther refactoring
* Fix race condition in runtime tests
* Rewrite tooltips into function component
* Update Tailwind purge rules
* Revert "Rewrite tooltips into function component"
This reverts commit bd6ca8f0b5.
* Refactor conditional tooltip
* Implement cells bin
* Temporarily keep cells source
* Send complete bin entries from session to clients when a cell gets removed
* Polish styles
* Hydrate bin entries on section deletion as well
* Add password input
* Save empty string for password in .livemd file
* Update lib/livebook_web/live/session_live/cell_component.ex
* Changed radio button it to select
* Changed radio button it to select
* Moved select it to the top
* Keep the elements in the select ordered
* Update lib/livebook_web/helpers.ex
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
* Update lib/livebook_web/live/session_live/input_cell_settings_component.ex
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
* Update lib/livebook_web/live/session_live/input_cell_settings_component.ex
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
* Add textarea input
* Add textarea input
* Added operation in the io_proxy to IO.getn
* Update lib/livebook/evaluator/io_proxy.ex
Co-authored-by: José Valim <jose.valim@gmail.com>
* Update lib/livebook_web/live/session_live/cell_component.ex
Co-authored-by: José Valim <jose.valim@gmail.com>
* Update lib/livebook_web/live/session_live/cell_component.ex
Co-authored-by: José Valim <jose.valim@gmail.com>
* Support for utf8 characters in getn function
* Support for utf8 characters in getn function
* Perform test with special characters
* Accepting latin1 and unicode values
* Update lib/livebook/evaluator/io_proxy.ex
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
* Added split_at function for better performance
* Update lib/livebook/evaluator/io_proxy.ex
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
Co-authored-by: José Valim <jose.valim@gmail.com>
* Add password input
* Save empty string for password in .livemd file
* Update lib/livebook_web/live/session_live/cell_component.ex
* Changed radio button it to select
* Changed radio button it to select
* Moved select it to the top
* Keep the elements in the select ordered
* Update lib/livebook_web/helpers.ex
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
* Update lib/livebook_web/live/session_live/input_cell_settings_component.ex
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
* Update lib/livebook_web/live/session_live/input_cell_settings_component.ex
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
* Display the time in seconds
Show the evaluation time next to the cell indicator
* Test session data
* Send evaluation time to session
Start the evaluation time inside the evaluator, display the time in seconds
or milliseconds.
The output is not a string but a map
* Add metadata to evaluation_response
* Wrap the evaluation indicator in a tooltip
• Add metadata argument to the evaluation_response message
• Use a tooltip to display the evaluation time
* Display the toolip below the indicator
* Remove the evaluation start time
* Make the tooltip optional
* Rename finish_cell_evaluation
* Evaluator tests
* Update test to accespt metadata
* Pass the evaluated time as a third argument
* Make status tooltip more generic
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>