Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Fix #5062: Update notification is no longer modal #5085

Merged
merged 4 commits into from
Sep 18, 2013
Merged

Fix #5062: Update notification is no longer modal #5085

merged 4 commits into from
Sep 18, 2013

Conversation

TomMalbran
Copy link
Contributor

Fix for issue #5062.

  • Changed to using JavaScript to only show the last modal backdrop, since it can't be properly done in CSS.
  • Added a new focus on AppReady to resend the focus to the dialog, since it gets lost when the file is open after the dialog.

@ghost ghost assigned RaymondLim Sep 6, 2013

AppInit.appReady(function () {
$dlg.find("button").focus();
});
Copy link
Member

Choose a reason for hiding this comment

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

This seems to differ from the button-focusing logic in the "shown" handler. Should be hoisted out into a shared helper function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could, but this is only required when the dialog is opened before the app is ready, which will happen in very few places. Maybe we could just move the update notification logic to the app ready?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should move the update notification logic to the app ready.

@RaymondLim
Copy link
Contributor

Done initial review. Everything looks good except the button-focusing logic in App ready.

@TomMalbran
Copy link
Contributor Author

@RaymondLim Done. Moved the first check for updates to be done on App ready.

@njx
Copy link
Contributor

njx commented Sep 13, 2013

Removing @RaymondLim since he's out for a few days and I think we should try to merge this soon. Will reassign in tomorrow's standup.

@ghost ghost assigned RaymondLim Sep 13, 2013
@julianasuh
Copy link
Contributor

Assign back to Raymond as he will be back on 9/17 from his PTO.

@@ -330,6 +331,11 @@ define(function (require, exports, module) {
// Append locale to version info URL
_versionInfoURL = brackets.config.update_info_url + brackets.getLocale() + ".json";

// Check for updates on App Ready
AppInit.appReady(function () {
checkForUpdate();
Copy link
Contributor

Choose a reason for hiding this comment

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

Now we're checking for update regardless of whether "skipUpdateCheck" is specified in the UrlParams or not. When this call is in the old location, it won't be invoked if "skipUpdateCheck" is specified. Not sure how to test with UrlParams. @gruehle, we need your opinion on this.

Copy link
Member

Choose a reason for hiding this comment

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

The "skipUpdateCheck" is required for test windows to work correctly. Without that test, every test window would check for updated.

The call in the old location also checks "inBrowser", since we don't want to do update notification checks while running in browser.

@TomMalbran - is there a reason why this check was moved here? If not, it would be best to keep it in brackets.js.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @gruehle. Tom moves it here because the old location is too early to show the update dialog and consequently the dialog is losing focus to the main editor causing issue #5602.

@TomMalbran I think we can keep this call back in brackets.js, but in a different location where we're done with asynchronous loading of the editor. That is, moves the entire if block that contains this call to the line above PerfUtils.addMeasurement("Application Startup");.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@RaymondLim I was thinking of just moving this block to the old location. I will test if that works, but it might make sense to do it in that way. If it doesn't work i'll test that.

Note: It seems to work fine.

@RaymondLim
Copy link
Contributor

Looks good. Merging.

RaymondLim added a commit that referenced this pull request Sep 18, 2013
Fix #5062: Update notification is no longer modal
@RaymondLim RaymondLim merged commit faa5dd7 into adobe:master Sep 18, 2013
@TomMalbran TomMalbran deleted the tom/issue-5062 branch September 18, 2013 14:19
@peterflynn peterflynn mentioned this pull request Mar 19, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants