Greg Hurrell [Tue, 4 Aug 2015 06:08:07 +0000 (23:08 -0700)]
Update URL with "permalink" to current value
Use Base 62 for compactness. Note that this requires us to upgrade the
internals to handle bigger bases, even though we don't expose base > 36
elsewhere in the UI.
This fulfils the promise in the README that this feature exists.
Greg Hurrell [Mon, 3 Aug 2015 17:27:48 +0000 (10:27 -0700)]
Fix charset when "serving" from local filesystem
React converts the entity to a UTF-8 character, which works fine when
serving using the Webpack dev server (which presumably passes an HTTP
Content-Type header), but for testing with a local file:// URL, things
don't work unless we explicitly indicate the type.
Greg Hurrell [Sun, 2 Aug 2015 03:38:49 +0000 (20:38 -0700)]
Fix copy icon background ordering
I had this working, then sorted the properties, which made it stop
working, because `background` is a shorthand form, and when it came
after the other `background-*` properties in the list it effectively
overrode them.
Make it `background-image` instead, so it doesn't override, and is
immune to sorting vagaries.
Greg Hurrell [Sun, 2 Aug 2015 02:47:38 +0000 (19:47 -0700)]
Add icon for copy button
Got the SVG from: https://icomoon.io/app
Compressed it with svgo (`npm install -g svgo`; see
https://github.com/svg/svgo)
Converted to data URI with: https://gist.github.com/puppybits/1565441
Did consider skipping the base64-encoding step (ie.
https://css-tricks.com/probably-dont-base64-svg/) but decided against
it. It won't work in old browsers, and isn't much of a space saving
anyway.
Greg Hurrell [Sat, 1 Aug 2015 14:06:14 +0000 (07:06 -0700)]
Avoid unnecessary base conversions
Instead of converting to a canonical hexadecimal base format, let the
updating component juts pass back the raw value + base. This should cut
the number of conversions by about 25%. For example, if I change the
binary field, instead of converting to hexadecimal once, then from
hexadecimal to some other base for three of the four fields (ie. four
total conversions), we instead just convert three fields.
Greg Hurrell [Sat, 1 Aug 2015 01:54:37 +0000 (18:54 -0700)]
Don't mutate input array in joinDigits()
`reverse()` is a nasty API. It returns the reversed array, but also
mutates it in place. Noticed while using `joinDigits()` to log stuff
while developing.
This might be hard to implement though. I was thinking it might call for
a heap but I don't think so; it just needs a stack, and we pop off until
we get a usable value from it.
This is a mess of things that should be committed separately, but rather
than do that I think I am just going to squash the history before
publishing. Or not. Possibly can't be bothered.
Create new unparented branch for JavaScript implementation
Getting this ancient codebase building on Yosemite is going to be more
trouble than it's worth (Xcode has changed too much, and GMP was always
hard to compile at the best of times), so let's rebuild this in
JavaScript as a web app.