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

core: fix about dialog #11687

Merged
merged 2 commits into from
Sep 27, 2022
Merged

core: fix about dialog #11687

merged 2 commits into from
Sep 27, 2022

Conversation

vince-fugnitto
Copy link
Member

@vince-fugnitto vince-fugnitto commented Sep 21, 2022

What it does

Fixes: #11669.

The pull-request fixes an issue where singleton react-dialogs cannot be updated after they have been closed since they are unmounted. The dialogs are mounted (constructor) and unmounted when closed but this poses a problem for singletons, where even if closed can be re-opened. The change ensures that if a react-dialog receives an update request we confirm that the dialog is first mounted, and if not, we mount it.

I included a secondary commit which enhances the about dialog and includes some additional information:

Screen Shot 2022-09-22 at 9 17 31 AM

How to test

  1. start the application
  2. open the about dialog - help > about
  3. close the dialog with esc or clicking the x
  4. re-open the about dialog - help > about
  5. confirm the dialog is re-opened and the content is correct

Review checklist

Reminder for reviewers

Signed-off-by: vince-fugnitto [email protected]

The commit fixes the `about` dialog which is a `singleton` and once removed or closed will cause the dialog to be unmounted. The change ensures that if an `update-request` is sent to the widget we confirm first if the widget is mounted, and mount if not.

Signed-off-by: vince-fugnitto <[email protected]>
@vince-fugnitto vince-fugnitto added dialogs issues related to dialogs react issues related to the react language labels Sep 21, 2022
@vince-fugnitto
Copy link
Member Author

Alternatively we can make the about dialog a factory but I thought a general fix for singleton react-dialogs was also useful.

The commit updates the `about` dialog to include additional information such as:
- theia version
- default vscode api
- compatibility report link

Signed-off-by: vince-fugnitto <[email protected]>
Copy link
Contributor

@alvsan09 alvsan09 left a comment

Choose a reason for hiding this comment

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

I can confirm that the changes work as expected 👍
The code looks good to me!
Thanks Vince !

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

The changes look good to me as well 👍 I can confirm that the issue exists on master and is addressed by this change nicely. Also the new about information is quite useful.

@vince-fugnitto vince-fugnitto merged commit 80839c5 into master Sep 27, 2022
@vince-fugnitto vince-fugnitto deleted the vf/about-dialog branch September 27, 2022 15:47
@github-actions github-actions bot added this to the 1.30.0 milestone Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dialogs issues related to dialogs react issues related to the react language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot open ReactDialog after closing
3 participants