Skip to content

Commit

Permalink
Merge branch 'aaaaa2' into codemirror-savq
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Jan 3, 2025
2 parents ca35734 + af7f5e9 commit 40bd934
Show file tree
Hide file tree
Showing 23 changed files with 473 additions and 120 deletions.
1 change: 1 addition & 0 deletions .github/workflows/Bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ concurrency:
jobs:
trigger:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
# We use that PAT token instead of GITHUB_TOKEN because we are triggering another github action on the 'release' event.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
fail-fast: false
matrix:
# We test quite a lot of versions because we do some OS and version specific things unfortunately
julia-version: ["1.6", "1.10", "~1.11.0-0"] #, "nightly"] # "~1.12.0-0"]
julia-version: ["1.6", "1.10", "1.11"] #, "nightly"] # "~1.12.0-0"]
os: [ubuntu-latest, macOS-latest, windows-latest]

steps:
Expand Down
45 changes: 30 additions & 15 deletions .github/workflows/TryThisPR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,37 @@ jobs:
runs-on: ubuntu-latest
continue-on-error: true
steps:

- uses: denoland/setup-deno@v1
with:
deno-version: "1.16.1"
- uses: actions/github-script@v5
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `
## Try this Pull Request!
Open Julia and type:
\`\`\`jl
julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="${context.payload.pull_request.head.repo.html_url}", rev="${context.payload.pull_request.head.ref}")
julia> using ${context.payload.repository.name.replace(/\.jl$/,"")}
\`\`\`
`
})
require("fs").writeFileSync("context.json", JSON.stringify(context))
- name: Generate comment
id: generate-comment
run: |
deno eval '
const context = JSON.parse(await Deno.readTextFile("context.json"));
const body = `
## Try this Pull Request!
Open Julia and type:
\`\`\`jl
julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="${context.payload.pull_request.head.repo.html_url}", rev="${context.payload.pull_request.head.ref}")
julia> using ${context.payload.repository.name.replace(/\.jl$/,"")}
\`\`\`
`
await Deno.writeTextFile("comment.txt", body);
'
- uses: nefrob/[email protected]
with:
content: "comment.txt"
contentIsFilePath: "true"
regex: "jkhsdkjhasdfkjhawkejfbawkehfkajshdfkjahsdf"
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "Pluto"
uuid = "c3e4b0f8-55cb-11ea-2926-15256bba5781"
license = "MIT"
authors = ["Fons van der Plas <[email protected]>"]
version = "0.19.46"
version = "0.19.47"

[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Expand Down
44 changes: 22 additions & 22 deletions frontend-bundler/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion frontend/common/Binder.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ export const start_binder = async ({ setStatePromise, connect, launch_params })
}

let open_remotely = async (p1, p2) => {
const open_url = with_query_params(new URL("open", binder_session_url), { [p1]: p2 })
const open_url = with_query_params(new URL("open", binder_session_url), {
[p1]: p2,
execution_allowed: "true",
})

console.log(`open ${p1}:`, open_url)
return fetch(with_token(open_url), {
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/CellInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ export const CellInput = ({
rectangularSelection({
eventFilter: (e) => e.altKey && e.shiftKey && e.button == 0,
}),
highlightSelectionMatches({ minSelectionLength: 2 }),
highlightSelectionMatches({ minSelectionLength: 2, wholeWords: true }),
bracketMatching(),
docs_updater,
tab_help_plugin,
Expand Down
5 changes: 4 additions & 1 deletion frontend/components/CellInput/pluto_autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,10 @@ const apply_completion = (view, completion, from, to) => {
}
}

view.dispatch({ changes: { from, to, insert }, annotations: autocomplete.pickedCompletion.of(completion) })
view.dispatch({
...autocomplete.insertCompletionText(view.state, insert, from, to),
annotations: autocomplete.pickedCompletion.of(completion),
})
}

const special_symbols_completion = (/** @type {() => Promise<SpecialSymbols?>} */ request_special_symbols) => {
Expand Down
Loading

0 comments on commit 40bd934

Please sign in to comment.