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.
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
, orQueryBuildButton
(code), although I did prepare somethis.props
onFile
and onFolder
such ashighlighted
andselected
in order to more easily integrate with them later. BTWselected
is in fact a 3-state, even though this is not visually reflected by theCheckbox
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
, orQueryBuildButton
and integrate them with the rest. Then we can make a PR to merge everything back intomaster
. Let me knwo what you think.