-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: use new buildTree
utility function
#71
base: main
Are you sure you want to change the base?
Conversation
// needed to close the dropdown, which is an uncontrolled detail element | ||
const [iteration, setIteration] = useState(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wasn't necessary on my end, though I might be missing some context or was testing it incorrectly. The dropdown closes fine upon item click; this behavior seems to be the default, looking at the Primer docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { | ||
Block, | ||
FolderBlockProps, | ||
getNestedFileTree, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is getNestedFileTree
unused now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe so! Will fix :)
@@ -22,7 +22,7 @@ | |||
"@excalidraw/excalidraw": "^0.10.0", | |||
"@fullstackio/cq": "^6.0.9", | |||
"@fullstackio/remark-cq": "^6.1.2", | |||
"@githubnext/blocks": "^2.2.0", | |||
"@githubnext/blocks": "^2.4.0-1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how do you make a candidate release like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use the tool np
which allows you to create pre-releases and publish them to the next
tag on NPM.
another thought here: should we consider changing the Blocks API so file trees are passed in a more useful way? rather than needing a library function in the block |
Companion PR to githubnext/blocks-dev#21.
This PR fixes NEXT-634.
There's still an open experiential (and technical question) as to whether the file picker should disclose all of the files in the repository, or only those that are children of the current tree node.
In order to implement the former, I think we'll need an upstream change in
blocks-platform
so that thetree
prop that gets passed down to folder blocks is always the highest-level tree, rather than the branch that's sliced according to the currentpath
.A pre-requisite for merging this is publishing the
@githubnext/blocks
library to the main channel again. Currently, I'm using anext
build.