"Export to web" on unsaved ink document may later cause "export story.js" to fail
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 340
- PR merge metrics
- No merged PRs in 30d
Description
Currently, Inky allows you to `Export for web` even when an ink document has never been saved. This causes `Export story.js` to break as soon as the ink document *is* saved.
- User draft as ink file about Goldilocks. It is unsaved.
- User uses `Export for web` to test, and chooses the folder name "Goldilocks". Assets are generated, including an Untitled.js and an index.html file pointing at it.
- User saves their ink file as Goldilocks.ink.
- User tries to update the export by choosing "Export story.js". The UI suggests "Goldilocks.js", which the user accepts, then saves in the export folder. (oops)
- User reloads the Goldilocks export web site -- however, the html is still pointed at Untitled.js, so changes in Goldilocks.js are ignored, so the story export failed. Browser refresh doesn't help, checking the folder shows the Goldilocks.js is there, and inspecting the file contents shows the expected changes, which are not loading.
Why this is happening (the index.html is still pointed at Untitled.js) is difficult to explain to less technical users who are going by the menu items and following the suggested naming. One possibility is not enabling the `Export for web` option unless the ink document has been saved -- or to have it require ink document save first if run. It is not unusual for export to only be allowed on saved documents, and that keeps the default name from being misleading.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the "Export for web" and "Export story.js" menu actions and reproduce the sequence with an unsaved Goldilocks draft. Determine whether the export must require a prior save or keep the generated HTML aligned with the later story filename. Done means the documented sequence reloads the updated story rather than continuing to reference Untitled.js.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100