-
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
feat: New tab ui changes #33228
feat: New tab ui changes #33228
Conversation
WalkthroughWalkthroughThe recent updates to the IDE module's Changes
Assessment against linked issues
Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
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 Configration 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: 4
Out of diff range and nitpick comments (1)
app/client/src/pages/Editor/IDE/EditorTabs/AddButton.tsx (1)
22-32
: Review the use ofisIconButton
andkind
properties on theButton
.The
isIconButton
andkind="secondary"
properties are used here. Ensure that these settings align with the design specifications for buttons in this context. It's important that the visual representation matches the intended design, especially in a UI-focused update.
if (segmentMode === EditorEntityTabState.Add) { | ||
return null; | ||
} |
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.
Consider handling the EditorEntityTabState.Add
state outside of the AddButton
component.
The current implementation returns null
when segmentMode
is EditorEntityTabState.Add
, which might be better handled by the parent component deciding not to render AddButton
at all. This would keep the AddButton
component's responsibility focused solely on its own rendering and behavior.
if (isJSLoading) { | ||
return ( | ||
<Flex px="spaces-2"> | ||
<Spinner size="md" /> | ||
</Flex> | ||
); | ||
} |
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.
Ensure accessibility and loading state representation.
While displaying a spinner during loading is good, consider adding an aria-busy="true"
attribute to the button or a relevant container when isJSLoading
is true. This improves accessibility by informing screen reader users that the content is being loaded.
/build-deploy-preview skip-test=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/8984640047. |
Deploy-Preview-URL: https://ce-33228.dp.appsmith.com |
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: 2
/build-deploy-preview skip-test=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9015505258. |
Deploy-Preview-URL: https://ce-33228.dp.appsmith.com |
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: 1
Out of diff range and nitpick comments (2)
app/client/src/pages/Editor/IDE/EditorPane/JS/JSRender.test.tsx (2)
Line range hint
72-91
: Ensure consistency in test descriptions and expected outcomes.The test description for "Renders Fullscreen Add in Blank State" should clearly state the expected behavior and outcomes, especially since this test seems to focus on the new tab functionality. Consider revising the description to better reflect the test's purpose.
269-278
: Ensure accurate test setup for split screen scenarios.In the test "Renders JS add routes in Split Screen", consider adding more detailed setup to explicitly simulate the split screen environment, ensuring that the test accurately reflects the user interaction in such a scenario.
const { container, getAllByText, getByTestId, getByText } = render( | ||
<Route path={BUILDER_PATH}> | ||
<IDE /> | ||
</Route>, | ||
{ | ||
url: "/app/applicationSlug/pageSlug-page_id/edit/jsObjects/js_id3/add", | ||
initialState: state, | ||
featureFlags: FeatureFlags, | ||
}, | ||
); | ||
|
||
// There will be 2 JSObject3 text (editor tab and Editor form) | ||
expect(getAllByText("JSObject3").length).toEqual(2); | ||
// Tabs active state | ||
expect( | ||
getByTestId("t--ide-tab-JSObject3").classList.contains("active"), | ||
).toBe(false); | ||
// Check if the form is rendered | ||
expect(container.querySelector(".js-editor-tab")).not.toBeNull(); | ||
// Check if the code and settings tabs is visible | ||
getByRole("tab", { name: /code/i }); | ||
getByRole("tab", { name: /settings/i }); | ||
// Check if run button is visible | ||
getByRole("button", { name: /run/i }); | ||
// Check js object is not rendered. Instead new tab should render | ||
expect(container.querySelector(".js-editor-tab")).toBeNull(); | ||
// Check is new tab is visible | ||
getByText("New JS"); |
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.
Check for potential issues with tab state management.
In the test "Renders JS add routes in Full Screen", the assertion on line 248 checks if the tab for "JSObject3" is not active, which contradicts the expected behavior of treating new tabs as active. This might indicate a problem with how the tab state is managed or a misunderstanding in the test's intent. Please verify this behavior.
/build-deploy-preview skip-test=true |
/build-deploy-preview skip-test=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9077292875. |
Deploy-Preview-URL: https://ce-33228.dp.appsmith.com |
Description
Added new design of New Query/Js tab design.
Fixes #33116
Automation
/ok-to-test tags="@tag.All"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9084312304
Commit: 48223f4
Cypress dashboard url: Click here!
Communication
Should the DevRel and Marketing teams inform users about this change?