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

Reorder workspace format #212

Closed
glipR opened this issue Feb 15, 2021 · 8 comments · Fixed by #222
Closed

Reorder workspace format #212

glipR opened this issue Feb 15, 2021 · 8 comments · Fixed by #222
Assignees
Labels
enhancement New feature or request priority Something urgent

Comments

@glipR
Copy link
Contributor

glipR commented Feb 15, 2021

Allow robot code to be sectioned off within folders for individual bots (And enforce this when linking code to bots).

@glipR glipR added the enhancement New feature or request label Feb 15, 2021
@glipR glipR self-assigned this Feb 15, 2021
@glipR glipR added the priority Something urgent label Feb 15, 2021
@peter-drew
Copy link
Member

Could we remove the need to link code at all and rather make it that the code must be in the same folder as the bot and called something like bot.py. We could have the name of the bot defined exclusively by the folder name and then inside the definition and code, and any other code that is called would also be placed there.

@glipR
Copy link
Contributor Author

glipR commented Feb 15, 2021

Good idea

@glipR
Copy link
Contributor Author

glipR commented Feb 15, 2021

Actually, think what might be best is a list view for code selection, similar to bot selection for sims. So when you edit a bot, you get a list view of all .py files in the bot folder, which you select as the script for this bot. You can also add a + button to create the file for you, then people won't have problems with the wrong file extensions, and if code is recognised in the command line we can open the workspace automatically.

@glipR
Copy link
Contributor Author

glipR commented Feb 15, 2021

That last point won't work for portable installs, obviously.

@emilytrau
Copy link
Contributor

I'm for having a more strict folder structure with a preset entry point. I think it would reduce confusion to have 1 documented option rather than adding more UI overhead

@glipR
Copy link
Contributor Author

glipR commented Feb 16, 2021

Fair enough, what about best of both worlds - Bots always enter in at bot.py, and when a bot is created, the folder, bot file, image and bot.py are all created automatically. We can also add a button on the bot page to open the folder.

@glipR
Copy link
Contributor Author

glipR commented Feb 16, 2021

One thing I'll change at the same time - Renaming bots won't break presets that reference them.

@emilytrau
Copy link
Contributor

That sounds like a good solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority Something urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants