Skip to content
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-1090: Close the welcome page if opened when new project is created #1035

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

alirana01
Copy link
Collaborator

@alirana01 alirana01 commented Aug 22, 2024

Description

Close the welcome page if opened when new project is created

Fixes # (IEP-1090)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How has this been tested?

Keep the welcome page opened after installing tools and try creating new project. Welcome page should be closed

Test Configuration:

  • ESP-IDF Version: any
  • OS (Windows,Linux and macOS): all

Checklist

  • PR Self Reviewed
  • Applied Code formatting
  • Added Documentation
  • Verified on all platforms - Windows,Linux and macOS

Summary by CodeRabbit

  • New Features

    • Introduced functionality to programmatically close the welcome page in the Eclipse IDE, enhancing user control over the interface.
    • Integrated welcome page closure within the New Project creation flow, preventing it from remaining open during project setup.
  • Refactor

    • Streamlined the workflow in ManageEspIdfVersionsHandler by simplifying the logic for managing the welcome page visibility.

@alirana01 alirana01 self-assigned this Aug 22, 2024
Copy link

coderabbitai bot commented Aug 22, 2024

Walkthrough

The changes introduce a new static method closeWelcomePage in the IDFUtil class, allowing for the programmatic closure of the welcome page in the Eclipse IDE. This new functionality is utilized in the NewProjectHandler and ManageEspIdfVersionsHandler classes, simplifying their control flow by replacing nested checks with direct calls to closeWelcomePage. These modifications enhance user interaction with the IDE by ensuring the welcome page is closed when appropriate.

Changes

Files Change Summary
bundles/com.espressif.idf.core/src/com/espressif/idf/core/util/IDFUtil.java Added public static void closeWelcomePage(IWorkbenchWindow activeww) method to manage welcome page visibility.
bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/handlers/NewProjectHandler.java Integrated a call to IDFUtil.closeWelcomePage() in the execute method to close the welcome page when starting a new project.
bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/tools/ManageEspIdfVersionsHandler.java Refactored launchEditor method to utilize IDFUtil.closeWelcomePage(activeww), simplifying the logic for closing the welcome page.

Poem

🐰 In the realm of code where rabbits hop,
A welcome page closes, no need for a stop.
With a flick of a method, the clutter's all gone,
New projects now flourish, let the coding go on!
Hooray for the changes, so bright and so neat,
In the garden of software, we dance on our feet! 🌼


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Collaborator Author

@alirana01 alirana01 left a comment

Choose a reason for hiding this comment

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

Self Review

Copy link

@coderabbitai coderabbitai bot left a 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 UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 27f0735 and 4497017.

Files selected for processing (3)
  • bundles/com.espressif.idf.core/src/com/espressif/idf/core/util/IDFUtil.java (2 hunks)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/handlers/NewProjectHandler.java (2 hunks)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/tools/ManageEspIdfVersionsHandler.java (3 hunks)
Additional comments not posted (3)
bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/handlers/NewProjectHandler.java (1)

22-22: LGTM! The welcome page closure is correctly integrated.

The addition of IDFUtil.closeWelcomePage ensures that the welcome page is closed when a new project is created, aligning with the PR objective.

bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/tools/ManageEspIdfVersionsHandler.java (1)

19-19: Refactoring and cleanup approved.

The refactoring of launchEditor to use IDFUtil.closeWelcomePage simplifies the logic and improves readability. The removal of unused imports is also a positive change.

Also applies to: 41-41

bundles/com.espressif.idf.core/src/com/espressif/idf/core/util/IDFUtil.java (1)

821-838: New method closeWelcomePage is well-implemented.

The method correctly handles the closure of the welcome page using a synchronous UI thread execution. The null checks ensure robustness.

Copy link
Collaborator

@kolipakakondal kolipakakondal left a comment

Choose a reason for hiding this comment

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

LGTM

@kolipakakondal
Copy link
Collaborator

@AndriiFilippov Please review

@AndriiFilippov
Copy link
Collaborator

@alirana01 @kolipakakondal hi !
Isn't it the same #1005 ?
We already have this feature implemented

@kolipakakondal
Copy link
Collaborator

@alirana01 @kolipakakondal hi ! Isn't it the same #1005 ? We already have this feature implemented

This is about closing the welcome page when someone tries to create a new project, while this pull request is about closing the welcome page when you open the ESP-IDF Managers view. Most likely, these are two actions users perform when they first open the IDE.

@AndriiFilippov
Copy link
Collaborator

@alirana01 @kolipakakondal hi ! Isn't it the same #1005 ? We already have this feature implemented

This is about closing the welcome page when someone tries to create a new project, while this pull request is about closing the welcome page when you open the ESP-IDF Managers view. Most likely, these are two actions users perform when they first open the IDE.

doesn't matter because both actions lead to "ESP-IDF: Manager". I have just checked the master branch - everything works how it should.

@AndriiFilippov
Copy link
Collaborator

@alirana01 hi !

Tested under:
OS - Windows 11 / MacOS

Do see the "Welcome" page closes if open "New Espressif IDE Project" ✅

LGTM 👍

@alirana01 alirana01 merged commit 7a50c53 into master Aug 29, 2024
5 of 6 checks passed
@alirana01 alirana01 deleted the IEP-1090 branch August 29, 2024 10:42
@kolipakakondal kolipakakondal added this to the v3.1.0 milestone Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants