Updated Ant Drawer's getContainer() to use container class name as a selector instead of a ref
Reader updates
Replaced drawer/outline with new Outline component
DocumentWrapper gets class from outlineContainerClass instead of hard coding
ContextProvider/UiContext updates
Renamed isDrawerOpen/setIsDrawerOpen to isShowingOutline/setIsShowingOutline for consistency with other context var naming schemes and to match new component name
Added outlineContainerClass with default value of reader__main
Reviewer Instructions
This is one of those tasks that got split out from my giant state management PR. There shouldn't be anything too crazy in here.
Testing Plan
Manual testing:
Outline can be opened via link in header and closed with X button. Clicking on an item in the outline scrolls us to that section of the document as expected.
Existing header links still work as expected: zoom in/out, rotate CW/CCW, highlight overlay, highlight text
Description
This is a subtask of https://github.com/allenai/scholar/issues/28926 and a continuation of the state management work from https://github.com/allenai/scholar/issues/28332.
Changes in this PR:
Outline
componentAnt Drawer
'sgetContainer()
to use container class name as a selector instead of a refReader
updatesOutline
componentDocumentWrapper
gets class fromoutlineContainerClass
instead of hard codingContextProvider
/UiContext
updatesisDrawerOpen
/setIsDrawerOpen
toisShowingOutline
/setIsShowingOutline
for consistency with other context var naming schemes and to match new component nameoutlineContainerClass
with default value ofreader__main
Reviewer Instructions
This is one of those tasks that got split out from my giant state management PR. There shouldn't be anything too crazy in here.
Testing Plan
Demo