tangrams / tangram-play

Text editor web app for Tangram scenes
https://tangram.city/play/
MIT License
94 stars 27 forks source link

shortcuts for importing house styles #570

Open burritojustice opened 8 years ago

burritojustice commented 8 years ago

instead of digging around and trying to find a URL for our house styles, help out users by letting them type in the short name :

import: refill-style

or better yet, provide a clickable menu like we do for sources and datatype:

                     +----------------------------------+
                     |   bubble-wrap-style-no-labels    |
                     |   bubble-wrap-style              |
                     |   bubble-wrap-style-more-labels  |
                     |   refill-style-no-labels         |
                     |   cinnabar-style-no-labels       |
                     |   cinnabar-style                 |
                     |   cinnabar-style-more-labels     |
                     |   refill-style-no-labels         |
import: refill-style | √ refill-style                   |
                     |   refill-style-more-labels       |
                     |   walkabout-style-no-labels      |
                     |   walkabout-style                |
                     |   walkabout-style-more-labels    |
                     |   zinc-style-no-labels           |
                     |   zinc-style                     |
                     |   zinc-style-more-labels         |   
                     +----------------------------------+

(this would also help avoid the map freezing when a link 404s...)

louh commented 7 years ago

This will be implemented as a kind of autocomplete that adds the proper URL to the import value. We cannot use "shorthand" imports as this abstracts proper Tangram syntax. Unless Tangram itself wants to offer the shortcut? @bcamper