Skip to content

Conversation

@philschatz
Copy link
Member

Changed the Sidebar to always use a model for rendering.

depends on #102

Testing

  • load a repo
  • reload a different book
  • add a new book

@kathi-fletcher
Copy link
Member

This definitely has problems.

One of my modules in oerpub/test-book shows up multiple times "My branch new bmodule". And if I click on one of the alternates, I get Uncaught TypeError: Cannot read property 'getRoot' of undefined.

I tested this on a branch that had 102 merged (listed above as a dependency). Specifically it had 92, 94, 99, 102, and 107 merged. Other stuff was unmergeable, and I didn't merge 100, which was documentation, because it had code added to it after it was reviewed.

this causes problems when filteredCollection tries to keep its
collection in sync
it should at the very least send @ as an argument
Conflicts:
	scripts/gh-book/app.coffee
@philschatz
Copy link
Member Author

I think I fixed up all the problems; duplicate entries were showing up in the ToC when you clicked on a piece of content.

It was happening because the nodes in the ToC are actually Pointers to HTML files and I naively re-triggered xhtml-file events on the toc-pointer without changing the model in the (change, model, options) callback.

@kathi-fletcher
Copy link
Member

Something weird happened when I added a new book and then went to open that book. Look at the top of the TOC pane in this screenshot. It has gone blank.
something-weird-happened

@philschatz
Copy link
Member Author

I am not able to reproduce the blank ToC panel but I did reproduce the fact that the ToC panel contains all the books, not only the new "Test Book". Will look at this evening.

@kathi-fletcher
Copy link
Member

Unfortunately no cake from testing.

New books do not get new modules when you add a module. So sad. They float away. It gives this error:
Uncaught Error: BUG: Subclass must implement this method scripts/mixins/tree.coffee:46

@philschatz
Copy link
Member Author

Fixed the add issue (had to clean up mixins/tree.coffee by removing the almost-unused variable @_tree_root and instead use @getRoot())

Also, merged changes made to master.

@kathi-fletcher
Copy link
Member

Delete book is causing remote updater message and POST errors and is not saving the container.xml file.

I attempted to delete the book "Delete this book" in oerpub/test-book.

Deleting books on editor.oerpub.org works and doesn't generate errors.

scripts/gh-book/app.coffee:173
Updating local content because of remote changes (but there were no local changes) scripts/views/workspace/content/aloha-edit.coffee:45
POST https://api.github.com/repos/oerpub/test-book/git/trees 422 (Unprocessable Entity) api.github.com/repos/oerpub/test-book/git/trees:1
POST https://api.github.com/repos/oerpub/test-book/git/trees 422 (Unprocessable Entity) jquery.js:8434
Uncaught Error: BUG! remoteUpdater seems to be running twice. did you change repos? scripts/gh-book/remote-updater.coffee:45

@kathi-fletcher
Copy link
Member

Also adding a new module to a book triggers the save button. And if you then try to save, you get a bunch of post errors.

@kathi-fletcher
Copy link
Member

Adding a list of things to test on this pull request.

For all of these, watch the console to make sure that the right things are getting saved. The save button should not be triggered by any of the add/delete/rename actions.

Add a book
Delete a book
Open several books and look at TOC and the editor
Add a new module to a book
Rename a module
Move a module
Rename a book

@kathi-fletcher
Copy link
Member

Is this ready for retesting? Did Tom weigh in on delete book?

Copy link
Member

Choose a reason for hiding this comment

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

maybe the PR title is just misleading but wasn't the point of this to not use the toplevel anymore? also the first condition of this if is empty, but i can fix that

Copy link
Member

Choose a reason for hiding this comment

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

actually it seems like this whole section isn't needed anymore, i'm removing it unless @philschatz yells at me

Copy link
Member Author

Choose a reason for hiding this comment

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

nope, remove away; somehow I missed that reference to topLevel

Copy link
Member Author

Choose a reason for hiding this comment

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

Why not just return new EpubContainer() at the end of this module? (instead of returning the EpubContainer class)

Copy link
Member

Choose a reason for hiding this comment

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

thats what i originally did, but ran into some issue that i forget about and ended up doing it this way. could probably get it rejiggered without too much more effort but i'm not sure if its worth it

Copy link
Member Author

Choose a reason for hiding this comment

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

I just mention it because other singletons in the codebase are written that way (not that I like it; it's difficult to extend a class but it's consistent). routing, app, media-types, allContent are a few examples off the top of my head

@kathi-fletcher
Copy link
Member

OK -- I went through the test suite and think we are 🍰

There is a little timing bug but probably not a regression. If you add a new module, the save all button comes on, but if you click it things go haywire. If you don't click it, it goes back off on its own when the auto-saves happen. Will make a separate pivotal ticket about that.

kathi-fletcher added a commit that referenced this pull request Dec 6, 2013
Atc Picker uses Singleton instead of using topLevel
@kathi-fletcher kathi-fletcher merged commit ae22dca into master Dec 6, 2013
@kathi-fletcher kathi-fletcher deleted the atc-root-singleton branch December 6, 2013 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants