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

Update context_expressions.md now that expressions moved to app-model #369

Open
lucyleeow opened this issue Mar 7, 2024 · 2 comments
Open
Labels
bug Something isn't working content Ideas for new or improved content

Comments

@lucyleeow
Copy link
Collaborator

Expression implementation has been moved to app-model (which has some okay docs: https://app-model.readthedocs.io/en/latest/reference/expressions/#app_model.expressions.Expr)

Also app-model does not yet handle contexts but we are using their context types (e.g., ContextNamespace and ContextKey).

We should update the documentation to reflect this and point to app-model docs where appropriate.

Related ref: napari/napari#4860 (comment)

@lucyleeow
Copy link
Collaborator Author

Related task #146

@lucyleeow
Copy link
Collaborator Author

We should also include the new ContextMapping, in particular:

  • allows function context keys
  • new instance created every time we get_context
  • context keys can behave in one of two ways:
    • context keys connected to events are updated immediately, and will always have the 'correct' value
    • function context keys only get evaluated when we get_context, this is why we create a new context instance and update from context on aboutToShow.

See for more: napari/napari#6965 (comment)

Adding this here to group context updates together.

@melissawm melissawm added the content Ideas for new or improved content label Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working content Ideas for new or improved content
Projects
Development

No branches or pull requests

2 participants