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

Integrate data.py and data.r into the UI #104

Closed
magland opened this issue Jun 28, 2024 · 1 comment · Fixed by #120
Closed

Integrate data.py and data.r into the UI #104

magland opened this issue Jun 28, 2024 · 1 comment · Fixed by #120
Milestone

Comments

@magland
Copy link
Collaborator

magland commented Jun 28, 2024

This overlaps with #57 but I wanted to create a new issue with more clarity of purpose.

(I think we should target generation of data.json and not worry about initial values yet for 1.0)

The prototypes for this exist in #94 . We need to decide how to integrate those into the UI.

One possibility is to have a tab widget for the data view. Maybe first tab is data.json, second is "generate". Then in generate tab there's a dropdown to select the language (python or R). Then I think the run button should generate some sort of preview of the generated data that the user can accept or reject. Since the data.json is not visible (different tab), it's too mysterious that it would just get updated silently, and then the user needs to switch tabs to see what might have changed.

With this design we don't want data.py and data.r to both exist. But what if user writes some python stuff, and then decides to switch the language -- does the data.py get deleted? It seems like this should be an undo-able action.

An alternative is we have three tabs: data.json, data.py, data.r. Then we can allow script content in both, understanding that the user would usually not use both. I feel like this would be more straightforward.

We could also consider having the data.py / data.r be editable on the right panel, so the user could have more space to edit and also they could see the output data.json without needing to switch tabs. Then there's less need for previewing the generated content.

@magland magland added this to the 1.0 milestone Jun 28, 2024
@WardBrian
Copy link
Collaborator

(I think we should target generation of data.json and not worry about initial values yet for 1.0)

Agreed. I don't think they will be that much harder, but doing them separately seems like a good plan

I think my first instinct is to do something like a "generate" tab/drawer that itself has a drop down or tabs to select between Python and R. But it would be nice if this was visible at the same time as the data.json, if only because it gives an easy solution to:

Then I think the run button should generate some sort of preview of the generated data that the user can accept or reject.

This could just be that running the script marks the data as "edited", and the user has to manually hit "save" on the window?

With this design we don't want data.py and data.r to both exist. But what if user writes some python stuff, and then decides to switch the language -- does the data.py get deleted? It seems like this should be an undo-able action.

I think it is fine to store/persist both if they are both non-empty, but I want to stress again that this is not really a concern for "real" users -- in my experience, they tend to be loyal to a fault to their preferred language. Probably the majority of times someone switches back and forth between these tabs it will be one of us during testing.

But, someone might want to prepare a tutorial or something that can be completed in both python and r, so allowing both to exist is probably helpful and fixes the issue of switching being undo-able.

@WardBrian WardBrian linked a pull request Jul 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants