Wykres commitów

25 Commity (ab3b976746d008785fd62145b0b68d49c3510881)

Autor SHA1 Wiadomość Data
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 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
mittimithai 303bc6b543
randHue color algorithm (#194)
Added new color algo, cleaned up random-colors a bit.
2021-07-03 09:34:30 -04:00
Atul Varma 741d67a938
Fix security vulnerabilities yet again. (#160)
Um, apparently new high-severity vulnerabilities showed up in our dependencies since yesterday's #151? This is getting a bit ridiculous.
2021-06-08 12:48:22 -04:00
Atul Varma a5671ec8b6
Rebuild package.lock. (#151)
This project has a bunch of security vulnerabilities from outdated dependencies, so I just regenerated `package.lock` from scratch.
2021-06-07 07:35:23 -04:00
Atul Varma 2f82e2dc31
Set page <title> to same value as <h1> (#147)
Fixes #142.
2021-06-06 09:37:45 -04:00
Atul Varma 46d9f524da
Use eslint. (#133)
Fixes #128.

A number of hook-related warnings were brought up, which this PR also fixes.  Note that from now on, if there are any warnings raised by the eslint, CI will fail.
2021-05-28 10:17:45 -04:00
Atul Varma d13c892f3d
Use esbuild instead of Parcel. (#131)
This replaces Parcel with [esbuild][].

esbuild has a number of advantages over Parcel:

* It is much, much, *much* faster. A Parcel build takes several seconds on my system, while esbuild takes 60-70 _milliseconds_.
* Parcel hard-crashes when I switch branches on Windows, esbuild doesn't.

The one disadvantage is that, as far as I can tell, esbuild doesn't support any kind of auto-reloading in the browser when you change things. IMO this isn't that big a deal and the benefits outweigh this minor inconvenience (and anyways, auto-reload has historically backfired so many times that I usually have been manually reloading the page whenever I make changes).

[esbuild]: https://esbuild.github.io/
2021-05-28 07:34:17 -04:00
mittimithai 7edef5920f
Multiple color functions (#119)
Based on spec from meeting. Start at a random hue h1, functions specify increment to h2 and then h3 is (h1+180).
2021-05-15 06:41:11 -04:00
Atul Varma 2093622600
Copy the CNAME file to the `dist` dir on site build. (#118)
This ensures that whenever our site is rebuilt, the `CNAME` file will be in its root directory, so that GitHub can properly serve the site at a custom domain.
2021-05-13 10:53:25 -04:00
dependabot[bot] 8dfb19d365
Bump hosted-git-info from 2.8.8 to 2.8.9 (#117)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-12 21:55:30 -04:00
dependabot[bot] f49fa7170d
Bump lodash from 4.17.20 to 4.17.21 (#116)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-12 21:48:34 -04:00
mittimithai 7003daeebf
Baseline color rules working (#111)
Made the new rule the default, but its now easy to play with to adjust the exact color rule we are using. This new one pick 3 values (with a bit of randomness), picks a random hue (then picks 2 more with a small chance of taking the opposite hue), and picks a saturation level that tends to be high.
2021-04-30 07:15:38 -04:00
Atul Varma d1c2ae4b02
Always permalink to Mandalas. (#99)
This addresses #61 by making mandalas permalinked.

The URL to a mandala will change whenever the user stops fiddling with it for 250 ms.  This means that the user can always reload the page to get a reasonably recent version of what they were creating, and they can use the browser's "back" and "next" buttons to effectively undo/redo recent changes.  They can also copy the URL to share it with others.

## About the serialization format

Originally, I stored the state of the user's mandala in the URL using JSON.  This had a number of drawbacks, though:

* **It was really long.**  A mandala serialization was almost 1k characters, which was a very big URL, and one that some sharing platforms might even reject.

* **It wasn't type-checked in any way.** Unless I added some kind of JSON schema validation (which I didn't), the serialization was simply deserialized and assumed to be in the proper format.  This could result in confusing exceptions during render time, rather than decisively exploding at deserialization time.

To resolve these limitations, and because I thought it would be fun, I decided to store the mandala state using a serialization format called [Apache Avro][].  I first read about this in Kleppmann's [Designing Data-Intensive Applications][kleppmann] and was intrigued by both its compactness (a serialized mandala is around 80-120 characters) and schema evolution properties.

It might be going a bit overboard, but again, I thought it would be fun and I wanted to play around with Avro.  Also, I tried architecting things in such a way that all the Avro code is in its own file, and can easily be removed (or swapped out for another serialization format) if we decide it's dumb.

[Apache Avro]: http://avro.apache.org/
[kleppmann]: https://dataintensive.net/

## Other changes

This PR also makes a few other changes:

* Tests can now import files with JSX in them (I don't think this was required for the final state of this PR, but I figured I'd leave it in there for its almost inevitable use in the future).

* The value labels for number sliders now have a fixed width, which eliminates a weird "jitter" effect that sometimes occurred when using them.
2021-04-24 08:46:32 -04:00
mittimithai 558fa0aa6a
random colors now being sampled from hsluv (#80)
This samples colors from the HSLUV color space instead of the RGB color space, which should result in better randomized colors.
2021-04-06 20:33:08 -04:00
Atul Varma 47d9550e51 Remove mkdirp, we don't seem to need it... 2021-04-06 20:22:52 -04:00
Atul Varma 9e1bca8fe3
Use rimraf in build script. (#81)
We currently use `rm -rf` in our build script, which is unix-specific. This uses `rimraf` to support Windows.
2021-04-06 19:39:05 -04:00
Atul Varma 6136253cd6
Add basic animation support to the mandala page (#75)
This addresses part of #71 by adding some basic animation support to the mandala page.
2021-04-03 17:01:13 -04:00
Atul Varma 3e1b66a984
Add support for TOML symbol metadata. (#33)
This fixes #20 by adding support for TOML-based metadata for symbols.

There's now a template TOML file in `svg/_template.toml` that documents all the different metadata properties.  The file can be copied to match the name of an SVG file (but with a `.toml` extension) and it will be processed by the vocabulary builder when the site is generated.

Currently there are only two properties documented, `always_nest` and `always_be_nested` (as per the needs outlined in https://github.com/toolness/mystic-symbolic/issues/17#issuecomment-786696966), but they don't actually do anything yet (actual support for _using_ the metadata will come in another file).

Right now the TOML files are validated quite stringently: if a file contains the name of a property it doesn't understand, or the type of the property is wrong, it will raise an error. We can revisit this if it becomes burdensome.
2021-02-26 21:30:38 -05:00
Atul Varma 6dfa738548 Add test suite. 2021-02-16 06:21:51 -05:00
Atul Varma 72505ac1ff Add deploy script. 2021-02-03 20:08:18 -05:00
Atul Varma f0960d4280 use react. 2021-02-03 19:11:34 -05:00
Atul Varma a4a1013a8c Add more stuff. 2021-02-02 20:09:49 -05:00
Atul Varma e507f6311d remove fill, stroke attrs 2021-02-02 19:40:56 -05:00
Atul Varma 1a4c8adc41 Origination. 2021-02-02 19:26:40 -05:00