-
Notifications
You must be signed in to change notification settings - Fork 4
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
Allow project settings to be configurable #31
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Uses team number setting in generated preferences file
Options are currently hardcoded
Add UI for setting team number Reload file previews when the project changes (not functional)
Move project name to settings object for consistency Validate settings to prevent saving with bad input (eg no project name or team number)
SamCarlberg
commented
Sep 28, 2024
src/ui/robot/Robot.tsx
Outdated
Comment on lines
67
to
76
// Reload the current file when the project changes | ||
useEffect(() => { | ||
const currentFile = selectedFile | ||
setSelectedFile(project.generatedFiles.find(f => f.name === "README.md")) | ||
|
||
if (project.generatedFiles.find(f => f.name === currentFile.name)) { | ||
// Show the original file if it still exists | ||
setSelectedFile({ ...currentFile }) | ||
} | ||
}, [project]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, this only seems to fire once, and requires a view reload (such as switching tabs) afterward
Add definitions for grouping settings together Allow custom settings to be defined (eg by plugins)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add settings for team number and epilogue support (on/off)
Dynamically regenerate code when project settings change
Add a settings dialog for configuration; project name editing has been moved to this dialog. Team number and project name are now displayed read-only in the top left where the project name input used to be. The dialog is displayed by default when the app is loaded
Settings are validated and cannot be applied if invalid - team numbers must be positive integers, and project names must have at least one non-whitespace character. The "Apply" button is disabled if validation checks fail
Invalid inputs:
Valid inputs: