This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Resizer module should provide better information for error condition #6252
Comments
ghost
assigned peterflynn
Dec 16, 2013
I have a fix locally |
@peterflynn Will you implement the fix or is this still open for beginners like myself? |
peterflynn
added a commit
that referenced
this issue
Mar 20, 2014
- Add a fail-fast warning when missing DOM id will cause bottom panels to not get created correctly (per #6252) - Add extra FileSystem unit tests around the fs root - Fix bits of the ProjectManager exclusion regex that were missing trailing "$" (I verified these are all full names, not just prefixes), and add WebStorm project state as an excluded item - Slightly better messages when unit tests fail due to a Promise resolution going the wrong way - Fix some minor JSLint errors
I've added a warning for this to PR #7264, along with improved docs indicating that an id is actually required |
turhothgor-dev
pushed a commit
to turhothgor-dev/brackets
that referenced
this issue
Mar 29, 2014
- Add a fail-fast warning when missing DOM id will cause bottom panels to not get created correctly (per adobe#6252) - Add extra FileSystem unit tests around the fs root - Fix bits of the ProjectManager exclusion regex that were missing trailing "$" (I verified these are all full names, not just prefixes), and add WebStorm project state as an excluded item - Slightly better messages when unit tests fail due to a Promise resolution going the wrong way - Fix some minor JSLint errors
Oops, FBNC @redmunds -- the PR landed last sprint. |
Confirmed. Closing. |
khatastroffik
pushed a commit
to khatastroffik/brackets
that referenced
this issue
Jul 21, 2017
…with a comment will break As mentioned in adobe#6252, the original error msg isn't really helpful. The modified msg could be improved as well, though: Since the content of the panel may be a **HTML fragment** (usually starting with a DIV node), mentioning that ```the **first** (root) DOM node must have an ID that will be used as a pref key``` would help. Nevertheless, the mangled code in WorkspaceManager.js isn't reliable since it will _break_ when the panel content **starts with a html comment**. Such a comment may be necessary when a plugin like HTMLhint is used. On a "panel" code fragment, this plugin attests an error due to a missing doctype. To disable this error, one may put a comment at the top of the html code: ```<!--htmlhint doctype-first: false-->```. WorkspaceManager.js will fail creating the panel, then. The proposed modification fixes such an issue. **sample test code for a resizable panel** ``` <!--htmlhint doctype-first: false--> <!--This comment is of no use but for testing purpose--> <div id="my-very-special-testing-panel"><span style="color: red">Elvis</span> was here!</div> ```
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
As described in this Brackets-Dev discussion thread, the message "Preference key 'undefined' must be a string" is not very helpful.
The problem is that Resizer expects an id on panel, so a simple fix would be for Resizer to verify panel has an id and otherwise display a message in console.
Note that this condition will most likely only affect Extension Authors while developing a new panel, so a console message should be sufficient feedback.
The text was updated successfully, but these errors were encountered: