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

Fix #2, NewProjectPanel persistent state #15

Merged
merged 1 commit into from
May 20, 2024

Conversation

paulober
Copy link
Collaborator

@paulober paulober commented May 9, 2024

Implemented persistent state for all properties in the NewProjectPanel webview except the file inputs for ninja, cmake and python executables.

@paulober paulober requested a review from will-v-pi May 9, 2024 16:39
Copy link
Collaborator

@will-v-pi will-v-pi left a comment

Choose a reason for hiding this comment

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

All looks great, thanks! One small thing - could you also persist the state of show/hide advanced options?

@paulober
Copy link
Collaborator Author

All looks great, thanks! One small thing - could you also persist the state of show/hide advanced options?

I'm confused. It should already persist the state of show/hide advanced options. If you open the panel and select show advanced options and the select a different tab, it will toggle the show advanced options for you after switching back to the new project panel.

@will-v-pi
Copy link
Collaborator

will-v-pi commented May 20, 2024

I'm confused. It should already persist the state of show/hide advanced options. If you open the panel and select show advanced options and the select a different tab, it will toggle the show advanced options for you after switching back to the new project panel.

Ah - it looks like the bug I've actually found is that something seems to go wrong if you change CMake or Python versions to anything other than the default. If I click Show Advanced Options, set CMake Version to Select Version, then go to a different tab and come back, the Advanced Options are hidden again and none of the CMake Version radio buttons are selected

Ninja works fine, it's just CMake and Python that break it (I think)

@will-v-pi
Copy link
Collaborator

It looks like it's because I don't have a system CMake install, so it crashes at document.getElementById('cmake-radio-system-version').checked = state.cmakeMode == 1; as there is no element with that ID

@paulober
Copy link
Collaborator Author

@will-v-pi You're right there where some null pointer exceptions because of the platform dependent DOM generation. Should be fixed now. Thanks for testing.

Signed-off-by: paulober <44974737+paulober@users.noreply.github.com>
@paulober paulober force-pushed the fix-2-newprojectpanel-persistent-state branch from 64d10c6 to 7dc96a8 Compare May 20, 2024 15:48
Copy link
Collaborator

@will-v-pi will-v-pi left a comment

Choose a reason for hiding this comment

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

All looks good now, and works on my Windows and RPiOS - thanks!

@paulober paulober merged commit 60db575 into main May 20, 2024
1 check passed
@paulober paulober deleted the fix-2-newprojectpanel-persistent-state branch May 20, 2024 16:05
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.

2 participants