Skip to content

docs(ui): clarify UIElement value is read-only#9382

Draft
onthebed wants to merge 1 commit intomarimo-team:mainfrom
onthebed:clawoss/docs/9203-ui-element-value-docs
Draft

docs(ui): clarify UIElement value is read-only#9382
onthebed wants to merge 1 commit intomarimo-team:mainfrom
onthebed:clawoss/docs/9203-ui-element-value-docs

Conversation

@onthebed
Copy link
Copy Markdown

This pull request was authored by a coding agent.

The shared UIElement docs described value without noting that it is read-only, even though the runtime rejects direct assignment with a RuntimeError and points users to mo.state().

This updates the UIElement class and property docstrings to say that value reflects frontend state, cannot be assigned directly, and that mo.state() is the supported way to imperatively drive UI state.

Verification:

  • reproduced the current runtime behavior in a local venv (x.value = "hello" raises RuntimeError: Setting the value of a UIElement is not allowed...)
  • confirmed the updated docstrings through Python introspection after the edit
  • attempted mkdocs build --strict -q, but the local docs toolchain failed before rendering due to a mkdocstrings/mkdocs config mismatch in this ad-hoc environment (PythonConfig.__init__() got an unexpected keyword argument 'import')

Fixes #9203

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Apr 25, 2026 0:30am

Request Review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 25, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@onthebed
Copy link
Copy Markdown
Author

I'll get the CLA signed — will follow up once it's done.

1 similar comment
@onthebed
Copy link
Copy Markdown
Author

I'll get the CLA signed — will follow up once it's done.

@onthebed
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

value property on UIElements is documented as writable but raises RuntimeError when set

1 participant