-
Notifications
You must be signed in to change notification settings - Fork 124
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
IEP-1382 GH #1093: Drag the window to change the size but not in the expectation. #1108
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request introduces layout modifications to the Changes
Possibly related PRs
Suggested reviewers
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 using PR comments)
Other keywords and placeholders
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: 1
🧹 Nitpick comments (1)
bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/templates/NewProjectCreationWizardPage.java (1)
Line range hint
77-106
: Consider extracting layout configuration to improve maintainabilityThe UI layout code is currently mixed with business logic and scattered across different methods. Consider:
- Extracting layout configurations into a separate helper class or methods
- Using constants for common layout parameters
- Creating reusable layout utility methods for similar components
This would make the code more maintainable and ensure consistent layout behavior across the wizard.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/templates/NewProjectCreationWizardPage.java
(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: build
- GitHub Check: build_macos
🔇 Additional comments (3)
bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/templates/NewProjectCreationWizardPage.java (3)
77-77
: LGTM! Appropriate layout configuration for target selection compositeThe GridData configuration correctly allows horizontal expansion while maintaining vertical compactness, which is ideal for form-like layouts.
106-106
: LGTM! Appropriate layout configuration for project name fieldThe GridData configuration correctly allows the text field to expand horizontally while maintaining its vertical size, which is the expected behavior for text input fields.
Line range hint
77-106
: Verify layout behavior across platformsSince this is a UI layout change, please ensure:
- The layout behaves correctly on all supported platforms (Windows, Linux, macOS)
- The changes don't negatively impact any dialogs or wizards that might extend this class
- The window resizing works correctly with different screen resolutions and DPI settings
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false); | ||
gridData.horizontalSpan = 20; | ||
gridData.verticalSpan = 5; | ||
|
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.
🛠️ Refactor suggestion
Replace fixed spans with fill-based layout
Using fixed span values (20, 5) can cause layout issues when resizing the window. Consider using a fill-based approach instead.
- GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
- gridData.horizontalSpan = 20;
- gridData.verticalSpan = 5;
+ GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false); | |
gridData.horizontalSpan = 20; | |
gridData.verticalSpan = 5; | |
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false); | |
@sigmaaa hi ! Tested under: LGTM 👍 |
Description
Before:
![image](https://private-user-images.githubusercontent.com/24419842/400760793-a67cb740-ab60-4fe7-9e9a-deebc3f97a80.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMjUxOTIsIm5iZiI6MTczOTEyNDg5MiwicGF0aCI6Ii8yNDQxOTg0Mi80MDA3NjA3OTMtYTY3Y2I3NDAtYWI2MC00ZmU3LTllOWEtZGVlYmMzZjk3YTgwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDE4MTQ1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY0MTZmMWQ4YTMxNGI1OGU4OGM4MTEzYmUyMmVmOTZlZTY1MzI2ODJiOGZhOGNhYzNmM2I4OTJlOGNhNTNhNmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.wnlQubR_Xb-H2G2u9NHFh72hd3O-nPjYy0J6OOjTae0)
After:
![image](https://private-user-images.githubusercontent.com/24419842/400760683-33e69045-ea07-4411-ba37-0b8f3098e8a9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMjUxOTIsIm5iZiI6MTczOTEyNDg5MiwicGF0aCI6Ii8yNDQxOTg0Mi80MDA3NjA2ODMtMzNlNjkwNDUtZWEwNy00NDExLWJhMzctMGI4ZjMwOThlOGE5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDE4MTQ1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc0N2YyYzhjZmNjNWYwZDdiMGUyYjljOTE5ZWJkZWE3NzBlZDc5MmM5Y2E1OWEzM2RiYzVhMmUyNWY0MTc4NDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.i09bsJJD5cIMkj3BWCvdeEl0u_Dp5b1SVBLGnNE3fWY)
Fixes # (IEP-1382)
Type of change
Please delete options that are not relevant.
How has this been tested?
Open a new project wizard and maximize the window
Test Configuration:
Dependent components impacted by this PR:
-New project wizard
Checklist
Summary by CodeRabbit