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

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

mkumbobeaty
Copy link
Contributor

@mkumbobeaty mkumbobeaty commented Jan 13, 2025

Overview

  • Add logic to exit story block edit mode when story page change.

What I've done

What I haven't done

How I tested

Screen.Recording.2025-01-13.at.19.27.36.mov

Which point I want you to review particularly

Memo

Summary by CodeRabbit

  • Bug Fixes

    • Improved page selection behavior in the Visualizer.
    • Adjusted page layout calculation for better spacing.
  • Refactor

    • Updated page selection and layout logic to enhance user experience.
    • Removed unnecessary gap calculations for a cleaner interface.
    • Introduced a new wrapper component for improved page display.
    • Modified page change notification logic for better interaction handling.

Copy link

coderabbitai bot commented Jan 13, 2025

Walkthrough

The pull request introduces modifications to the handleCurrentPageChange function in the hooks.ts file, ensuring that the selection state resets when the disableSelection flag is true. Additionally, it removes the pageGap calculation and the PageGap component in the index.tsx file, replacing it with a new StoryPageWrapper component that has a minimum height of 92vh. These changes refine the component's functionality and layout within the Visualizer's Story Panel.

Changes

File Change Summary
web/src/beta/features/.../hooks.ts Updated handleCurrentPageChange to reset selection state when disableSelection is true; added disableSelection to dependency array.
web/src/beta/features/.../PanelContent/hooks.ts Removed useEffect and useLayoutEffect for pageGap; eliminated pageGap state management.
web/src/beta/features/.../PanelContent/index.tsx Removed PageGap component; added StoryPageWrapper with minimum height of 92vh; updated destructured properties to exclude pageGap.
web/src/beta/features/.../Page/index.tsx Modified useEffect in StoryPanel to change onCurrentPageChange second argument from true to false.

Possibly related PRs

Suggested reviewers

  • airslice
  • pyshx

Poem

🐰 In the land of stories, pages unfold,
With gaps now vanished, new tales are told.
Selection resets, a dance so neat,
A wrapper of stories, where dreams meet!
Hopping through code, with joy we play,
A rabbit's delight in the light of the day! 🌟


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ded3b88 and 3e5b8dc.

