Menu

#239 (in 2.6.4) light 'select' menu tree. (using optgroups)

Work_in_progress
closed-fixed
Interface (183)
1
2005-09-10
2005-07-27
Edward Rudd
No

this is a small patch that will allow the
"select-based" light menu provide a subtree grouping of
databases using the optgroup tag in HTML 4.

it adds two configuration options (near the
LeftFrameTableSeparator option) and a 20 line block of
code in queryframe.php (if statement)

Discussion

  • Edward Rudd

    Edward Rudd - 2005-07-27

    patch based off of 2.6.3-pl1

     
  • Edward Rudd

    Edward Rudd - 2005-07-27

    path for update footer.inc.php updates the select menu table count

     
  • Marc Delisle

    Marc Delisle - 2005-08-04
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2005-08-04
    • priority: 5 --> 1
    • summary: light 'select' menu tree. (using optgroups) --> (in 2.6.4) light 'select' menu tree. (using optgroups)
    • status: open --> open-accepted
     
  • Marc Delisle

    Marc Delisle - 2005-08-04

    Logged In: YES
    user_id=210714

    Accepted. I had to modify libraries/config_import.lib.php
    and common.lib.php to add the new directives to old config
    files.
    And I also modified Documentation.html.

     
  • Ryan Carsten Schmidt

    Logged In: YES
    user_id=838923

    The second problem is that if I have databases foo and
    foo_bak, then the optgroup foo contains only foo_bak, and
    the database foo appears on its own before the optgroup. I
    would want the database foo to instead occur inside the
    foo optgroup.

    I found it too difficult to make this change with the code
    the way it was written, so I ended up reorganizing it a
    bit. I hope this is ok.

    In the process of making this change, I discovered a third
    problem: if the last database is part of an optgroup, then
    the optgroup is never closed. (See this, for example, by
    creating a database called z_z and looking at the source.)
    My rewrite corrects this problem as well.

    This patch incorporates pma-escape-optgroup-label.patch...

    http://www.ryandesign.com/pma-optgroup-rewrite.patch

     
  • Marc Delisle

    Marc Delisle - 2005-08-06

    Logged In: YES
    user_id=210714

    Ryan,
    thanks, your latest patch has been merged.

     
  • Ryan Carsten Schmidt

    Logged In: YES
    user_id=838923

    You know, we have a lot of databases with underscores in
    the name but which are not part of a group of databases.
    That is, we have "foo_bar" but there are no other
    databases named starting with "foo_". Currently this gives
    us lots of optgroups with only one item each. This makes
    the menu very long -- one of our servers has 127 databases
    -- so I'd like to keep the height increase to a minimum.
    I'd prefer it if optgroups were only created if there are
    at least 2 items in the group. If you agree, here's the
    patch (it actually simplifies the code to do this):

    http://www.ryandesign.com/pma-optgroup-min-2-items.patch

     
  • Marc Delisle

    Marc Delisle - 2005-08-07

    Logged In: YES
    user_id=210714

    Very good point. min-2-items patch merged.

     
  • Edward Rudd

    Edward Rudd - 2005-08-08

    Logged In: YES
    user_id=8488

    This patch makes the entries in the subtree not have the
    parent part, to shorten the width of the select list.

     
  • Edward Rudd

    Edward Rudd - 2005-08-08

    patch to shorten display of subtree items

     
  • Marc Delisle

    Marc Delisle - 2005-08-08

    Logged In: YES
    user_id=210714

    Good idea urkle, but I would prefer letting the leading
    underscore in place just for completeness, like this:

    foo
    _bar1
    _bar2

    This way, we could have
    foo
    foo
    _bar1
    _bar2

    in case the plain "foo" db exists. Opinions?

     
  • Marc Delisle

    Marc Delisle - 2005-08-08
    • milestone: 284145 --> Work_in_progress
    • priority: 1 --> 5
    • summary: (in 2.6.4) light 'select' menu tree. (using optgroups) --> light 'select' menu tree. (using optgroups)
     
  • Edward Rudd

    Edward Rudd - 2005-08-10

    Logged In: YES
    user_id=8488

    that sounds resonable.. I knew there was something missing
    to make it look better.

     
  • Ryan Carsten Schmidt

    Logged In: YES
    user_id=838923

    So if I had hypothetical databases live_foo and stage_foo
    then only "_foo" would be shown in either case after I
    select it. Even though the full database name is still
    shown in other places on the screen, I'm worried that it
    might cause confusion...

     
  • Edward Rudd

    Edward Rudd - 2005-08-10

    Logged In: YES
    user_id=8488

    well, the database name is displayed directly below that in
    the frame that shows the tables and it is shown on the right
    frame in the breadtrail at the top. Also adding the prefixed
    '_' in the tree would let the user know that it is
    abbreviated as opposed to my patch where the _ is not shown
    so there is some abiguity.

     
  • Marc Delisle

    Marc Delisle - 2005-08-10

    Logged In: YES
    user_id=210714

    I think the confusion would be minor, because as urkle said,
    the full db name is displayed just under the selector.
    Anyway, the left part tends to be a username or a project
    name, so it's less important to see it in the selector, IMO.

     
  • Ryan Carsten Schmidt

    Logged In: YES
    user_id=838923

    Ok, I think you've convinced me. :-)

     
  • Marc Delisle

    Marc Delisle - 2005-08-10

    Logged In: YES
    user_id=210714

    I'll proceed with the patch plus underscore.

    Ryan, are you getting my emails sent via the sf.net
    interface? If not, write to me directly.

     
  • Marc Delisle

    Marc Delisle - 2005-08-11
    • priority: 5 --> 1
    • summary: light 'select' menu tree. (using optgroups) --> (in 2.6.4) light 'select' menu tree. (using optgroups)
    • status: open-accepted --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2005-09-10
    • status: open-fixed --> closed-fixed