Repository navigation
tabs: the pane's tab info arrives as hooks.tabInfo in 0.2.2 - #12
Merged
Merged
Conversation
The 0.2.2 pane seat declares its inject as hooks: { tabInfo }, so a body is
handed the hook under `hooks`; the pack's bodies only knew the 0.2.0
`props.useTabInfo` prop and therefore rendered their no-tab state for every
image, video, PDF, audio file, diagram, editor and History tab.
One `tabInfoHookOf(props)` per body accepts either shape and yields null when
neither is present, so the old path is unchanged. Versions bumped for the seven
packages; check-client-bundles asserts that the hooks shape reaches the same
opening state as the prop did.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the right bar's tab bodies after the 0.2.2 upgrade.
The bug
The 0.2.2 pane seat declares its inject as
hooks: { tabInfo }, so a tab body is handed the tab-info hook underprops.hooks.tabInfo. The pack's bodies only knew the 0.2.0props.useTabInfoprop, sotabInfoNow()returned null and every body drew its "this pane has no tab" state: images, videos, PDFs, audio, diagrams, the editor and History.The fix
One
tabInfoHookOf(props)per body readsprops.useTabInfofirst, thenprops.hooks.tabInfo, and yields null when neither is present — so a seat that still hands the prop behaves exactly as before. Seven packages bumped: image alpha.3, video alpha.3, pdf alpha.10, audio alpha.9, diagrams alpha.9, editor alpha.15, gittree alpha.6.check-client-bundlesnow renders the image body withhooks: { tabInfo }and asserts it reaches the same opening state as with the prop, plus that a seat with neither shape still renders.Checks
check-client-bundles(all bundles, including the hooks case) andcheck-node-routespass.