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

Live Preview server-side file support #2004

Merged
merged 5 commits into from
Nov 1, 2012
Merged

Conversation

redmunds
Copy link
Contributor

New code:

  • added api calls to define static and server html file extensions
  • now support opening server-side files with a base url
  • when launching live preview with a server-side file, prompt for base url and continue

Cleanup of existing code

  • removed unnecessary prefs parameter
  • some promise stuff

Known Issues

@redmunds
Copy link
Contributor Author

@jasonsanjose - ready for review

@ghost ghost assigned jasonsanjose Oct 31, 2012
var NativeApp = require("utils/NativeApp");
var Dialogs = require("widgets/Dialogs");
var Strings = require("strings");
var StringUtils = require("utils/StringUtils");
var ProjectManager = require("project/ProjectManager");
var PreferencesDialogs = require("preferences/PreferencesDialogs");
Copy link
Member

Choose a reason for hiding this comment

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

Can we clean this up to a single var decl?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hope I didn't go overboard :) I also lined up blocks and put lists in alphabetic order.

@jasonsanjose
Copy link
Member

Initial review complete

@redmunds
Copy link
Contributor Author

Changes pushed. Ready for re-review.

@jasonsanjose
Copy link
Member

I forgot to test this the first time, but I'm seeing the URL encoding issue #2003 when using an encoded URL, e.g. http://localhost/my%20folder/.

EDIT: Oops, I see that was listed under known issues. Ignore.

@jasonsanjose
Copy link
Member

Merging.

jasonsanjose added a commit that referenced this pull request Nov 1, 2012
Live Preview server-side file support
@jasonsanjose jasonsanjose merged commit 60eb4ea into master Nov 1, 2012
}

if (_isHtmlFileExt(doc.extension)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You're dropping one condition here and I think this is the culprit for the unit test failing.

You need to AND exports.config.experimental condition with your _isHtmlFileExt call.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This user story implements extensions other than .htm/.html, so it not experimental anymore.

Copy link
Contributor

Choose a reason for hiding this comment

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

Believe me on this. We're not usig HTMLDocument yet. It is still in experimental stage and therefore we were not creating it before this change. If you create an HTML document, then it will interfere with DOMAgent which is currently in use.

Anyway, have you tried it out to see it fixed the unit tests?

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.

3 participants