NLeSC-Storyteller / query-builder-client

A Query builder to query the Knowledge Store and generate datafiles that can be visualized with the Storyteller interface.
Apache License 2.0
0 stars 1 forks source link

reusable tree the react way #26

Closed jspaaks closed 7 years ago

jspaaks commented 7 years ago

code state https://github.com/NLeSC-Storyteller/query-builder-client/tree/c8e1bec0b6a3431395b5294b3a88ccf0954a1612

branch jhs-reactify

the code is now a reusable lazy-loaded tree, implemented in 'the React way'. Adding/removing a tree is a matter of adding/removing its string to/from https://github.com/NLeSC-Storyteller/query-builder-client/blob/c8e1bec0b6a3431395b5294b3a88ccf0954a1612/src/config.ts, all the reducer stuff is generic for every tree (but operates on its own part of the whole state).

I didn't make this a PR because the code currently does not include any QueryClearButton, SearchBox, MentionCounter, or QueryBuildButton (code), although I did prepare some this.props on File and on Folder such as highlighted and selected in order to more easily integrate with them later. BTW selected is in fact a 3-state, even though this is not visually reflected by the Checkbox I'm currently using.

I'm pretty happy with how it turned out, I hope you are too. If so, I'll start refactoring the now-missing QueryClearButton, SearchBox, MentionCounter, or QueryBuildButton and integrate them with the rest. Then we can make a PR to merge everything back into master. Let me knwo what you think.

jspaaks commented 7 years ago

closing this issue, everything has been merged into master (5f1e352b653956c21f8fbceae6a9d040188e475e).