-
Notifications
You must be signed in to change notification settings - Fork 152
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
Implement Lists #94
Implement Lists #94
Conversation
08a1487
to
0ccf488
Compare
@mixonic Could use review. This is ready to go now. After review I can update the standalone renderers to handle lists |
61c9e08
to
9ce308c
Compare
QUnit.config.urlConfig.push({ | ||
id: 'debugTest', | ||
label: 'Debug Test' | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a little odd, perhaps, but it greatly improves debugging speed for acceptance tests. This adds a checkbox 'DebugTest' in the QUnit toolbar. Clicking it causes the page to reload and drop into the debugger right before starting the test. The flow I've been using is:
- run all tests (with dev tools open), click "rerun test" on any failing acceptance test
- click the "Debug Test" checkbox -> page reloads and the debugger activates
- step into the
originalCallback
test function and step through the lines in the test
I've found this to be a lot quicker than finding the test code in my text editor and reading through the steps to figure out what it is testing and what should be happening.
The caveat is that you need to import {test, module} from Helpers
in the acceptance test (instead of import {test, module} from QUnit
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 seems cool, eager to give it a try
@@ -104,6 +111,37 @@ function renderMarker(marker, element, previousRenderNode) { | |||
return textNode; | |||
} | |||
|
|||
function attachRenderNodeElementToDOM(renderNode, element, originalElement) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
if it is good enough for Alex, it's good for me: http://www.2ality.com/2015/08/object-literals-es5.html#trailing_commas_are_legal
* simplify editor reparse * update post parser to reparse list sections * hit enter to split a list item * can delete to exit a list * hitting enter in empty list item exits list section altogether * Use Helpers.dom.build rather than `makeDOM` * Test to ensure that hitting enter in a list exits the list appropriately
sweeeeeeeeetttttt |
ready to merge
fixes #86
This adds a:
ListSection
— inherits fromMarkupSection
and lives alongsideMarkupSection
s and cards in the post'ssections
listListItem
— inherits fromMarkupSection
and lives in the nesteditems
/sections
list on aListSection
, has a list ofmarkers
postEditor#splitSection
to deal with hitting enter on an empty final list itemListItem#splitAtMarker
that could be cleaned upeditor#reparse
by recognizing that there are fewer unexpected situations that could occurStil to do: