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

data and analysis script examples available to user #149

Closed
magland opened this issue Jul 24, 2024 · 8 comments · Fixed by #151
Closed

data and analysis script examples available to user #149

magland opened this issue Jul 24, 2024 · 8 comments · Fixed by #151

Comments

@magland
Copy link
Collaborator

magland commented Jul 24, 2024

I think it would be helpful for there to be a "?" icon at the top of the editors that would show documentation for writing the analysis.* and data.* scripts. Otherwise, I think a user wouldn't know how to get started when opening these tabs. I think this should be in the form of a markdown document that is opened as a popup window. I have some react components that can render markdown, including code snippets. But to start we could also just link to docs on github containing examples.

Let me know if you want me to get started on this.

@WardBrian
Copy link
Collaborator

I think we should probably update the default values for these files to be a comment explaining them, rather than them defaulting to empty. That should be more than sufficient for the data ones, at least. Analysis scripts may need something closer to what you describe to fully explain them

@magland
Copy link
Collaborator Author

magland commented Jul 24, 2024

I think we should probably update the default values for these files to be a comment explaining them, rather than them defaulting to empty. That should be more than sufficient for the data ones, at least. Analysis scripts may need something closer to what you describe to fully explain them

I don't like the idea of every saved project having comment-only files called data.py, data.R, etc. I think they should be empty if not used, so they don't get included in the export

@WardBrian
Copy link
Collaborator

That’s a fair point. We could update the export logic to check if they’re different from their defaults AND nonempty before including them, if we wanted.

I think some users will honestly miss the ? — I hadn’t really taken note myself

@magland
Copy link
Collaborator Author

magland commented Jul 24, 2024

How about, if the editor is empty, then display a special noticeable message in the toolbar: GET STARTED or something. If not empty, then it's just a "?" icon.

@WardBrian
Copy link
Collaborator

That would be more noticeable.

It occurs to me this is similar to how we repurpose the syntax error window to suggest a user click an example. I’ve been wanting to replace that with something like what VSCode shows when there is no text. It looks like this can be done with Monaco, and is an option for at least those things we think we can sufficiently explain in 1 line:

microsoft/monaco-editor#568 (comment)

@magland
Copy link
Collaborator Author

magland commented Jul 24, 2024

That's a cool idea. Let me take a crack at that for the stan editor.

@magland
Copy link
Collaborator Author

magland commented Jul 24, 2024

... unless you already started.

@WardBrian
Copy link
Collaborator

I’ve headed out for the night, so feel free! I’m curious if it’s really as easy as the linked solution makes it seem…

@WardBrian WardBrian linked a pull request Jul 25, 2024 that will close this issue
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 a pull request may close this issue.

2 participants