This repository has been archived by the owner. It is now read-only.

Factor out code from CodelabList, CodelabElement and CodelabForm clas… #11

Open
wants to merge 19 commits into
base: master
from

Conversation

2 participants
@tmst
Copy link

tmst commented Oct 21, 2015

…ses into respective ItemList, ItemElement and ItemForm base classes

Factor out code from CodelabList, CodelabElement and CodelabForm clas…
…ses into respective ItemList, ItemElement and ItemForm base classes
@googlebot

This comment has been minimized.

Copy link

googlebot commented Oct 21, 2015

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

@tmst

This comment has been minimized.

Copy link
Author

tmst commented Oct 21, 2015

Added commit author email to PR Google acct. The CLA check still fails. Any suggestions?

@googlebot

This comment has been minimized.

Copy link

googlebot commented Oct 21, 2015

CLAs look good, thanks!

tmst added some commits Oct 21, 2015

Fix newItem.level not getting set in CodelabList::resetForm(). Remove…
… completed todo: comments. Remove experimental factory code.
Change implementation of <codelab-form> element to contain <item-elem…
…ent> rather than extend it. Make use of <content> tags inside <item-form> to insert <codelab-form> content.
Catch events fired by base class elements <item-form> and <item-eleme…
…nt> in respective subclass elements <codelab-form> and <codelab-element>. This makes it possible for subclass, rather than superclass methods to be invoked in response to events in the superclass elements.

Replace <item-form> with <codelab-form> in <codelab-element>.

Make CodelabList::filter() have a single exit point.

Remove unneeded 'editing' attribute when instantiating <codelab-form> inside <codelab-list>.

Insert hack into Item factory unfortunately needed to prevent execution with null 'type' parameter (bug).

Create new event handlers in ItemElement to dispatch button click events to subclass.

Remove 'on-formnotneeded' and 'on-itemvalidated' event catchers from <item-element> as they were preventing proper subclass methods from being called.

Create new ItemForm::submit() and ItemForm::cancel() methods to catch events from <item-form> and dispatch to subclass.

<item-form> no longer needs to catch the 'submit' event as it is done by the buttons themselves. And it certainly doesn't need to call ItemElement::validateItem() for reason discussed above.
Fix remaining chars not displaying in <item-form>. Cause remains unkn…
…own but probably related to problem in inheritance mechnanism (<codelab-form> tied to CodelabForm, which extends ItemForm yet doesn't itself extend <item-form>).
Move superclass method calls to end of subclass implementations, fixi…
…ng the newItem.level problem with not being displayed. Pull some CSS from <item-*> templates into <codelab-*> templates (needed because, again, <codelab-*> elements not extending respective <item-*> elements.
Finish getting form messages working correctly. This pretty much wrap…
…s up getting all functionality in the master branch into the refactored one.
Finish getting form messages working correctly.
This pretty much wraps up getting all functionality in the master branch into the refactored one.
Revert "Finish getting form messages working correctly."
This reverts commit 9f3640a.

Try to reverse unwanted divergence from origin.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.