📒 Files selected for processing (2)
  • web/src/beta/features/Visualizer/Crust/StoryPanel/Page/index.tsx (1 hunks)
  • web/src/beta/features/Visualizer/Crust/StoryPanel/PanelContent/index.tsx (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: Redirect rules - reearth-web
  • GitHub Check: Header rules - reearth-web
  • GitHub Check: ci-server / ci-server-lint
  • GitHub Check: Pages changed - reearth-web
  • GitHub Check: ci-web / ci
  • GitHub Check: ci-server / ci-server-test
🔇 Additional comments (2)
web/src/beta/features/Visualizer/Crust/StoryPanel/Page/index.tsx (1)

149-149: LGTM! Enabling scroll behavior on page intersection.

The change to pass false for disableScrollIntoView allows proper scrolling behavior when a page becomes visible, while still preventing scroll during auto-scrolling scenarios.

web/src/beta/features/Visualizer/Crust/StoryPanel/PanelContent/index.tsx (1)

109-133: LGTM! Clean implementation of page wrapping.

The StoryPage component is properly wrapped while maintaining all necessary props and functionality.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

netlify bot commented Jan 13, 2025

Deploy Preview for reearth-web ready!

Name Link
🔨 Latest commit 3e5b8dc
🔍 Latest deploy log https://app.netlify.com/sites/reearth-web/deploys/678de9fb5c3dee000757ed5c
😎 Deploy Preview https://deploy-preview-1347--reearth-web.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Jan 13, 2025

Codecov Report

Attention: Patch coverage is 0% with 61 lines in your changes missing coverage. Please review.

Project coverage is 22.80%. Comparing base (52f66e4) to head (ded3b88).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
server/internal/app/repo.go 0.00% 29 Missing ⚠️
...Visualizer/Crust/StoryPanel/PanelContent/index.tsx 0.00% 27 Missing ⚠️
...beta/features/Visualizer/Crust/StoryPanel/hooks.ts 0.00% 5 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1347      +/-   ##
==========================================
- Coverage   23.00%   22.80%   -0.21%     
==========================================
  Files        1041     1046       +5     
  Lines      107732   108908    +1176     
  Branches      663      668       +5     
==========================================
+ Hits        24786    24836      +50     
- Misses      81687    82812    +1125     
- Partials     1259     1260       +1     
Flag Coverage Δ
server 31.50% <0.00%> (ø)
web 17.88% <0.00%> (-0.24%) ⬇️
web-beta 17.88% <0.00%> (-0.24%) ⬇️
web-classic 17.88% <0.00%> (-0.24%) ⬇️
web-utils 17.88% <0.00%> (-0.24%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
server/internal/app/config/config.go 35.61% <ø> (ø)
.../Visualizer/Crust/StoryPanel/PanelContent/hooks.ts 0.00% <ø> (ø)
...beta/features/Visualizer/Crust/StoryPanel/hooks.ts 0.00% <0.00%> (ø)
...Visualizer/Crust/StoryPanel/PanelContent/index.tsx 0.00% <0.00%> (ø)
server/internal/app/repo.go 0.00% <0.00%> (ø)

... and 26 files with indirect coverage changes

@mkumbobeaty mkumbobeaty marked this pull request as ready for review January 13, 2025 16:34
@mkumbobeaty mkumbobeaty requested a review from airslice as a code owner January 13, 2025 16:34
@github-actions github-actions bot requested a review from m-abe-dev January 13, 2025 16:34
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
web/src/beta/features/Visualizer/Crust/StoryPanel/hooks.ts (2)

139-142: LGTM! Consider adding a comment for clarity.

The selection reset logic is well-placed and handles the cleanup appropriately. Consider adding a brief comment explaining why we reset these states during page changes when selection is disabled.

+      // Reset selection states when changing pages with disabled selection
       if (disableSelection) {
         setDisableSelection(false);
         setSelectedBlockId(undefined);
       }

Line range hint 139-170: Great architectural consistency!

The changes maintain a consistent pattern with other selection handlers in the codebase. The selection state management is well-coordinated across page changes, block selection, and double-click handlers.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 52f66e4 and 186c223.

📒 Files selected for processing (1)
  • web/src/beta/features/Visualizer/Crust/StoryPanel/hooks.ts (2 hunks)
🔇 Additional comments (1)
web/src/beta/features/Visualizer/Crust/StoryPanel/hooks.ts (1)

170-170: LGTM! Dependency array is correctly updated.

The addition of disableSelection to the dependency array is necessary and properly placed.

@airslice airslice changed the title chore(web): improve exit story block edit mode refactor(web): improve exit story block edit mode Jan 14, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
web/src/beta/features/Visualizer/Crust/StoryPanel/PanelContent/hooks.ts (1)

Line range hint 16-83: Consider splitting the hook into smaller, focused hooks.

The current hook handles multiple concerns:

  • Page gap calculations
  • Block creation/deletion
  • Selection state
  • Scroll timeout

Consider splitting these into separate hooks for better maintainability and testability:

  • usePageGap
  • useBlockOperations
  • useSelectionState

Example refactor:

const usePageGap = () => {
  const [pageGap, setPageGap] = useState<number>();
  // Page gap calculation logic
  return pageGap;
};

const useBlockOperations = (onBlockCreate, onBlockDelete) => {
  // Block creation/deletion logic
  return { handleBlockCreate, handleBlockDelete };
};

const useSelectionState = () => {
  const editModeContext = useEditModeContext();
  // Selection state logic
  return { disableSelection };
};
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 186c223 and 91c7aa5.

📒 Files selected for processing (1)
  • web/src/beta/features/Visualizer/Crust/StoryPanel/PanelContent/hooks.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: Redirect rules - reearth-web
  • GitHub Check: Header rules - reearth-web
  • GitHub Check: Pages changed - reearth-web
  • GitHub Check: ci-web / ci
  • GitHub Check: ci-server / ci-server-test
  • GitHub Check: ci-server / ci-server-lint
🔇 Additional comments (1)
web/src/beta/features/Visualizer/Crust/StoryPanel/PanelContent/hooks.ts (1)

61-61: ⚠️ Potential issue

Fix inconsistent pageGap calculations.

There's an inconsistency in the pageGap calculations:

  • Initial render subtracts 90px
  • Resize handler subtracts 40px
  • Comments contradict each other about the page title block height

This will cause layout shifts when the window is resized.

Please verify the correct page title block height and ensure consistent calculations. Apply this fix once verified:

-    if (pageWrapperElement) setPageGap(pageWrapperElement.clientHeight - 90); // 90px is the height of the page title block
+    if (pageWrapperElement) setPageGap(pageWrapperElement.clientHeight - TITLE_BLOCK_HEIGHT); // Height of the page title block

And in the resize handler:

-      if (pageWrapperElement) setPageGap(pageWrapperElement.clientHeight - 40); // 40px is the height of the page title block
+      if (pageWrapperElement) setPageGap(pageWrapperElement.clientHeight - TITLE_BLOCK_HEIGHT); // Height of the page title block

Consider extracting the title block height to a constant to maintain consistency:

const TITLE_BLOCK_HEIGHT = 90; // or 40, depending on the correct value

Let's verify the correct height:

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
web/src/beta/features/Visualizer/Crust/StoryPanel/constants.ts (1)

6-6: Consider grouping related constants together.

The new constant breaks the logical grouping of constants. Consider moving it next to the other story page gap-related constants for better code organization.

Apply this diff to improve constant grouping:

export const STORY_PANEL_WIDTH = 442;
export const STORY_PANEL_CONTENT_ELEMENT_ID = "story-page-content";
-export const DEFULT_STORY_PAGE_GAP = 320
// Story Page
export const DEFAULT_STORY_PAGE_DURATION = 2;
export const DEFAULT_STORY_PAGE_GAP = 20;
+export const DEFAULT_STORY_PAGE_EDIT_GAP = 320; // Used for scroll behavior in edit mode
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 91c7aa5 and 5d43e35.

📒 Files selected for processing (2)
  • web/src/beta/features/Visualizer/Crust/StoryPanel/constants.ts (1 hunks)
  • web/src/beta/features/Visualizer/Crust/StoryPanel/hooks.ts (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/src/beta/features/Visualizer/Crust/StoryPanel/hooks.ts
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: Redirect rules - reearth-web
  • GitHub Check: Header rules - reearth-web
  • GitHub Check: Pages changed - reearth-web
  • GitHub Check: ci-server / ci-server-test
  • GitHub Check: ci-server / ci-server-lint
  • GitHub Check: ci-web / ci
🔇 Additional comments (1)
web/src/beta/features/Visualizer/Crust/StoryPanel/constants.ts (1)

6-6: Verify the gap value's impact on UI.

The new gap value (320) is significantly larger than the default gap (20). Please ensure this larger value doesn't cause any UI issues, especially on smaller screens.

Run the following script to find any UI-related tests or responsive design checks:

✅ Verification successful

The gap value (320px) is intentionally large for smooth page transitions.

The gap is specifically used for scroll offset during page navigation and doesn't affect the layout or cause any UI issues. The story panel has a fixed width of 442px, and the scrolling behavior is well-managed with smooth transitions.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for UI tests and responsive design checks related to story panel gaps

# Look for story panel related tests
rg -l "StoryPanel.*test" --type ts

# Look for responsive design related code
rg "(?i)(responsive|mobile|screen|width|mediaquery)" --type ts "web/src/beta/features/Visualizer/Crust/StoryPanel"

Length of output: 4492


Script:

#!/bin/bash
# Find usages of DEFULT_STORY_PAGE_GAP and scroll/pagination related code

# Find direct references to DEFULT_STORY_PAGE_GAP
rg "DEFULT_STORY_PAGE_GAP" --type ts -A 5 -B 5

# Look for scroll and pagination related code in StoryPanel
rg "(?i)(scroll|pagination|gap|margin|space)" --type ts "web/src/beta/features/Visualizer/Crust/StoryPanel" -A 3 -B 3

Length of output: 54210

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🔭 Outside diff range comments (1)
web/src/beta/features/Visualizer/Crust/StoryPanel/PanelContent/hooks.ts (1)

Fix inconsistent page title block height calculations

There's a bug where the page title block height is calculated differently:

  • Initial load: Uses 90px
  • Window resize: Uses 40px

This inconsistency will cause layout jumps when the window is resized, as confirmed by the inline comments stating both measurements are for the "page title block".

🔗 Analysis chain

Line range hint 61-73: Verify the impact of pageGap changes on the story panel layout.

The change from 40px to 90px in the pageGap calculation represents a significant layout adjustment. Please ensure this doesn't negatively impact the story panel's appearance or functionality.

Let's check for any related layout calculations or styles:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for related layout calculations and styles
echo "Searching for related pageGap usage..."
rg -t typescript -t tsx "pageGap" "web/src/beta/features/Visualizer"

echo "Searching for related style definitions..."
rg -t typescript -t tsx "90px|40px" "web/src/beta/features/Visualizer/Crust/StoryPanel"

Length of output: 406


Script:

#!/bin/bash
# Search with correct file extensions
echo "Searching for pageGap usage..."
rg "pageGap" --type-add 'ts:*.{ts,tsx}' --type=ts "web/src/beta/features/Visualizer"

echo -e "\nSearching for related style definitions..."
rg "90px|40px" --type-add 'ts:*.{ts,tsx}' --type=ts --type-add 'css:*.{css,scss}' --type=css "web/src/beta/features/Visualizer/Crust/StoryPanel"

echo -e "\nSearching for styled-components definitions..."
rg "styled\." --type-add 'ts:*.{ts,tsx}' --type=ts "web/src/beta/features/Visualizer/Crust/StoryPanel"

Length of output: 1555


Script:

#!/bin/bash
# Search for PageGap component definition
echo "Searching for PageGap component..."
rg "PageGap" --type-add 'ts:*.{ts,tsx}' --type=ts "web/src/beta/features/Visualizer"

echo -e "\nSearching for comments about measurements..."
rg -B 2 -A 2 "(40|90)px" --type-add 'ts:*.{ts,tsx}' --type=ts "web/src/beta/features/Visualizer"

Length of output: 2958

🧹 Nitpick comments (2)
web/src/beta/features/Visualizer/Crust/StoryPanel/PanelContent/hooks.ts (2)

Line range hint 61-73: Consider extracting the pageGap calculation logic.

The pageGap calculation is duplicated between useLayoutEffect and the resize handler. This could lead to maintenance issues if the calculation needs to change in the future.

Consider extracting the calculation into a shared function:

const calculatePageGap = (element: HTMLElement | null) => {
  const PAGE_TITLE_HEIGHT = 90; // px
  return element ? element.clientHeight - PAGE_TITLE_HEIGHT : undefined;
};

Then use it in both places:

  useLayoutEffect(() => {
    const pageWrapperElement = document.getElementById(
      STORY_PANEL_CONTENT_ELEMENT_ID
    );
-    if (pageWrapperElement) setPageGap(pageWrapperElement.clientHeight - 90);
+    setPageGap(calculatePageGap(pageWrapperElement));
  }, [setPageGap]);

  useEffect(() => {
    const resizeCallback = () => {
      const pageWrapperElement = document.getElementById(
        STORY_PANEL_CONTENT_ELEMENT_ID
      );
-      if (pageWrapperElement) setPageGap(pageWrapperElement.clientHeight - 40);
+      setPageGap(calculatePageGap(pageWrapperElement));
    };
    window.addEventListener("resize", resizeCallback);
    return () => window.removeEventListener("resize", resizeCallback);
  }, []);

Line range hint 64-73: Consider debouncing the resize handler.

The resize handler is called on every resize event, which could lead to performance issues due to frequent state updates.

Consider using a debounce utility to limit the frequency of updates:

import { debounce } from "lodash";

// In the hook:
useEffect(() => {
  const resizeCallback = debounce(() => {
    const pageWrapperElement = document.getElementById(
      STORY_PANEL_CONTENT_ELEMENT_ID
    );
    setPageGap(calculatePageGap(pageWrapperElement));
  }, 100); // Adjust delay as needed

  window.addEventListener("resize", resizeCallback);
  return () => {
    resizeCallback.cancel(); // Clean up debounce timer
    window.removeEventListener("resize", resizeCallback);
  };
}, []);
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5d43e35 and 223947f.

📒 Files selected for processing (2)
  • web/src/beta/features/Visualizer/Crust/StoryPanel/PanelContent/hooks.ts (1 hunks)
  • web/src/beta/features/Visualizer/Crust/StoryPanel/hooks.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/src/beta/features/Visualizer/Crust/StoryPanel/hooks.ts
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: ci-web / ci
  • GitHub Check: ci-server / ci-server-test
  • GitHub Check: ci-server / ci-server-lint
  • GitHub Check: Redirect rules - reearth-web
  • GitHub Check: Header rules - reearth-web
  • GitHub Check: Pages changed - reearth-web

@mkumbobeaty mkumbobeaty requested a review from pyshx as a code owner January 16, 2025 06:34
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
web/src/beta/features/Visualizer/Crust/StoryPanel/PanelContent/index.tsx (1)

155-156: Enhance the StoryPageWrapper styling for better responsiveness and user experience.

The current styling is minimal and could benefit from additional improvements:

 const StoryPageWrapper = styled("div")(() => ({
-  height: "100vh"
+  height: "100vh",
+  height: "-webkit-fill-available", // Add fallback for mobile browsers
+  maxHeight: "100vh", // Prevent overflow on desktop
+  overflow: "hidden", // Prevent potential scrolling issues
+  transition: "opacity 0.3s ease", // Smooth transitions between pages
+  "@media (max-width: 768px)": {
+    height: "100dvh" // Use dynamic viewport height on modern browsers
+  }
 }));
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 223947f and ded3b88.

📒 Files selected for processing (2)
  • web/src/beta/features/Visualizer/Crust/StoryPanel/PanelContent/hooks.ts (0 hunks)
  • web/src/beta/features/Visualizer/Crust/StoryPanel/PanelContent/index.tsx (2 hunks)
💤 Files with no reviewable changes (1)
  • web/src/beta/features/Visualizer/Crust/StoryPanel/PanelContent/hooks.ts
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: ci-server / ci-server-lint
  • GitHub Check: ci-server / ci-server-test
  • GitHub Check: ci-web / ci
  • GitHub Check: Redirect rules - reearth-web
  • GitHub Check: Header rules - reearth-web
  • GitHub Check: Pages changed - reearth-web
🔇 Additional comments (1)
web/src/beta/features/Visualizer/Crust/StoryPanel/PanelContent/index.tsx (1)

109-133: Verify alignment with PR objectives.

The changes appear to focus on page layout and styling, while the PR objective mentions improving the exit story block edit mode. Could you clarify how these changes contribute to improving the exit story block edit mode? The only visible connection is the disableSelection prop usage.

Let's verify the edit mode related changes:

Also applies to: 155-156

✅ Verification successful

Changes align with PR objectives

The changes are correctly implementing the improved exit story block edit mode through the disableSelection prop, which is part of a coordinated mechanism between edit mode and selection states. The code shows that:

  • Selection is disabled when exiting edit mode
  • Edit mode is exited when selection is disabled
  • These props are properly propagated through the component hierarchy
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for edit mode related code
rg -g '*.{ts,tsx}' '(editMode|disableSelection|handleCurrentPageChange)'

# Search for related tests
rg -g '*test*.{ts,tsx}' '(editMode|disableSelection|handleCurrentPageChange)'

Length of output: 14547

@github-actions github-actions bot removed the server label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants