Skip to content

feat: allow resizing/collapsing source/selected element panels #2196

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

Merged
merged 4 commits into from
Jul 22, 2025

Conversation

eglitise
Copy link
Collaborator

This PR adds support for resizing and collapsing of the source and selected element panels shown in the Session Inspector, as suggested in #766.
I've also set a fixed width for the fixed columns in the selected element tables (they leave too much blank space until the next column, which looks even worse if the source panel is collapsed), as well as increased the width of the send keys input field.
Here is a brief demo:

draggable.mp4

@github-actions github-actions bot added the enhancement New feature or request label Jul 21, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements resizable and collapsible panels for the source tree and selected element panels in the Session Inspector using Ant Design's Splitter component. The changes improve the user interface by allowing dynamic layout adjustment and better space utilization.

  • Replaces fixed 50/50 split layout with resizable splitter panels that can be collapsed
  • Sets fixed column widths for selected element tables to improve visual consistency
  • Increases the width of the send keys input field for better usability

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
Inspector.jsx Replaces div-based layout with Ant Design Splitter component and configures panel sizing
Inspector.module.css Refactors CSS classes, removes legacy layout styles, and adjusts component styling
SelectedElement.jsx Adds fixed width constraints to table columns for consistent spacing
main.css Adds global styling for splitter bar margins

@@ -105,6 +105,7 @@ const SelectedElement = (props) => {
dataIndex: 'name',
key: 'name',
fixed: 'left',
width: 150,
Copy link
Preview

Copilot AI Jul 21, 2025

Choose a reason for hiding this comment

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

The hardcoded width value of 150 should be defined as a CSS variable or constant to improve maintainability and consistency across the codebase.

Suggested change
width: 150,
width: ATTRIBUTE_COLUMN_WIDTH,

Copilot uses AI. Check for mistakes.

@@ -134,6 +135,7 @@ const SelectedElement = (props) => {
dataIndex: 'find',
key: 'find',
fixed: 'left',
width: 150,
Copy link
Preview

Copilot AI Jul 21, 2025

Choose a reason for hiding this comment

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

The hardcoded width value of 150 is duplicated from line 108. This should be defined as a CSS variable or constant to avoid duplication and ensure consistency.

Copilot uses AI. Check for mistakes.

Copy link
Member

@KazuCocoa KazuCocoa left a comment

Choose a reason for hiding this comment

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

Looks great 🚀

@eglitise eglitise merged commit 7eb145e into appium:main Jul 22, 2025
7 checks passed
@eglitise eglitise deleted the add-draggables branch July 22, 2025 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants