-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
fix: View mode canvas margin #35619
fix: View mode canvas margin #35619
Conversation
@@ -34,7 +34,7 @@ export function AppPage(props: AppPageProps) { | |||
}, [isAnvilLayout, canvasWidth]); | |||
|
|||
const pageViewWrapperRef = useRef<HTMLDivElement>(null); | |||
useCanvasWidthAutoResize({ ref: pageViewWrapperRef, sidebarWidth }); | |||
useCanvasWidthAutoResize({ ref: pageViewWrapperRef }); |
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.
Could you please remove sidebarWidth
from useCanvasWidthAutoResize
as well?
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 have left it incase we need it in the future. It is a optional argument anyways
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 introduced sidebarWidth
param solely for AppPage
component, but since it was a mistake, it appears that there is no reason to keep it, moreover its intent/origin may be confusing to developers.
WalkthroughThe recent changes streamline the Changes
Assessment against linked issues
Poem
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- app/client/src/pages/AppViewer/AppPage/AppPage.tsx (1 hunks)
Additional comments not posted (1)
app/client/src/pages/AppViewer/AppPage/AppPage.tsx (1)
37-37
: Verify the impact of removingsidebarWidth
.The
sidebarWidth
parameter has been removed from theuseCanvasWidthAutoResize
call. This simplification should be verified to ensure it doesn't negatively impact the resizing logic, especially in scenarios where the sidebar is used.
## Description Removes the extra margin added in the View Mode when Navigation is as Sidebar. It was noticed that the width of the sidebar was already accounted for and was reduced from the available width unnecessarily Fixes #35618 ## Automation /ok-to-test tags="@tag.IDE" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10349675002> > Commit: 9778e83 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10349675002&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.IDE` > Spec: > <hr>Mon, 12 Aug 2024 10:18:59 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Improvements** - Enhanced the auto-resizing behavior of the app's canvas by streamlining the parameters used in the resizing hook, potentially improving performance and user experience. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Removes the extra margin added in the View Mode when Navigation is as Sidebar. It was noticed that the width of the sidebar was already accounted for and was reduced from the available width unnecessarily Fixes #35618 /ok-to-test tags="@tag.IDE" <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10349675002> > Commit: 9778e83 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10349675002&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.IDE` > Spec: > <hr>Mon, 12 Aug 2024 10:18:59 UTC <!-- end of auto-generated comment: Cypress test results --> Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> - **Improvements** - Enhanced the auto-resizing behavior of the app's canvas by streamlining the parameters used in the resizing hook, potentially improving performance and user experience. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Description
Removes the extra margin added in the View Mode when Navigation is as Sidebar. It was noticed that the width of the sidebar was already accounted for and was reduced from the available width unnecessarily
Fixes #35618
Automation
/ok-to-test tags="@tag.IDE"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/10349675002
Commit: 9778e83
Cypress dashboard.
Tags:
@tag.IDE
Spec:
Mon, 12 Aug 2024 10:18:59 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit