Wykres commitów

1482 Commity (8857a21efeb2d39f88d95eb8b8fa138740c49bcd)

Autor SHA1 Wiadomość Data
Atul Varma 8857a21efe Add an 'add attachment' button. 2021-09-29 14:37:52 -04:00
Atul Varma 202259a533 Preserve open/closed state of <details>. 2021-09-28 12:08:26 -04:00
Atul Varma 9d91a08761 Factor out getImmutableIndices(). 2021-09-28 11:50:51 -04:00
Atul Varma 09304f00b6 Factor out AttachmentEditor. 2021-09-28 11:42:09 -04:00
Atul Varma b20cfd5080 Allow attachment indices to be changed. 2021-09-28 11:34:55 -04:00
Atul Varma 52ddb05dd8 Fix type bug. 2021-09-28 11:04:27 -04:00
Atul Varma 51be02dfd2 Fix typing. 2021-09-28 11:00:20 -04:00
Atul Varma 450c930241 Make CreaturePartEditor generic. 2021-09-28 10:55:45 -04:00
Atul Varma 31bc73a7b1 Factor out AttachmentIndicesWidget. 2021-09-28 10:52:38 -04:00
Atul Varma b444787c04 Add button to remove attachments 2021-09-27 17:23:20 -04:00
Atul Varma 146dfc9796 Name things better. 2021-09-27 17:17:43 -04:00
Atul Varma c525ba1548 Add capitalize() util. 2021-09-27 17:12:30 -04:00
Atul Varma f4bdeb134f Add terrible attachment editing. 2021-09-27 17:04:38 -04:00
Atul Varma 34f1da481a Add 'invert colors' checkbox. 2021-09-27 15:33:58 -04:00
Atul Varma aa07e83ed7 Add a creature/cluster editor. 2021-09-27 15:29:23 -04:00
Atul Varma 05d1dac1dd
Add a 'mono' button. (#229)
This adds another color-modifying button, "Mono", which makes the fill and stroke colors a minor variation of the background. This makes the composition as a whole monochromatic, hence the name.

In practice, this is just tinting the background by black (stroke) and white (fill) a tiny bit.  The color transformation could be used, for instance, to turn a cluster (even a simple one that is essentially just a single symbol) into a background for another cluster. (Note that there's not currently an easy way to actually compose multiple compositions like this, though I'd like there to be!)
2021-09-27 14:43:48 -04:00
Atul Varma 1bfd8d1bba
Add a black & white button. (#228)
This adds a "B&W" button to the colors area in the cluster and mandala pages. Clicking it will reset the background, stroke and fill colors to their monochromatic defaults.

I'm calling the button "B&W" for now to minimize the amount of space the button takes up, since I'd like to add at least one more to that area.  At some point we might want to use a UI that scales a bit better, like a dropdown button.
2021-09-27 08:00:57 -04:00
Atul Varma 64f7ca7852
Show error modal if deserialization fails. (#226)
This fixes #213. It is not particularly accessible, but since it (hopefully) shouldn't be displayed too often, I'm going to merge it anyways for now--better an inaccessible modal than failing silently.
2021-09-23 16:04:25 -04:00
Atul Varma 9572aab1ed
Rename 'creature' to 'cluster'. (#223)
This fixes #222. Note that it only renames it in the UI, not in the code or the TOML metadata, as that would require a ton of changes, and possibly break old links.
2021-09-21 10:40:07 -04:00
Atul Varma 6277fc9157
Gallery thumbnails (#220)
This adds thumbnails to the gallery (#26).  Mandalas are not currently animated (I'm worried that doing this for lots of mandalas would severely impact performance).  It also adds a loading throbber for the gallery page.

If a gallery item can't be deserialized, a sad face is shown in place of a thumbnail, with a more detailed explanation on mouseover.

Currently the implementation is not as clean as I'd like.  I'll clean it up in a separate PR, as it will involve factoring out logic from the creature and mandala pages (similar in concept to #189 / #190), which would add lots of noise to this diff.
2021-09-01 09:47:40 -04:00
Atul Varma 6bfd84add6 Refactor GalleryContext.submit() to not take a callback. 2021-08-30 08:21:57 -04:00
Atul Varma 0c98010e20 Fix sidebar docs on gallery page. 2021-08-22 18:32:47 -04:00
Atul Varma ab3b976746
Add gallery submission (#218)
This adds a "Publish" UI to the creature and mandala pages which allows compositions to be published to the gallery.
2021-08-22 17:11:18 -04:00
Atul Varma be3f1abab0
Implement read-only, text-only gallery (#217)
This implements an _extremely_ basic Firebase-powered gallery (#26).  At present it's just a list of links to creatures/manadalas that open in new tabs, without preview thumbnails. Or the ability to submit new entries. These features will be forthcoming in future PRs.

As with #215, this decouples the view logic from Firebase so we can use something else in the future if we want.
2021-08-22 12:23:51 -04:00
Atul Varma 22ae85c512
Factor out firebase.tsx, FirebaseAppContext (#216)
This factors out a ` firebase.tsx` file and a `FirebaseAppContext` in preparation for gallery work (#26).
2021-08-22 09:10:17 -04:00
Atul Varma bec2c4eb49 Allow firebase actions to be retried on error. 2021-08-22 08:27:49 -04:00
Atul Varma f927db60c0
Add Firebase-powered GitHub login (#215)
This adds GitHub login via Firebase, as a foundation for adding a gallery (#26).  Currently it just adds a login/logout button to the Debug page.

At an architectural level, this adds an `AuthContext` React context, whose interface is generic enough that it's not coupled to Firebase or GitHub.  In fact, the default context is a "null context" whose operations are all no-ops.
2021-08-21 19:43:47 -04:00
Atul Varma ed23d0ac3b Move complexity, invert symbols into randomizer widget. 2021-08-15 15:49:28 -04:00
Atul Varma ebd8ad0493
Add useRememberedState(). (#212)
This adds a new `useRememberedState()` React hook that effectively allows us to have user interface elements that "remember" their most recent value, even if the UI itself was unmounted at some point.  (It only works for the lifetime of the page, however, so it doesn't remember values across page reloads; this is intentional, as I didn't want to have to worry about serialization or schema migration.)

The hook is now used in the randomizer widget and for some of the creature page widgets, to ensure that their settings are preserved more often than not.
2021-08-15 15:44:54 -04:00
Atul Varma beb12345a1
Implement new Avro schema for creatures (#211)
The creature state stored in #210, while quite compact, is also very fragile, because any minor change in our creature generation algorithm or even vocabulary will completely throw off existing serializations.

This attempts to serialize the actual _creature_ created by the generator rather than its random number seed, which will be a larger serialization but also one that is more resilient to future changes in the algorithm and/or vocabulary.  It should also pave the way for tweaking generated creatures.

Note that the previous `v1` schema implemented in #210 is no longer supported--i.e., links that use it will now be broken.  Hopefully this is OK because it hasn't been around for very long, but it was just way too much work to migrate that schema to the new `v2` format.
2021-08-15 14:41:05 -04:00
Nina Paley 25bff780a7
modified 3 tomls for never_flip_attachments 2021-07-24 20:23:13 -05:00
Atul Varma 77496c6301
Store creature state in querystring (#210)
This is an attempt to help with #61 by storing the creature state in the querystring.

However, a crucial issue with this implementation as it stands is that it stores the random number seed used to generate the creature.  This is great for representing the state in a compact form, but it's also likely to break easily as the vocabulary and randomization algorithm changes.

So, in the future, we might want to represent the creature state by enumerating the actual structure of the creature, which is likely to be a bit more future-proof.  (It also makes it possible for us to add features in the future that allow users to tweak the randomly-generated creature.)

But for now at least, this will allow users to use the back and forward buttons in their browser to navigate between creatures, so that if they click randomize and skip past something that looked cool, it's easy to go back and visit it.
2021-07-24 14:00:42 -04:00
Nina Paley af62a4d66c
increased frequency of stars_7 2021-07-23 11:59:52 -05:00
Nina Paley e3b3d5ce5d
increased frequency multipliers of eye symbols 2021-07-20 08:28:35 -05:00
Nina Paley 307197665a
Update leg_crouch.toml 2021-07-20 08:19:06 -05:00
Atul Varma 59cd1d1915 Hover helper tooltips aren't obscured by cursor. 2021-07-18 16:52:18 -04:00
Nina Paley 4a4dcf3aa6
toml 2021-07-18 15:12:48 -05:00
Nina Paley 666a9d5f54
toml 2021-07-18 15:11:23 -05:00
Nina Paley ad032e9b70
Add files via upload 2021-07-18 09:30:37 -05:00
Nina Paley 98cb06e493
modified creature_frequency_multiplier 2021-07-18 09:23:42 -05:00
Atul Varma e4b401f97f
Add a 'creature_frequency_multiplier' TOML property. (#207)
Fixes #191.

Currently the implementation is fairly naive, in that a really large value for `creature_frequency_multiplier` will not be handled terribly efficiently, but we can optimize later if needed.
2021-07-17 14:39:19 -04:00
Atul Varma 34fb3080fa Enable gradients, set colors to randhue. Fixes #209. 2021-07-17 14:03:04 -04:00
Nina Paley 02c5b3ddd4
gradient 2021-07-13 15:08:36 -05:00
Nina Paley 2e226d65b3
added gradient 2021-07-13 11:05:59 -05:00
Nina Paley 93b2b387b5
removed gradient 2021-07-13 11:01:47 -05:00
Nina Paley 526c5257fb
gradients 2021-07-13 10:58:52 -05:00
Nina Paley b6f0680e52
gradients 2021-07-12 15:58:20 -05:00
Nina Paley 8c0ff752b8
gradients 2021-07-12 15:08:56 -05:00
Nina Paley 5ed1ba9e54
gradients 2021-07-12 14:40:44 -05:00
Nina Paley 357b3170e4
gradients 2021-07-12 12:03:34 -05:00