-
Notifications
You must be signed in to change notification settings - Fork 8
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
Copy stringify model to clipboard #45
Comments
I came upon it and I also find it annoying, so I'm gonna give it some real priority. |
Our set/get data utils use the editor view and the writer to generate the stringified data structures. For the inspector to do the same, these utils would need to be exposed by the editor first. Otherwise the inspector would need to create a pseudo-editor instance itself (at least the view) for its internal processes which feels like an overkill to me. Plus, I think this internal view instance would need to be of the same version as the editor being stringified for compatibility reasons (if their APIs diverge, it's an instant crash). Although I totally support the whole idea, TBH, I'm not sure where to start. Maybe the editor could expose these utils somewhere and then the inspector would discover whether they are exposed or not and it would (or would not) allow using them in the UI? WDYT @jodator? |
The idea with exposing somewhere is probably only feasible way to do that because of what you mentioned about compatibility and having and editor instance anyway. However, adding this to builds might be overkill.
I don't think that is what happens with At first glance - it doesn't have much external (engine) deps and might be feature proof but that would require some work to check how this would behave. I see two options for now:
|
We could bring the
TBH I'd rather avoid duplicating the code. The purpose of this issue is that you can easily select an element in the model, click "stringify" and then copy the output to tests (as an initial data, as an assertion result). If the implementations in the editor and the inspector diverge by a just tiny little bit, the feature is useless. |
It allows casting the model tree to a string that could be used in
setModelData
function in our tests.Not sure how often it could be used but when you want to report an issue that occurs in a specified scenario, you could paste your model as an entry point.
The text was updated successfully, but these errors were encountered: