I'm working on the pre-merged modern-dispatching branch that Leslie
kindly provided and I've discovered a flaw -- thought I'd discuss it
here first before actually refactoring code.

First, the new navigation concept is better than the old one. I like the
container abstraction. Things are nicer.

Problem is, the new design conflates three different concepts:
dispatching, rendering a selector (menu) and rendering selected content
(navigated content). This is good for simple demo applications, but not
good at all for larger apps. Two problems that my app hits immediately:

1. I need to have the menu rendered separately from the content, and no,
I do not want to use position: absolute in CSS.

2. Even if I wanted to use position: absolute, it is awkward to
reasonably style the navigation, because what you get is:

<div id="my-nav" class=".... navigation">
  <div class="navigation-menu"> (I changed that from the useless "view menu")
    ... menu items go here ...
  </div>
  <div class="navigation-body">
    .. navigated content goes here...
  </div>
</div>

Now, image we have multiple navigation widgets on one page. See the
problem? You can't select items of class navigation-menu by id, because
they have no id. The parent navigation widget has an id, but that is
useless, as you really want to apply styling ONLY to the specific
instance of navigation menu. As a result you get very long selectors.

Granted, the second issue is more of an inconvenience, than a real
problem, but I think it points to a design issue.

The interface I think I would like to have is:

  (make-navigation ...) returning a single container with both the menu
  and the content -- for simple cases,
  
  (make-split-navigation ...) returning a list with separate menu and
  content widgets, with separate ids.

More fundamentally, I think this is an "inherit vs contain" problem --
conceptually, navigation should not BE its selected content. It should
BE a dispatcher and possibly BE a selector, but it should KNOW ABOUT and
influence selected content.

I think fixing this will allow us to untangle the whole
dispatcher/selector/selector-mixin/selector-item/navigation business,
which I think is way too complex right now.

Thoughts?

--J.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to