Skip to content

Conversation

@quffaro
Copy link
Collaborator

@quffaro quffaro commented Dec 10, 2025

Closes #184.

@quffaro quffaro added enhancement New feature or request frontend TypeScript frontend and Rust-wasm integrations labels Dec 10, 2025
@github-actions github-actions bot temporarily deployed to netlify-preview December 10, 2025 21:35 Destroyed
@quffaro quffaro force-pushed the cm/ui-switch-cell-type branch from ed42237 to afb459e Compare December 10, 2025 22:04
@github-actions github-actions bot temporarily deployed to netlify-preview December 10, 2025 22:04 Destroyed
@github-actions github-actions bot temporarily deployed to netlify-preview December 11, 2025 04:19 Destroyed
@quffaro quffaro force-pushed the cm/ui-switch-cell-type branch from 36283e9 to 6b18588 Compare December 11, 2025 05:49
@github-actions github-actions bot temporarily deployed to netlify-preview December 11, 2025 05:49 Destroyed
@quffaro quffaro force-pushed the cm/ui-switch-cell-type branch from 6b18588 to c8b4109 Compare December 11, 2025 06:06
@github-actions github-actions bot temporarily deployed to netlify-preview December 11, 2025 06:06 Destroyed
@quffaro quffaro force-pushed the cm/ui-switch-cell-type branch from c8b4109 to 6d6a83a Compare December 11, 2025 06:06
@github-actions github-actions bot temporarily deployed to netlify-preview December 11, 2025 06:06 Destroyed
@quffaro quffaro linked an issue Dec 11, 2025 that may be closed by this pull request
@quffaro quffaro marked this pull request as ready for review December 11, 2025 14:13
@epatters epatters changed the title Switch Cell Type from Frontend Change object/morphism types in model notebooks Dec 16, 2025
Copy link
Member

@epatters epatters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Matt for taking this on!

I have one high-level comment about the architecture, reflected in several of the comments below. Rather than using the cell constructor mechanism to construct a whole new cell and then extract its object/morphism type, we should, in each object declaration cell, create a cell switcher by looking up the available object types directly from the theory, and similarly for the morphism declaration cells. No code in the notebook directory should make reference to theories or models.

}

function modelCellConstructors(theory: Theory): CellConstructor<ModelJudgment>[] {
function modelCellConstructors(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it makes sense to implement this feature by changing modelCellConstructors. As the name suggests, "cell constructors" are functions that construct new notebook cells. This is quite different in scoping to mutating existing cells of a given type.

"tag" in content &&
content.tag === "morphism"
);
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A hint that this design is off is that notebook editor is not supposed to know anything about theories, models, etc. It's a completely generic component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request frontend TypeScript frontend and Rust-wasm integrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Popup menu to change object/morphism type

3 participants