praekelt / go-proto-fsm

Prototype of a new Vumi Go campaign manager UI (also known as the spaghetti monster).
0 stars 0 forks source link

Let user connect components with lines #3

Closed andreit closed 10 years ago

justinvdm commented 10 years ago

Sorry, didn't realise tests were still to be coming. Will stop asking for tests until then. Happy with the general approach we are taking.

justinvdm commented 10 years ago

@andreit I think our services module is growing pretty fast. Maybe we need to split it up into submodules (either in or after this PR)?

Maybe a structure like:

services/utils.js
services/behaviour.js
services/router/layout.js
services/router/view.js
...
services/conversation/layout.js
services/conversation/view.js

Just a suggestion, whatever makes more sense to you. Thoughts?

justinvdm commented 10 years ago

I think we still need tests for:

Otherwise looks good :) Thanks for splitting up the services.

andreit commented 10 years ago

oh right... forgot about those

andreit commented 10 years ago

@justinvdm Added tests for the connection component and the layout. I test for the bounding box in one of the dragBehavior tests. Do you think we need some more?

justinvdm commented 10 years ago

Cool, thanks. I'd like a test for seeing that we draw the bounding box correctly (checking the positioning and sizing of the box, not just checking that exists). Might be overkill, but we have similar tests for every other svg component, so thought we might as well cover that one too.

justinvdm commented 10 years ago

@andreit sorry, didn't mention you in previous comment (so you might not have gotten a notification) ^^^

andreit commented 10 years ago

@justinvdm Yes, got it. Trying to figure out how to stub out getBBox. It doesn't work properly in the tests because the element is not actually attached to the browser's dom. :(

justinvdm commented 10 years ago

@andreit Ah, I see. Hmm, maybe its more work than its worth. Happy for this to land as is.

:+1:

andreit commented 10 years ago

@justinvdm Cool thanks. Will read up on how to do this later.