Live data from Hacker News

React Arborist – A full-featured tree component for React

github.com

51–57 of 57 posts

Re: React Arborist – A full-featured tree component for React

#51

Your company ( brimdata ) looks really good and your work on the Zed client app is impressive.

Thanks! We are prepping some blog content for after we get the next release out. You'll be seeing some more posts about zed on here soon.

Watched the talk linked on brimdata.io - stoked to see what's coming out. As a Typescript dev like yourself, very interested in how the dynamic types in Zed could be generated into ts, live.

Re: React Arborist – A full-featured tree component for React

#52

Good efforts! Here's some quick feedback: My first thought - how React Arborist is different from Ant Tree? https://ant.design/components/tree/ React Arborist dependencies looks sane https://github.com/brimdata/react-arborist/blob/main/package... "memoize-one": "^6.0.0", "react-dnd": "^14.0.3", "react-dnd-html5-backend": "^14.0.1", "react-window": "^1.8.6" However I was never a fan of react-dnd. Extremely hard to rea…

Been using AntTree with great success for a complex query builder. Highly recommend.

Re: React Arborist – A full-featured tree component for React

#53

Earlier quoted context omitted.

It is a legal requirement to provide equal access to all features and information for people who use accessibility features. Any non-trivial deviation from this must be declared in an accessibility statement, or the site owner risks legal action and large fines. 100% is not hyperbole, even though ”not exist” is.

As someone who has led WCAG remediation projects, I can firmly assure that it is hyperbole. 100% “accessible” is meaningless: full adherence to what standard? 2.1 AA? That’s an incredibly high bar, and would require constant vigilance and expensive audits on a rotating basis. Much of the guidelines are up for interpretation and can’t easily be expressed in a binary pass/fail besides.

2.1 AA is mandated by law in the European Union for public entities, as well as commercial entities (soon). And yes, it is a high bar, for a reason.

Re: React Arborist – A full-featured tree component for React

#54

Good efforts! Here's some quick feedback: My first thought - how React Arborist is different from Ant Tree? https://ant.design/components/tree/ React Arborist dependencies looks sane https://github.com/brimdata/react-arborist/blob/main/package... "memoize-one": "^6.0.0", "react-dnd": "^14.0.3", "react-dnd-html5-backend": "^14.0.1", "react-window": "^1.8.6" However I was never a fan of react-dnd. Extremely hard to rea…

Ant tree looks like a great tree library and is certainly more mature than react-arborist. However, react-arborist supports renaming a node, has a slightly different drag and drop feel, and leaves all styling up to the user. Not just the title, icon, and expand buttons.

I agree that the hard-coded DefaultCursor styles need to be configurable. I'll soon update. You'll be able to pass in your own component to render the DropCursor (blue line indicating the new position of the node you're dragging).

Re: React Arborist – A full-featured tree component for React

#55
post #43

Does it miss Delete functionality for folders/files (I see rename) or I just dont see it?

This is a controlled component, so all mutation of the tree data structure will need to happen in the tree's parent component. Add a function in your node renderer (maybe after clicking a trash icon), that deletes the node from the tree state. The component will re-renderer and your node will be gone.

I was thinking of making a generic tree manager class to provide basic functions (move, rename, add, delete) for managing the tree data structure in the parent component. Maybe I'll call it "Arborist"!

Re: React Arborist – A full-featured tree component for React

#56
post #45

Great component, thank you for sharing. I was working on a similar component called `react-monaco-tree`, which is waay immature right now. I took ` https://github.com/BlueMagnificent/monaco-tree ` as the base. Are there any list of all these 'file-tree' components for React?

Looks like the start of a great component! It's amazing to me how there is not a really good tree component that already exists, considering how ubiquitous the tree is in user interfaces.

Re: React Arborist – A full-featured tree component for React

#57
post #45

Great component, thank you for sharing. I was working on a similar component called `react-monaco-tree`, which is waay immature right now. I took ` https://github.com/BlueMagnificent/monaco-tree ` as the base. Are there any list of all these 'file-tree' components for React?

Looks like the start of a great component! It's amazing to me how there is not a really good tree component that already exists, considering how ubiquitous the tree is in user interfaces.

Yes you are right. I wouldn't start that component if I had seen react-arborist. Since then I am looking for good file tree components. Thank you for the contribution, I will keep looking for the alternatives but in the mean time react-arborist seems like a great choice.
Post reply on HN