HN user

TheSisb2

154 karma
Posts4
Comments94
View on HN

Love this. Building a website this way really teaches you why we started having all the complexities in web frameworks today. For certain simple websites like this one, the tradeoffs are worth it. I rebuilt our company website this way too. (Sescollc.com)

It depends on a number of factors, one of which is how the authors perceive the work. Does it stand on its own merits or is it interesting because of the technical decisions? Sometimes it starts as a technical exploration and outgrows itself faster than the author can come to terms with the magnitude of the work.

I was surprised when this layout worked:

  cabinet 200cm x 92cm top 3cm bottom 15cm scale 5
       50cm     \*        \*        20cm
  \*   drawer   door     door     drawer
  \*   drawer   ^        ^        drawer
  \*   ^        ^        <        drawer
  \*   >        drawer   drawer   <

So I inspected the odd shaped element and noticed it would overflow. Probably fine for your purposes.

Super cool!

In between barrel files and no barrel files, are unbarrelled files. This is where you have one installable package (i.e.: @cool-lib/core) and create imports from sub-paths like this:

import Button from "@cool-lib/core/button";

import Link from "@cool-lib/core/link";

import Widget from "@cool-lib/core/widget";

This is similar to what lodash does too. Still have more imports, but only one package.json dependency! And the same perf gains.

Shameless plug: we had a really hard time finding an accessible data grid that matches the specs, so we built one recently (in React) for our design system. It’s very minimal but completely composable. For example we don’t have virtualized rows or frozen columns but that’s something that can be added on later; we focused on a foundationally accessible data grid to start: https://paste.twilio.design/components/data-grid

I hope that other data grid libraries can mimic some of this to improve web accessibility. These components can be really tedious to interact with today

Hey HN! I'm really happy to be sharing this with you all today. I've been working on React projects for about 4 years now and I've always found that SVGs (whether icons or full illustrations) are best represented in my projects as individual React components. Some of the benefits are that:

- It's easier to control your SVGs with clearly defined props

- You can bake in accessibility into your illustrations

- Unlike to icon fonts which load the entire font, you can leverage modern module loading practices to only load the SVGs you need (i.e.: import HackerNewsIcon from '...')

- Unlike in-lining SVGs, the resource can be cached, bundled, and re-used multiple times without duplicating the contents.

- This tool automatically strips away `id`s so you don't have id collisions.

- Since it's a component, you can modify it to, for example, show a different SVG under a different locale if the English design doesn't translate well.

This has helped our little design system team off-load the incoming requests to add new icons back out to the requesting teams. And if an icon doesn't meet the requirements of our system, consumers can continue to use them in their own projects while still being aligned on props and a11y.

Hope you all find this useful too!

React v15.5.0 9 years ago

This compiles poorly and has a performance cost, it turns out. Doing:

constructor(props) { super(props); this.func = this.func.bind(this); }

Is better if you care about performance.

I've read of some people who were finally set free after a long stretch in solitary confinement, and many of them attributed the preservation of their sanity to simple math or word exercises. I believe one would just count exponents of two as far as he could go and another would try remembering every word in every language they knew.

Not sure of similarities to brain training games, but I would bet there is something there.

This looks really well made. I also enjoyed looking through your other (very clean) repos!

One question: does this work with React? I found this Github https://github.com/kwnccc/react-popmotion but it isn't part of the main Popmotion organization. I would be willing to pay a license fee for something well maintained with React support.

FYI, The pay structure I agree with most for web libraries is a non-recurring fee, 1 year upgrades and support, the versions I purchased are useable indefinitely but I can buy a new 1 year license for the newer versions and more support. Up to you how you do it though!

You're pretty much covered. uBlock Origin + Privacy Badger is awesome.

You can add something like Tab Cookies or Self Destructing Cookies. You can also add something like uMatrix to the mix.

If you really want to go far, add a "User-Agent Switcher" type extension.

I wouldn't add more than this though, it starts to be overkill. Also do note: I used to use noscript and it works well, but going from 0 JS on a domain to all JS on a domain isn't ideal. If you want ultimate security, add noscript as well but maintain the others so that when you whitelist a url you can still expect to be safe.

Allowing people to live indefinitely/much longer than currently won't make the world a better place. Children humble and ground adults. Younger brains are more malleable and young people carry newer gene evolutions. Our species would halt exactly where we are, ignorance would never vanish, our species would stop adapting.

80 year old racists would be 200 year old racists.