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

Add error detection to live browser launching and connecting. - #492

Merged
chrisbank merged 3 commits into
masterfrom
live-development
Mar 28, 2012
Merged

Add error detection to live browser launching and connecting.#492
chrisbank merged 3 commits into
masterfrom
live-development

Conversation

@gruehle

Copy link
Copy Markdown
Member

This commit also restricts live browser connections to HTML files only, and disables auto-reconnect when switching to a new HTML file.

@chrisbank

Copy link
Copy Markdown
Contributor

reviewing

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I was just wondering how come NativeApp.openLiveBrowser is using callbacks instead of $.Deferred.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

That is the way Jonathan wrote it. I agree it should return a promise, and have made that change.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah, no worries. Not directly related to this, but do you see wrapping other brackets_extensions.js functions here (like should I add the corresponding closeLiveBrowser here)? The main benefit I see is translating other async brackets extensions to use $.Deferred here since we shouldn't depend on jQuery in the brackets_extensions. This would somewhat mirror what happened to the brackets.fs async code.

I could also be looking for patterns and abstractions when none are needed and if there aren't much more native calls then we could refactor to not use this anymore.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

We have a pretty consistent pattern that is working well: the brackets.* functions are all minimal, without any external dependencies, and all brackets.* functions are wrapped in something higher level for general consumption. I don't think this is overly abstracting.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Oh, and I've wrapped closeLiveBrowser in my local branch.

@chrisbank

Copy link
Copy Markdown
Contributor

looks good

chrisbank added a commit that referenced this pull request Mar 28, 2012
Add error detection to live browser launching and connecting.
@chrisbank
chrisbank merged commit 2d8b8c9 into masterMar 28, 2012
gideonthomas pushed a commit to gideonthomas/brackets that referenced this pull request May 10, 2017
updated code to load hidden image and use that url to load our canvas; indentation fixes, added basic error handling for callback of line 24
attempt to take the code from filters.js and put it into ImageViewer.js fixes the swatches not loading and allows canvas to be shown for multiple images, but save problem persists
First fixes
Abstract base64 to buffer conversion logic
Cleanup image filter code
Update main.js
"added a comma to fix build error"
got rid of extra lines that weren't working with current build
reverted change to dimensionString
fixed a capitalization typo for Image.js require
updated caman library with comment block for details of license, url, etc
updated base64toBuffer to be in fileUtils
fixed a variable name typo [FileUtils] to [FilerUtils]
updated to make text fixes (IMAGE_FILTER to IMAGE_FILTERS_TITLE and alignment), and removed the filesystemRefresh function (seems stable from my testing)
Some styling updates to the image filter UI.
Added a progress spinner
De-selecting selected filter after it's applied to the image.
Hard to force a style override and fixed a nit.
Code style fixes
gideonthomas pushed a commit to gideonthomas/brackets that referenced this pull request May 10, 2017
updated code to load hidden image and use that url to load our canvas; indentation fixes, added basic error handling for callback of line 24
attempt to take the code from filters.js and put it into ImageViewer.js fixes the swatches not loading and allows canvas to be shown for multiple images, but save problem persists
First fixes
Abstract base64 to buffer conversion logic
Cleanup image filter code
Update main.js
"added a comma to fix build error"
got rid of extra lines that weren't working with current build
reverted change to dimensionString
fixed a capitalization typo for Image.js require
updated caman library with comment block for details of license, url, etc
updated base64toBuffer to be in fileUtils
fixed a variable name typo [FileUtils] to [FilerUtils]
updated to make text fixes (IMAGE_FILTER to IMAGE_FILTERS_TITLE and alignment), and removed the filesystemRefresh function (seems stable from my testing)
Some styling updates to the image filter UI.
Added a progress spinner
De-selecting selected filter after it's applied to the image.
Hard to force a style override and fixed a nit.
Code style fixes
Sign up for freeto 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.

2 participants

@gruehle@chrisbank