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

Add validation for existing setup path #1228

Merged
merged 12 commits into from
Aug 5, 2024

Conversation

radurentea
Copy link
Collaborator

@radurentea radurentea commented Jun 26, 2024

Description

Added validation for esp-idf path, when user selects "Find ESP-IDF in your system" while configuring the extension.

Jira: VSC-1174

Type of change

  • Enhancement

Steps to test this pull request

  • Configure extension:
    image
  • Choose "Select ESP-IDF version:
  1. Try to do it with a valid esp-idf folder (it should work)
  2. Try to do it with an invalid esp-idf folder (error should appear and install button should be disabled)
    image

How has this been tested?

As described above

Test Configuration:

  • ESP-IDF Version: 5.2.2
  • OS (Windows,Linux and macOS): Windows 11

Checklist

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

Copy link

github-actions bot commented Jun 26, 2024

Download the artifacts for this pull request:

Copy link
Collaborator

@brianignacio5 brianignacio5 left a comment

Choose a reason for hiding this comment

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

Few comments but otherwise LGTM

src/setup/SetupPanel.ts Outdated Show resolved Hide resolved
src/views/setup/Install.vue Outdated Show resolved Hide resolved
src/views/setup/components/selectEspIdf.vue Show resolved Hide resolved
@radurentea
Copy link
Collaborator Author

radurentea commented Jun 27, 2024

This should not be tested yet. New improvements were requested by Kondal and I'm currently working on implementing them.

@radurentea radurentea requested a review from brianignacio5 June 28, 2024 08:21
@radurentea
Copy link
Collaborator Author

All changes are done, can be tested

@AndriiFilippov
Copy link
Collaborator

AndriiFilippov commented Jul 1, 2024

@radurentea hi !

Tested under:
OS - Windows 10

tested with multiple esp-idf folders, do see validation ✔️

But there is a small issue with validation:
The ESP-IDF path always stores the valid path. If you want to reconfigure your extension and during reconfiguration select the wrong path - there is a validation ✔️ BUT -> click "Home" and return back. It will still store the correct (previous) path, but the invalid path selection will remain.

@radurentea
Copy link
Collaborator Author

@AndriiFilippov Thank you, I've fixed the issue. When you have time please test it again

@radurentea radurentea force-pushed the enhance/existing-idf-path-validation branch from e23c752 to 43e8d81 Compare July 2, 2024 11:09
@radurentea
Copy link
Collaborator Author

image
Fixed and I've also stylized a bit also the following bug found by Andrii on the configuration page, where we were displaying the text wrongly.

@AndriiFilippov
Copy link
Collaborator

@radurentea hi !

good 👍

validation should works only for existing ESP-IDF folder.
Download ESP-IDF case:

image

@AndriiFilippov
Copy link
Collaborator

@radurentea hi !

everything works ✔️
LGTM 👍
but it is still uncomfortable to get validation just on unfocus. Are there any chances to somehow maneuver around this situation?

@radurentea
Copy link
Collaborator Author

Hi Andrii, we've discussed this before the implementation and we agreed on this. We can't make it real time because there will be to many calls

@radurentea radurentea added this to the v1.8.1 milestone Jul 9, 2024
@radurentea
Copy link
Collaborator Author

Hi @brianignacio5, PTAL again

Copy link
Collaborator

@brianignacio5 brianignacio5 left a comment

Choose a reason for hiding this comment

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

A few code duplication changes required.

On MacOS, I see the following error after pressing Express install option and the UI is empty so can't continue:
Screenshot 2024-07-09 at 16 51 24

src/views/setup/components/selectEspIdf.vue Show resolved Hide resolved
src/views/setup/store.ts Outdated Show resolved Hide resolved
src/views/setup/store.ts Show resolved Hide resolved
src/setup/SetupPanel.ts Outdated Show resolved Hide resolved
@radurentea radurentea self-assigned this Jul 24, 2024
@radurentea
Copy link
Collaborator Author

A few code duplication changes required.

On MacOS, I see the following error after pressing Express install option and the UI is empty so can't continue: Screenshot 2024-07-09 at 16 51 24

Hi @brianignacio5, please take another look with the new updates. I've tested on Mac and I couldn't not reproduce the error.

@radurentea radurentea requested a review from brianignacio5 July 24, 2024 11:33
Copy link
Collaborator

@brianignacio5 brianignacio5 left a comment

Choose a reason for hiding this comment

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

Tested on MacOS and the previous issue doesn't happen anymore.

LGTM

src/setup/SetupPanel.ts Outdated Show resolved Hide resolved
@radurentea
Copy link
Collaborator Author

Hi @AndriiFilippov, please test when you have a moment.

@AndriiFilippov
Copy link
Collaborator

@radurentea hi !

Tested under:
OS - Windows 11 / MacOS

LGTM 👍

@radurentea radurentea merged commit 061a3c9 into master Aug 5, 2024
6 checks passed
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