-
Notifications
You must be signed in to change notification settings - Fork 21
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
add Import Splits button #134
Conversation
- make room for an Import button - add Share text
This pull request is automatically being deployed by Amplify Hosting (learn more). |
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.
great work overall!
when trying to import my old p5bo splits, I got this error
for successfully importing splits, please add an alert or modal with the caveats of not being able to import ending split icon / custom icons / etc
when there's an error importing splits, please add an alert or modal saying "failed to import splits". otherwise it appears nothing happens
src/components/App.tsx
Outdated
/> | ||
</Suspense> | ||
<label htmlFor="import-input"> | ||
<input type="file" id="import-input" onChange={onImport} /> |
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.
This seems like a weird hack. Without researching into it, my question is "why can't the button itself trigger the file selector?" If there's a good reason for that question, please leave it as a comment. Otherwise, remove this
const onImportButton = () => { | ||
document.getElementById("import-input")?.click(); | ||
}; |
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.
This is my alternative to the previous <label htmlFor="import-input">
way. I'm not sure it's any less hacky, but it at least doesn't need to re-implement pieces of ArrowButton
as a non-button anymore.
Resolves #133 by adding an Import Splits button.
On clicking the Import Splits button, the user can select a file to import. It can import:
gameName
categoryName
variables
ordered
startTriggeringAutosplit
splitIds
, including-
subsplit markers where appropriateendTriggeringAutosplit
names
, dropping the-
subsplit markers as appropriateendingSplit
name
It does not import:
icons
endingSplit
icon