tangram-play
tangram-play copied to clipboard
Multiple files / tabs
Necessary to support multi-file scenes. Significant re-architecture/challenge.
Megathread to-do time.
Stuff
- [ ] What is the expected behavior when "Save" happens when a read only tab is open? It currently saves the wrong tab. - Save the correct root scene, vs save the current tab with correct file name?
Logic
- [x] Restoring a tab should place an active cursor at its previous location. Done in 4894d45b8375345110db76841a77ff787cd1794c
- [x] Read-only tabs should actually prevent editing
- [x] Gracefully handle imports that are not resolvable (improperly formatted urls, 404s, etc). See bugs (lower) and commit b2eeba3118faf139c00e73db02c4ad2670ea9dab. If this solution requires more work, open another issue for discussion.
Visuals
- [x] Handle the condition where there is too many tabs to be visible at once. Done in a7254a1dc0a902e61a72b11406b35f87ce601e38
- [x] How to indicate interactivity on import URLs. This can be better, but mark resolve for now.
- [x] ~~Make read-only state more visible than a lock icon?~~ Don't have a good strategy for this.
Parsing
- [x] Support imports that are declared in a single-line array format (e.g.
import: [ 1.yaml, 2.yaml, 3.yaml]. Done by using YAML AST Parser, 65adbdda23b188697dc56ca903644a60677cabfa
Bugs
- [x] Closing a tab in the middle of the tabs list does not load the content of the neighboring tab it switches to - also, it ends up overwriting the neighboring tab content with the contents of the previously closed tab which is worse. Done in 1f0c659f2959d1a73effc725b344638135397463.
- [x] Clicking on a blank line following an import block opens the file from the previous line, this should not happen. Done by using YAML AST Parser, 65adbdda23b188697dc56ca903644a60677cabfa
- [x] When editing an import link, if it is left in an intermediary state (and 404s) it prevents clicking on it to finish editing. Done in b2eeba3118faf139c00e73db02c4ad2670ea9dab
- [x] When closing a read-only tab while the main scene file is in an unclean state, it should not open a save confirmation modal. Done in f1a0db0622d3193d8f630649d0a51f9f71e57622
- [x] Pickers can still change the content of read-only files. See https://github.com/tangrams/tangram-play/issues/598.
- [x] Opening a new tab but not making any edits will not save content to local storage for next time.
- [x] Making a change to a document and then rapidly changing tabs will not remember the change to the first document. Done in e0428bae8422a16690d9f1f4a56007992bb6134e.
Beyond MVP
- [ ] Should we allow new, blank files? How do we link those back to a scene file? Does typing in an import block open new files?
- [ ] Handle editable imports. Do we fork the file? How does the scene understand the difference between an original external import and a forked import? Is this change transparent to the user?
- [ ] Handle miscellaneous resources, e.g. textures, images, fonts.
- [ ] Support imports that are assigned via globals.
- [ ] Errors reported in-line should also attach to the proper document instance. There is actually a ton going on here. See #614
FYI, editing an import link causes a "did not work" modal dialog to pop up, making it difficult to finish editing the link
@burritojustice I am proud to announce that import links that don't open anything no longer pop up modals and interrupt typing. the inline error reporting is still a little wonky, but it's worth trying for a while to see how that feels.
yay! thank you.