Compare commits

..

1 Commits

Author SHA1 Message Date
Felix Roos 3dde9f49e4 fix default handling on eval 2026-12-04 16:25:29 +01:00
4 changed files with 7 additions and 14 deletions
-9
View File
@@ -136,15 +136,6 @@ There are also eslint extensions / plugins for most editors.
When opening a PR, the CI runner will (once approved by a human) check the code style and eslint, as well as run all tests. You can run the same check with `pnpm check`.
## Publishing a change live on *.strudel.cc
There are a few steps to a contribution to strudel making it to https://strudel.cc/
1. If a maintainer adds a 'serve-hot' label to a pull request on codeberg, it is built and exposed as http://pr-1000.hot.strudel.cc (where 1000 is the pr number). This allows changes to be tried out live, without building locally. However, because it's plain http, some webaudio things etc won't work. A maintainer with server access can assign a certificate for https via a manual process if needed.
2. When a pull request is merged into the main branch by a maintainer, it is automatically built and served under https://hot.strudel.cc/
3. Then a maintainer can trigger an action on codeberg to rebuild https://strudel.cc/ (also known as https://warm.strudel.cc/) from the main branch. This [currently makes strudel refresh for all users](https://codeberg.org/uzu/strudel/pulls/2130), and is intended to happen around once a week, early in the week (when fewer people will be performing with it!), or more often for urgent fixes.
4. There is also https://cold.strudel.cc/, which is intended to reflect the last package release to npm.
## Package Workflow
The project is split into multiple [packages](https://codeberg.org/uzu/strudel/src/branch/main/packages) with independent versioning.
+2 -2
View File
@@ -206,10 +206,10 @@ export class StrudelMirror {
cleanupDraw(true, id);
}
},
beforeEval: async () => {
beforeEval: async (bag) => {
cleanupDraw(true, id);
await this.prebaked;
await replOptions?.beforeEval?.();
await replOptions?.beforeEval?.(bag);
},
afterEval: (options) => {
// remember for when highlighting is toggled on
+1 -1
View File
@@ -90,7 +90,7 @@ export function MiniRepl({
}
},
beforeStart: () => audioReady,
afterEval: ({ code }) => setVersionDefaultsFrom(code),
beforeEval: ({ code }) => setVersionDefaultsFrom(code),
mondo,
});
// init settings
+4 -2
View File
@@ -101,7 +101,10 @@ export function useReplContext() {
clearHydra();
}
},
beforeEval: () => audioReady,
beforeEval: ({ code }) => {
setVersionDefaultsFrom(code);
return audioReady;
},
afterEval: (all) => {
const { code } = all;
//post to iframe parent (like Udels) if it exists...
@@ -115,7 +118,6 @@ export function useReplContext() {
}
setDocumentTitle(code);
const viewingPatternData = getViewingPatternData();
setVersionDefaultsFrom(code);
const data = { ...viewingPatternData, code };
let id = data.id;
const isExamplePattern = viewingPatternData.collection !== userPattern.collection;