Skip to content
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

refactor(web): improve exit story block edit mode #1347

Merged
merged 20 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default ({
const pageWrapperElement = document.getElementById(
STORY_PANEL_CONTENT_ELEMENT_ID
);
if (pageWrapperElement) setPageGap(pageWrapperElement.clientHeight - 40); // 40px is the height of the page title block
if (pageWrapperElement) setPageGap(pageWrapperElement.clientHeight - 90); // 90px is the height of the page title block
airslice marked this conversation as resolved.
Show resolved Hide resolved
}, [setPageGap]);

useEffect(() => {
Expand Down
5 changes: 5 additions & 0 deletions web/src/beta/features/Visualizer/Crust/StoryPanel/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ export default (
onStoryPageChange?.(newPage.id);
setCurrentPageId(newPage.id);
setLayerOverride(undefined);
if (disableSelection) {
setDisableSelection(false);
setSelectedBlockId(undefined);
}

const container = document.getElementById(STORY_PANEL_CONTENT_ELEMENT_ID);
if (!pageId) {
Expand Down Expand Up @@ -163,6 +167,7 @@ export default (
currentPageId,
selectedStory?.pages,
onStoryPageChange,
disableSelection,
handlePageTime,
visualizer
]
Expand Down
Loading