Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CompatHelper: bump compat for RelocatableFolders to 1, (keep existing compat) #319

Open
wants to merge 116 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
fda5768
Merge branch 'watch-notebook-file-1' of https://github.com/fonsp/Plut…
disberd May 31, 2021
40f4ff0
Merge branch 'notebook-change' into main
disberd Jun 9, 2021
1296666
Allow fancy paste in the cell input
disberd Jun 9, 2021
3fb5198
Merge v15.0 from Pluto
fonsp Jul 6, 2021
f0e3422
Merge branch 'main' of https://github.com/fonsp/Pluto.jl into main
disberd Jul 7, 2021
ce80009
Merge branch 'main' of https://github.com/fonsp/Pluto.jl into main
disberd Jul 27, 2021
f2526f1
Merge branch 'main' of https://github.com/fonsp/Pluto.jl into main
disberd Aug 4, 2021
446d33e
Merge remote-tracking branch 'original/main'
disberd Sep 7, 2021
aca5b17
Merge remote-tracking branch 'original/main'
disberd Sep 12, 2021
9c873c0
Merge branch 'main' of https://github.com/fonsp/Pluto.jl
disberd Sep 26, 2021
829ae39
Almost Markdown
pankgeorg Oct 3, 2021
9e9a542
how about HTML
pankgeorg Oct 3, 2021
5d0ca9c
Better HTML/MD
pankgeorg Oct 3, 2021
3e90fa9
Add js (not working)
pankgeorg Oct 3, 2021
94a751a
get/set api
pankgeorg Oct 3, 2021
319297e
Broken again
pankgeorg Oct 3, 2021
9e8c379
Remove quotes from parsed strings
pankgeorg Oct 3, 2021
ce3ef17
Small Cleanup
pankgeorg Oct 3, 2021
423ffc3
OOps
pankgeorg Oct 3, 2021
86e7a3f
re-implement notebook exclusive by file comments in CM6
disberd Oct 4, 2021
7ea64ba
re-implement notebook exclusive by file comments in CM6
disberd Oct 4, 2021
e304011
Correctly handle textarea paste in CM6
disberd Oct 5, 2021
f455a8a
Merge branch 'patch-3' of https://github.com/disberd/Pluto.jl into CM…
disberd Oct 5, 2021
9f8c2ff
Merge branch 'CM6-exclusive-old' of https://github.com/disberd/Pluto.…
disberd Oct 5, 2021
d113d48
Merge remote-tracking branch 'origin/patch-4' into CM6-exclusive-old
disberd Oct 5, 2021
cf5f398
Correct distribution of CM6
pankgeorg Oct 5, 2021
706c4f0
merge mixedParselezer
disberd Oct 5, 2021
2f3755d
Point static export to the files from this branch/repo
disberd Oct 5, 2021
965033f
Add support for SQL
pankgeorg Oct 5, 2021
4b6d291
New colors 🟢🟠🟡🟢🔵🟣🟤🔴⭕😶
pankgeorg Oct 5, 2021
7d3a28c
Disable the julia parser on html and md string macros
pankgeorg Oct 12, 2021
4b057a7
Fix issue with wrong overlays on macros called without a fn-like call
pankgeorg Oct 12, 2021
16401a6
Add support for python (@py_str), @javascript and mermaid
pankgeorg Oct 13, 2021
18a807b
Fix big nested interpolations
pankgeorg Oct 13, 2021
82e27ac
Clean up console.logs
pankgeorg Oct 13, 2021
b9ae62a
Merge remote-tracking branch 'original/mixedParser-lezer' into CM6-ex…
disberd Oct 14, 2021
c98847f
Merge remote-tracking branch 'original/main' into CM6-exclusive-old
disberd Oct 19, 2021
971ae0f
Put back the setValue to the cell
disberd Oct 20, 2021
c97bf0e
Merge remote-tracking branch 'original/main' into CM6-exclusive-old
disberd Oct 20, 2021
91340c5
Merge remote-tracking branch 'original/main' into CM6-exclusive-old
disberd Oct 22, 2021
98d3ce3
Merge remote-tracking branch 'original/main' into CM6-exclusive-old
disberd Oct 27, 2021
54ef0c9
Merge remote-tracking branch 'original/main' into CM6-exclusive-old
disberd Oct 28, 2021
2dbbb94
Merge remote-tracking branch 'original/main' into CM6-exclusive-old
disberd Nov 4, 2021
31d892a
Add paste image
disberd Nov 3, 2021
11cf8d7
Merge remote-tracking branch 'original/main' into CM6-exclusive-old
disberd Nov 5, 2021
d5437f6
Merge remote-tracking branch 'original/main' into CM6-exclusive-old
disberd Nov 5, 2021
18a8284
Merge remote-tracking branch 'original/main' into CM6-exclusive-old
disberd Nov 10, 2021
a531895
😵‍💫 Allow cyclic recursive functions
fonsp Nov 15, 2021
b13fb67
All tests pass yay
fonsp Nov 15, 2021
8a69619
soft edges
Pangoraw Nov 2, 2021
ac33167
make soft edges break on dependencies cycle
Pangoraw Nov 15, 2021
2608772
exits
Pangoraw Nov 15, 2021
dc753a6
add tests
Pangoraw Nov 15, 2021
ce0816c
cleanup
Pangoraw Nov 15, 2021
5e506bc
Merge remote-tracking branch 'original/main' into CM6-exclusive-old
disberd Nov 16, 2021
28eddb4
important
fonsp Nov 16, 2021
da68636
Merge branch 'main' into cyclic_combined
fonsp Nov 16, 2021
3bb4be9
don't re-enter already explored cell
Pangoraw Nov 21, 2021
775fc9d
Merge remote-tracking branch 'original/main' into CM6-exclusive-old
disberd Nov 25, 2021
b349f6c
Merge remote-tracking branch 'origin/main' into cyclic_combined
Pangoraw Nov 25, 2021
3e365c8
lets goo
Pangoraw Nov 25, 2021
afd99c1
only help when really needed
Pangoraw Nov 25, 2021
3c6dac8
simpler
Pangoraw Nov 25, 2021
0756e84
huh too simple
Pangoraw Nov 25, 2021
203a345
Comment out using Markdown and InteractiveUtils
disberd Nov 26, 2021
cbc1114
Optional exclusive_flag val as second argument of toggle_notebook_exc…
disberd Nov 26, 2021
3d4117a
Automatically make certain cells exclusive
disberd Nov 26, 2021
04ac2fc
Added some more exclusion conditions
disberd Nov 26, 2021
e885173
Added cells starting with `let` to exclusion
disberd Nov 26, 2021
557b6ae
ex explorer
Pangoraw Nov 26, 2021
b2cae2a
Merge remote-tracking branch 'original/cyclic_combined' into cyclic_c…
disberd Nov 26, 2021
cbaadd8
Make excluded macro regexps match the exact macro name
disberd Nov 27, 2021
d21a25b
Merge remote-tracking branch 'original/main' into CM6-exclusive-old
disberd Nov 28, 2021
7b7637b
Added auto-hide of cells that contains md header
disberd Nov 30, 2021
dc3b248
add dictbonds filters for excluding cells
disberd Dec 7, 2021
d1cfa4f
Merge remote-tracking branch 'original/main' into CM6-exclusive-old
disberd Dec 7, 2021
2b948c9
Merge remote-tracking branch 'original/main' into CM6-exclusive-old
disberd Dec 15, 2021
4e52f9b
Merge remote-tracking branch 'original/main' into CM6-exclusive-old
disberd Dec 17, 2021
b2ff32b
Merge remote-tracking branch 'original/main' into CM6-exclusive-old
disberd Jan 3, 2022
ca24936
Merge remote-tracking branch 'original/main' into CM6-exclusive-old
disberd Jan 24, 2022
16ef987
Merge branch 'CM6-exclusive-old'
disberd Jan 24, 2022
bf15281
Update frontend location
disberd Jan 24, 2022
51e522a
re-enable html mixed parsing
disberd Jan 25, 2022
e03d730
Make notebook-exclusive decoration theme-aware
disberd Jan 25, 2022
2082888
Merge remote-tracking branch 'original/main'
disberd Feb 2, 2022
22bed26
Merge remote-tracking branch 'original/main'
disberd Feb 4, 2022
c53d258
Merge remote-tracking branch 'original/main'
disberd Feb 7, 2022
5b0b1e3
Merge branch 'main' of https://github.com/fonsp/Pluto.jl
disberd Mar 4, 2022
05625b4
Merge branch 'main' of https://github.com/fonsp/Pluto.jl
disberd Mar 8, 2022
f659cf9
Add function to update disabled_cells_dependency
disberd Aug 5, 2022
897604e
update disabled/skipped dependency inside load_notebook
disberd Aug 5, 2022
5b59062
add a test
disberd Aug 5, 2022
cd521f8
append macrocall cell_id inside macro expr
disberd Aug 6, 2022
2c67ae5
Revert "Add function to update disabled_cells_dependency"
disberd Aug 7, 2022
bd88705
Revert "update disabled/skipped dependency inside load_notebook"
disberd Aug 7, 2022
6eaa0fe
Revert "add a test"
disberd Aug 7, 2022
3b3e08b
First implementation of custom unregistered/dev packages
disberd Aug 10, 2022
4a083a6
Correctly handle jump to link in stacktraces
disberd Aug 10, 2022
1850d6e
Fix compatibility with julia 1.6
disberd Aug 10, 2022
a197936
Attach hljs to the window
disberd Aug 13, 2022
64c4d69
2nd implementation of advanced PkgManager
disberd Aug 15, 2022
cf76ddf
whitespaces
disberd Aug 15, 2022
32ae572
Fix pre-existing name typo
disberd Aug 15, 2022
b100ee0
Fix error with "stdlib" version
disberd Aug 15, 2022
aead343
make pkg_str name consistent
disberd Aug 15, 2022
fab15c1
fix package_name not being used for validation
disberd Aug 15, 2022
645af8a
Go back to tracking vanilla Pluto main
disberd Aug 15, 2022
c7ddff9
Merge remote-tracking branch 'origin/expose_hljs'
disberd Aug 15, 2022
d0bef9e
Merge branch 'delete_macro_methods'
disberd Aug 15, 2022
2b83c95
Merge branch 'advanced_pkg_manager'
disberd Aug 15, 2022
9b41976
move attachment to window in the constructor
disberd Aug 16, 2022
f4849e9
move LineNumberNode processing to replace_pluto_properties_in_expr
disberd Aug 17, 2022
def58d1
add tests for methods deletion from macros
disberd Aug 17, 2022
95c3b8d
Merge branch 'hljs-export'
disberd Aug 17, 2022
8be9de8
Merge branch 'delete_macro_methods'
disberd Aug 17, 2022
f84a74d
CompatHelper: bump compat for RelocatableFolders to 1, (keep existing…
Nov 5, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,19 @@ HypertextLiteral = "0.7, 0.8, 0.9"
MIMEs = "0.1"
MsgPack = "1.1"
PrecompileSignatures = "3"
RelocatableFolders = "0.1, 0.2, 0.3"
RelocatableFolders = "0.1, 0.2, 0.3, 1"
Tables = "1"
URIs = "1.3"
julia = "^1.6"

[extras]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Memoize = "c03570c3-d221-55d1-a50c-7939bbd78826"
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"

[targets]
test = ["DataFrames", "OffsetArrays", "Random", "Sockets", "Test", "TimerOutputs"]
test = ["DataFrames", "OffsetArrays", "Random", "Sockets", "Test", "TimerOutputs", "Memoize"]
18 changes: 16 additions & 2 deletions frontend/components/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import * as preact from "../imports/Preact.js"
import immer, { applyPatches, produceWithPatches } from "../imports/immer.js"
import _ from "../imports/lodash.js"

import hljs from "../imports/highlightjs.js"

import { empty_notebook_state, set_disable_ui_css } from "../editor.js"
import { create_pluto_connection } from "../common/PlutoConnection.js"
import { init_feedback } from "../common/Feedback.js"
Expand Down Expand Up @@ -169,13 +171,21 @@ const first_true_key = (obj) => {
* @property {number} precedence_heuristic
*/

/**
* @typedef PkgData
* @property {string} installed_version
* @property {string} pkg_str The equivalent PkgREPL string to be used to install the package
* @property {boolean} has_custom_pkg_str True if the package in question has a non-standard pkg_str, where standard is `add $(package_name)`
* @property {boolean} is_dev True if the package has en added with Pkg.develop rather than Pkg.add
*/

/**
* @typedef NotebookPkgData
* @type {{
* enabled: boolean,
* restart_recommended_msg: string?,
* restart_required_msg: string?,
* installed_versions: { [pkg_name: string]: string },
* installed_packages: { [pkg_name: string]: PkgData },
* terminal_outputs: { [pkg_name: string]: string },
* busy_packages: string[],
* instantiated: boolean,
Expand Down Expand Up @@ -617,7 +627,7 @@ export class Editor extends Component {
/** This actions avoids pushing selected cells all the way down, which is too heavy to handle! */
get_selected_cells: (cell_id, /** @type {boolean} */ allow_other_selected_cells) =>
allow_other_selected_cells ? this.state.selected_cells : [cell_id],
get_avaible_versions: async ({ package_name, notebook_id }) => {
get_available_versions: async ({ package_name, notebook_id }) => {
const { message } = await this.client.send("nbpkg_available_versions", { package_name: package_name }, { notebook_id: notebook_id })
return message.versions
},
Expand Down Expand Up @@ -1211,6 +1221,10 @@ patch: ${JSON.stringify(
// and don't prevent the unload
}
})

// Attach the highlighter object to the window to allow custom highlighting from the frontend. See https://github.com/fonsp/Pluto.jl/pull/2244
//@ts-ignore
window.hljs = hljs
}

componentDidMount() {
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/ErrorMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { html, useContext, useState } from "../imports/Preact.js"
const StackFrameFilename = ({ frame, cell_id }) => {
const sep_index = frame.file.indexOf("#==#")
if (sep_index != -1) {
const frame_cell_id = frame.file.substr(sep_index + 4)
const frame_cell_id = frame.file.substr(sep_index + 4, 36)
const a = html`<a
href="#"
onclick=${(e) => {
Expand Down
52 changes: 32 additions & 20 deletions frontend/components/PkgStatusMark.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ const can_update = (installed, available) => {
* @property {string?} chosen_version
* @property {boolean} busy
* @property {boolean} offer_update
* @property {boolean} custom_pkg_str
* @property {boolean} dev_pkg
*/

/**
Expand All @@ -41,8 +43,11 @@ export const package_status = ({ nbpkg, package_name, available_versions, is_dis
let hint_raw = "error"
let hint = html`error`
let offer_update = false
const chosen_version = nbpkg?.installed_versions[package_name] ?? null
const pkg_data = nbpkg?.installed_packages[package_name]
const chosen_version = pkg_data?.installed_version ?? null
const busy = (nbpkg?.busy_packages ?? []).includes(package_name) || !(nbpkg?.instantiated ?? true)
const custom_pkg_str = pkg_data?.has_custom_pkg_str ?? false
const dev_pkg = pkg_data?.is_dev ?? false

if (is_disable_pkg) {
const f_name = package_name
Expand All @@ -62,19 +67,25 @@ export const package_status = ({ nbpkg, package_name, available_versions, is_dis
is installing...`
} else {
status = "installed"
hint_raw = `${package_name} (v${chosen_version}) is installed in the notebook.`
let custom_str = dev_pkg
? "\nThis package has been installed with a custom command and is tracking a path for development."
: custom_pkg_str
? "\nThis package has been installed using a custom command."
: ""
hint_raw = `${package_name} (v${chosen_version}) is installed in the notebook.${custom_str}`
hint = html`<header><b>${package_name}</b> <pkg-version>v${chosen_version}</pkg-version></header>
is installed in the notebook.`
is installed in the notebook.${custom_str ? html`<i>${custom_str}</i>` : ""}`
offer_update = can_update(chosen_version, available_versions)
}
}
} else {
if (available_versions != null && _.isArray(available_versions)) {
if (available_versions.length === 0) {
status = "not_found"
hint_raw = `The package "${package_name}" could not be found in the registry. Did you make a typo?`
hint_raw = `The package "${package_name}" could not be found in the registry. Did you make a typo?\nIf you want to install an un-registered package, use the specific button in the PkgPopup`
hint = html`The package <em>"${package_name}"</em> could not be found in the registry.
<section><em>Did you make a typo?</em></section>`
<section><em>Did you make a typo?</em></section>
<em>If you want to install an un-registered package, use the button with the console icon.</em>`
} else {
status = "will_be_installed"
hint_raw = `${package_name} (v${_.last(available_versions)}) will be installed in the notebook when you run this cell.`
Expand All @@ -84,7 +95,7 @@ export const package_status = ({ nbpkg, package_name, available_versions, is_dis
}
}

return { status, hint, hint_raw, available_versions, chosen_version, busy, offer_update }
return { status, hint, hint_raw, available_versions, chosen_version, busy, offer_update, custom_pkg_str, dev_pkg }
}

/**
Expand All @@ -99,32 +110,33 @@ export const PkgStatusMark = ({ package_name, pluto_actions, notebook_id, nbpkg
const [available_versions, set_available_versions] = useState(/** @type {string[]?} */ (null))

useEffect(() => {
let available_version_promise = pluto_actions.get_avaible_versions({ package_name, notebook_id }) ?? Promise.resolve([])
let available_version_promise = pluto_actions.get_available_versions({ package_name, notebook_id }) ?? Promise.resolve([])
available_version_promise.then((available_versions) => {
set_available_versions(available_versions)
})
}, [package_name])

const { status, hint_raw } = package_status({
const { status, hint_raw, custom_pkg_str, dev_pkg } = package_status({
nbpkg: nbpkg,
package_name: package_name,
is_disable_pkg: false,
available_versions,
})
let class_str =
status === "busy"
? "busy"
: status === "installed"
? "installed"
: status === "not_found"
? "not_found"
: status === "will_be_installed"
? "will_be_installed"
: ""
custom_pkg_str && (class_str += " custom_pkg_str")
dev_pkg && (class_str += " dev_pkg")

return html`
<pkg-status-mark
title=${hint_raw}
className=${status === "busy"
? "busy"
: status === "installed"
? "installed"
: status === "not_found"
? "not_found"
: status === "will_be_installed"
? "will_be_installed"
: ""}
>
<pkg-status-mark title=${hint_raw} className=${class_str}>
<button
onClick=${(event) => {
open_pluto_popup({
Expand Down
30 changes: 27 additions & 3 deletions frontend/components/Popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { useDebouncedTruth } from "./RunArea.js"
// This funny thing is a way to tell parcel to bundle these files..
// Eventually I'll write a plugin that is able to parse html`...`, but this is it for now.
// https://parceljs.org/languages/javascript/#url-dependencies
export const terminal_icon = new URL("https://cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/terminal-outline.svg", import.meta.url)
export const arrow_up_circle_icon = new URL("https://cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/arrow-up-circle-outline.svg", import.meta.url)
export const document_text_icon = new URL("https://cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/document-text-outline.svg", import.meta.url)
export const help_circle_icon = new URL("https://cdn.jsdelivr.net/gh/ionic-team/ionicons@5.5.1/src/svg/help-circle-outline.svg", import.meta.url)
Expand Down Expand Up @@ -117,7 +118,7 @@ const PkgPopup = ({ notebook, recent_event, clear_recent_event }) => {
if (recent_event == null) {
set_pkg_status(null)
} else if (recent_event?.type === "nbpkg") {
;(pluto_actions.get_avaible_versions({ package_name: recent_event.package_name, notebook_id: notebook.notebook_id }) ?? Promise.resolve([])).then(
;(pluto_actions.get_available_versions({ package_name: recent_event.package_name, notebook_id: notebook.notebook_id }) ?? Promise.resolve([])).then(
(versions) => {
if (still_valid) {
set_pkg_status(
Expand Down Expand Up @@ -146,17 +147,29 @@ const PkgPopup = ({ notebook, recent_event, clear_recent_event }) => {

const [showterminal, set_showterminal] = useState(false)

const busy = recent_event != null && ((notebook.nbpkg?.busy_packages ?? []).includes(recent_event.package_name) || !(notebook.nbpkg?.instantiated ?? true))
const package_name = recent_event?.package_name
const default_pkg_str = `add ${recent_event.package_name}`
const pkg_str = notebook.metadata?.custom_pkgstrs?.[package_name] ?? default_pkg_str

const busy = recent_event != null && ((notebook.nbpkg?.busy_packages ?? []).includes(package_name) || !(notebook.nbpkg?.instantiated ?? true))

const debounced_busy = useDebouncedTruth(busy, 2)
useEffect(() => {
set_showterminal(debounced_busy)
}, [debounced_busy])

const terminal_value = notebook.nbpkg?.terminal_outputs == null ? "Loading..." : notebook.nbpkg?.terminal_outputs[recent_event?.package_name] ?? ""
const terminal_value = notebook.nbpkg?.terminal_outputs == null ? "Loading..." : notebook.nbpkg?.terminal_outputs[package_name] ?? ""

const showupdate = pkg_status?.offer_update ?? false

async function try_update_pkgstr(message, _default) {
const new_pkg_str = prompt(message, _default) ?? pkg_str
const result = await pluto_actions.send("pkg_str", { package_name: package_name, pkg_str: new_pkg_str }, { notebook_id: notebook.notebook_id })
if (result.message.errored) {
try_update_pkgstr(result.message.message, new_pkg_str)
}
}

// <header>${recent_event?.package_name}</header>
return html`<pkg-popup
class=${cl({
Expand All @@ -167,6 +180,17 @@ const PkgPopup = ({ notebook, recent_event, clear_recent_event }) => {
>
${pkg_status?.hint ?? "Loading..."}
<div class="pkg-buttons">
<a
class="pkg-str"
target="_blank"
title="Use custom PkgREPL string"
href="#"
onClick=${(e) => {
e.preventDefault()
try_update_pkgstr("Write the custom string to install the package", pkg_str)
}}
><img alt="💻" src=${terminal_icon} width="17"
/></a>
<a
class="pkg-update"
target="_blank"
Expand Down
12 changes: 12 additions & 0 deletions frontend/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -1748,6 +1748,18 @@ pkg-status-mark.disable_pkg > button > span::after {
filter: var(--image-filters);
}

pkg-status-mark.custom_pkg_str > button > span::after {
opacity: 0.6;
/* The filter comes from using https://codepen.io/sosuke/pen/Pjoqqp with a target color of #f5980c*/
filter: invert(68%) sepia(24%) saturate(3205%) hue-rotate(353deg) brightness(97%) contrast(99%);
}

pkg-status-mark.custom_pkg_str.dev_pkg > button > span::after {
opacity: 0.6;
/* The filter comes from using https://codepen.io/sosuke/pen/Pjoqqp with a target color of #d428eb*/
filter: invert(31%) sepia(61%) saturate(4615%) hue-rotate(278deg) brightness(95%) contrast(108%);
}

pluto-popup {
display: block;
position: absolute;
Expand Down
6 changes: 3 additions & 3 deletions src/notebook/Notebook.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import UUIDs: UUID, uuid1
import .ExpressionExplorer: SymbolsState, FunctionNameSignaturePair, FunctionName
import .Configuration
import .PkgCompat: PkgCompat, PkgContext
import .PkgCompat: PkgCompat, PkgContext, PkgData
import Pkg
import TOML

Expand Down Expand Up @@ -51,7 +51,7 @@ Base.@kwdef mutable struct Notebook
nbpkg_restart_required_msg::Union{Nothing,String}=nothing
nbpkg_terminal_outputs::Dict{String,String}=Dict{String,String}()
nbpkg_busy_packages::Vector{String}=String[]
nbpkg_installed_versions_cache::Dict{String,String}=Dict{String,String}()
nbpkg_installed_pkgdata_cache::Dict{String,PkgData}=Dict{String,PkgData}()

process_status::String=ProcessStatus.starting
wants_to_interrupt::Bool=false
Expand Down Expand Up @@ -111,4 +111,4 @@ create_notebook_metadata(metadata::Dict{String,<:Any}) = merge(DEFAULT_NOTEBOOK_
get_metadata(cell::Cell)::Dict{String,Any} = cell.metadata
get_metadata(notebook::Notebook)::Dict{String,Any} = notebook.metadata
get_metadata_no_default(cell::Cell)::Dict{String,Any} = Dict{String,Any}(setdiff(pairs(cell.metadata), pairs(DEFAULT_CELL_METADATA)))
get_metadata_no_default(notebook::Notebook)::Dict{String,Any} = Dict{String,Any}(setdiff(pairs(notebook.metadata), pairs(DEFAULT_NOTEBOOK_METADATA)))
get_metadata_no_default(notebook::Notebook)::Dict{String,Any} = Dict{String,Any}(setdiff(pairs(notebook.metadata), pairs(DEFAULT_NOTEBOOK_METADATA)))
3 changes: 2 additions & 1 deletion src/notebook/saving and loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -301,13 +301,14 @@ function load_notebook_nobackup(@nospecialize(io::IO), @nospecialize(path::Abstr
k ∈ appeared_order
end

custom_pkgstrs = get(notebook_metadata, "custom_pkgstrs", Dict{String, Any}())
Notebook(;
cells_dict=appeared_cells_dict,
cell_order=appeared_order,
topology=_initial_topology(appeared_cells_dict, appeared_order),
path=path,
nbpkg_ctx=nbpkg_ctx,
nbpkg_installed_versions_cache=nbpkg_cache(nbpkg_ctx),
nbpkg_installed_pkgdata_cache=nbpkg_cache(nbpkg_ctx, custom_pkgstrs),
metadata=notebook_metadata,
)
end
Expand Down
Loading