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

[WIP] AttrValue / Update #440

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft

Conversation

druskus20
Copy link
Contributor

Description

The PR

Checklist

Please make sure you can check all the boxes that apply to this PR.

  • All widgets I've added are correctly documented.
  • I added my changes to CHANGELOG.md, if appropriate.
  • The documentation in the docs/content/main directory has been adjusted to reflect my changes.
  • I used cargo fmt to automatically format all code before committing

@elkowar
Copy link
Owner

elkowar commented Apr 26, 2022

Still TODO:

  • implement placeholders for update (and figure out how they should look) (curlies are pain because they actually could be empty json objects,... maybe remove unnumbered {} now?)
  • allow for multiple children
  • Possibly implement a const or sth that keeps state references linked (not for now)
  • update documentation
  • update widget attribute documentation !!!!
  • handle defaults for actions in def_widget

@elkowar
Copy link
Owner

elkowar commented Apr 29, 2022

Update:
To properly implement actions as part of the data structure system here, we need to completely restructure the project.
Because actions would need to be represented as simplexpr/dynvals, the simplexpr crate would need to not only know about the datastructure, but also know how to parse the s-expression based update syntax.

The alternative would be to turn this into some sort of actual lambda syntax in simplexpr, and then having a side-effecty simplexpr.... but that's also horrible, and would look significantly worse.

I'm not sure how best to do this.

The other alternative is to, for now, not allow passing actions around through custom widgets, storing them in state, etc. That's a big limitation, but the only way I can currently see how to do this without massive changes to the underlying architecture.

@WilfSilver WilfSilver mentioned this pull request May 14, 2022
8 tasks
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.

2 participants