POC: Use echo.vue autoconnect instead of GlueState#4112
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4112 +/- ##
=======================================
Coverage 84.64% 84.64%
=======================================
Files 204 204
Lines 30171 30174 +3
=======================================
+ Hits 25537 25540 +3
Misses 4634 4634 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
One thing that occurred to me is that we could also auto-add a prefix on the traits that are auto-generated on |
|
This is now ready to review/try out - I implemented the change which means that the properties in the vue file and the auto-generated traits have a As we discussed before, if you are still planning to have a big release soon it probably makes sense to defer merging this to after though. |
Description
This is not ready for review or testing at this point, I am just opening it to not lose track of it
This is a companion PR to glue-viz/glue-jupyter#529 to see if we can avoid using GlueState here and instead use the use echo.vue autoconnect functionality.
The short version is that at the moment, glue-jupyter and jdaviz rely on
GlueState, which basically makes it so that if any property on a python glue state is changed, the whole state class is serialized and sent to the frontend. Likewise, if anything so much as a toggle gets flipped in vue, the whole glue state gets sent back to Python.This is not ideal in terms of communications but also can cause issues if python properties are linked (this came up while trying to implement log axes support, whereby
x_logchanging meansx_min/x_maxchanges. What this means is that ifx_logchanges in the frontend,x_logalong withx_min/x_maxand other properties get sent back to Python. Python then seesx_loghas changed so then changesx_min/x_maxto match. However then these look different from the values being sent back from JS, so then it overwritesx_minandx_max.I have instead been working on a mechanism that will automatically create all the traits needed on a vuetify widget and sync them atomically with the glue state. This means that only the necessary changes get transferred over between Python and JS, and also avoids the issues similar to the log one above.
The main change API-wise is that Application would now have traits for all the properties in the state class.
Change log entry
CHANGES.rst? If you want to avoid merge conflicts,list the proposed change log here for review and add to
CHANGES.rstbefore merge. If no, maintainershould add a
no-changelog-entry-neededlabel.Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
triviallabel.cache-download.ymlworkflow?