Commit Graph

16 Commits

Author SHA1 Message Date
rektdeckard
83b2a59caf chore(meta): add prettier and config 2024-01-09 18:15:08 -05:00
rektdeckard
aff7abbae6 refactor(deps): remove some unneeded deps 2024-01-04 22:08:20 -07:00
rektdeckard
bdc1996a07 feat(app): massive ui updates all over the place 2023-03-21 19:49:03 -06:00
rektdeckard
d379cea5bc feat(app): banner, style tweaks 2023-03-08 01:07:01 -07:00
rektdeckard
345acafb45 feat(app): major refactorings and details footer updates 2023-03-08 01:07:01 -07:00
rektdeckard
eba876b3ea feat(app): new details footer appearance 2023-03-08 01:07:01 -07:00
rektdeckard
2a030b08cd refactor(app): switch to @phosphor-icons/core and format files 2023-01-08 02:10:49 -07:00
rektdeckard
e4b99d2ca9 chore(app): better ux for settings actions 2021-11-29 21:14:17 -05:00
rektdeckard
14d8c9d0e7 feat(app): add persistence of settings across sessions 2021-11-26 22:03:54 -05:00
rektdeckard
a885931831 app: Mobile grid improvements 2021-06-20 19:53:53 -04:00
rektdeckard
73b66e2e86 App: add helper hooks 2021-05-30 23:17:33 -04:00
rektdeckard
c3787fcde0 Parameters: refactor and add more supported params
This patch replaces the component-based URL Parameter matcher with a
hook-based approach. We now watch for, parse, and normalize URL params
for 'color', 'weight', and 'size'.
2021-01-08 15:34:26 -05:00
rektdeckard
22f066c6a9 components+hooks: refactor window measurement
We relocated window measurment logic into a hook, useGridSpans(), which
tells us the appropriate number of columns for the IconGrid. This is
useful for rendering an InfoPanel in the right place! In future we
should look into a custom implementation using ResizeObserver and
polyfills, and that may be extensible for other use-cases.
2020-09-24 19:24:00 -04:00
rektdeckard
d5609d3c57 useTransientState: set default delay (1000ms) and resolve retriggers
When setTransientState() triggers a new timeout, we clear any pending
timeouts to prevent stale state from being applied if a superceding
value was set in the interim.

Maybe in future we should also allow users to cancel pending transitions
directly, by returning useTimeoutFn's cancel() function along with the
state and setter.
2020-08-09 20:54:18 -04:00
Tobias Fried
6202c4d2bb useTransientState: implement hook
This utility hook provides access to a piece of state and a setter
function, which can be used to supply a temporary value and a duration
for which it is valid, before reverting to preceeding value. Following
the pattern:

const [value, setTransientValue] = useTransientValue<number>(42, 5000);
setTransientValue(69); // value === 69 for 5000ms, before returning to 42

We can easily fire and forget a temporary state transition.
2020-07-31 19:53:12 -04:00
rektdeckard
b1a4a93e73 ColorInput: add throttling and update style to match spec
This patch adds throttling to events emitted by the native color-picker,
preventing noticeable lag caused by rapid state updates. It is currently
throttled to one event per 100ms, but we may want to play with this
value in the future! For not it feels smooth.
2020-07-29 12:23:53 -04:00