Daily Shaarli

All links of one day in a single page.

August 23, 2022

What Makes A Great Toggle Button? (Case Study, Part 1) — Smashing Magazine

In short, when designing a toggle button, for the sake of your users, it’s good to hold on to these basic principles:

  • Use them only when they have an immediate effect
  • Apply them when the setting has a default value.

→ part 2: https://shaarli.lyokolux.space/?iAYVOg

Dr. Dominic Royé on Twitter: "A single map for the worst #drought in 500 years in Europe. The river discharge anomaly based on reanalysis data from June to August 12 2022, shows an average negative anomaly of -29%, even reaching less than -62% at some points. #rstats #dataviz https://t.co/LSGMfS52Lm" / Twitter

The worst drought in 500 years.

The map shows the river discharges from -100% to 100%. France and Germany are in the -50%

Zero-based indexing in the real world - lukeplant.me.uk
Why React Re-Renders

Re-renders only affect the component that owns the state + its descendants (if any).

When a component re-renders, it tries to re-render all descendants, regardless of whether they're being passed a particular state variable through props or not. [... Because] it's hard for React to know, with 100% certainty, whether another component depends, directly or indirectly, on the updated state variable.

In an ideal world, React components would always be “pure”. A pure component is one that always produces the same UI when given the same props.

A tweak is to declare a component with React.memo. If the props have changed, React will re-use that current component rather than going through the trouble of generating a brand new one.

Some argue that rerender is cheap too.

Firefox, let's focus, please! · Codegram

Links are not focusable by default on Firefox... WTF ?!
Here the solution:

  1. about:config
  2. Change the value of accessibility.tabfocus to "Number"
  3. Set the value 7 to accessibility.tabfocus
Simon Stålenhag on Twitter: "Anyway, I think ai-art, just like nfts, is a technology that just amplify all the shit I hate with being an artist in this feudal capitalist dystopia where every promising new tool always end up in the hands of the least imaginative and most exploitative and unscrupulous people." / Twitter

So yes, AI can bypass artists as it will be easy to generate images, arts, ...

I can see how ai-art immediately threatens freelance illustrators and concept artists.

I think ai-art, just like nfts, is a technology that amplifies all the shit I hate about being an artist in this feudal capitalist dystopia where every promising new tool always ends up in the hands of the least imaginative and most exploitative and unscrupulous people.