chore: Extracting out showNudge config from screen mode toggle component#38833
chore: Extracting out showNudge config from screen mode toggle component#38833ankitakinger merged 3 commits intoreleasefrom
showNudge config from screen mode toggle component#38833Conversation
WalkthroughThe pull request focuses on refactoring the Changes
Assessment against linked issues
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (8)
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 using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
app/client/src/pages/Editor/IDE/EditorTabs/ScreenModeToggle.tsx (1)
19-22: Consider using a more descriptive interface name.
Using a genericPropsname for the interface may lead to ambiguity in larger codebases. A more specific name (e.g.,ScreenModeToggleProps) could help with clarity.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
app/client/src/pages/Editor/IDE/EditorTabs/ScreenModeToggle.tsx(1 hunks)app/client/src/pages/Editor/IDE/EditorTabs/index.tsx(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: client-unit-tests / client-unit-tests
- GitHub Check: client-lint / client-lint
- GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
- GitHub Check: client-build / client-build
- GitHub Check: client-prettier / prettier-check
🔇 Additional comments (4)
app/client/src/pages/Editor/IDE/EditorTabs/ScreenModeToggle.tsx (1)
24-25: Well-structured prop usage.
DestructuringdismissNudgeandshowNudgefrom props is clean and easy to read.app/client/src/pages/Editor/IDE/EditorTabs/index.tsx (3)
13-17: Import organization looks good.
Bringing in theuseShowSideBySideNudgehook here helps keep concerns separated and the code maintainable.
39-39: Effective custom hook usage.
Destructuring[showNudge, dismissNudge]neatly conveys the hook’s returned values.
155-155: Consistent prop passing toScreenModeToggle.
PassingdismissNudgeandshowNudgealigns perfectly with the new interface.
app/client/src/pages/Editor/IDE/EditorTabs/ScreenModeToggle.tsx
Outdated
Show resolved
Hide resolved
app/client/src/pages/Editor/IDE/EditorTabs/ScreenModeToggle.tsx
Outdated
Show resolved
Hide resolved
…onent (appsmithorg#38833) ## Description Extracting out `showNudge` config from screen mode toggle component to make this component re-usable in other IDEs. Fixes [appsmithorg#37690](appsmithorg#37690) ## Automation /ok-to-test tags="@tag.Sanity, @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/12948269268> > Commit: 1a30130 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12948269268&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Sanity, @tag.IDE` > Spec: > <hr>Fri, 24 Jan 2025 11:40:32 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 - **New Features** - Introduced a new nudge system for side-by-side view functionality in the editor. - Enhanced user guidance with a dismissible nudge for screen mode switching. - **Improvements** - Refined state management for screen mode toggle by utilizing props. - Improved component prop handling for better flexibility and interactivity. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Description
Extracting out
showNudgeconfig from screen mode toggle component to make this component re-usable in other IDEs.Fixes #37690
Automation
/ok-to-test tags="@tag.Sanity, @tag.IDE"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12948269268
Commit: 1a30130
Cypress dashboard.
Tags:
@tag.Sanity, @tag.IDESpec:
Fri, 24 Jan 2025 11:40:32 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
New Features
Improvements