You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@click.apache.org by "Frederic Daoud (JIRA)" <ji...@apache.org> on 2009/05/20 03:53:45 UTC

[jira] Created: (CLK-551) Menu default rendering with class="selected" on current selection

Menu default rendering with class="selected" on current selection
-----------------------------------------------------------------

                 Key: CLK-551
                 URL: https://issues.apache.org/jira/browse/CLK-551
             Project: Click
          Issue Type: Improvement
          Components: extras
    Affects Versions: 2.1.0
            Reporter: Frederic Daoud
            Priority: Minor
             Fix For: 2.1.0


Menus can be rendered in many different ways of course, and it's up to the user to decide how to do the rendering.

However, the Menu class does include a default with its toString() method, which is to render the Menu as an anchor link. When that default is sufficient for the user's purposes, it would be nice if the currently selected menu (and parents) had a class="selected" added to the a tag's attributes, making it trivial to highlight it with some CSS.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CLK-551) Menu default rendering with class="selected" on current selection

Posted by "Malcolm Edgar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711590#action_12711590 ] 

Malcolm Edgar commented on CLK-551:
-----------------------------------

Unfortunately this changes the default rendering behaviour of all Menu's which will require applications to change there css style sheet if this is not the behaviour they want.

We need to give this some consideration, maybe change the selected class name to menuSelected.

regards Malcolm

> Menu default rendering with class="selected" on current selection
> -----------------------------------------------------------------
>
>                 Key: CLK-551
>                 URL: https://issues.apache.org/jira/browse/CLK-551
>             Project: Click
>          Issue Type: Improvement
>          Components: extras
>    Affects Versions: 2.1.0
>            Reporter: Frederic Daoud
>            Assignee: Malcolm Edgar
>            Priority: Minor
>             Fix For: 2.1.0
>
>         Attachments: CLK-551.patch
>
>
> Menus can be rendered in many different ways of course, and it's up to the user to decide how to do the rendering.
> However, the Menu class does include a default with its toString() method, which is to render the Menu as an anchor link. When that default is sufficient for the user's purposes, it would be nice if the currently selected menu (and parents) had a class="selected" added to the a tag's attributes, making it trivial to highlight it with some CSS.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CLK-551) Menu default rendering with class="selected" on current selection

Posted by "Bob Schellink (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711650#action_12711650 ] 

Bob Schellink commented on CLK-551:
-----------------------------------

That should really be: 'c-menu-selected'.

> Menu default rendering with class="selected" on current selection
> -----------------------------------------------------------------
>
>                 Key: CLK-551
>                 URL: https://issues.apache.org/jira/browse/CLK-551
>             Project: Click
>          Issue Type: Improvement
>          Components: extras
>    Affects Versions: 2.1.0
>            Reporter: Frederic Daoud
>            Assignee: Malcolm Edgar
>            Priority: Minor
>             Fix For: 2.1.0
>
>         Attachments: CLK-551.patch
>
>
> Menus can be rendered in many different ways of course, and it's up to the user to decide how to do the rendering.
> However, the Menu class does include a default with its toString() method, which is to render the Menu as an anchor link. When that default is sufficient for the user's purposes, it would be nice if the currently selected menu (and parents) had a class="selected" added to the a tag's attributes, making it trivial to highlight it with some CSS.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CLK-551) Menu default rendering with class="selected" on current selection

Posted by "Bob Schellink (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711647#action_12711647 ] 

Bob Schellink commented on CLK-551:
-----------------------------------

Hi Malcolm,

Are you saying that the class "selected" clashes with other defined styles?

I've been wonder if we shouldn't start namespacing our JavaScript and CSS to avoid this issue.

For example I've already started using the Click namespace for JavaScript. For CSS we could prefix classes with 'clk_selected' or 'c_selected'.

In the Javadoc we could mention the CSS classes used by the control, similar to the way we mention JavaScript and CSS imports.

bob

> Menu default rendering with class="selected" on current selection
> -----------------------------------------------------------------
>
>                 Key: CLK-551
>                 URL: https://issues.apache.org/jira/browse/CLK-551
>             Project: Click
>          Issue Type: Improvement
>          Components: extras
>    Affects Versions: 2.1.0
>            Reporter: Frederic Daoud
>            Assignee: Malcolm Edgar
>            Priority: Minor
>             Fix For: 2.1.0
>
>         Attachments: CLK-551.patch
>
>
> Menus can be rendered in many different ways of course, and it's up to the user to decide how to do the rendering.
> However, the Menu class does include a default with its toString() method, which is to render the Menu as an anchor link. When that default is sufficient for the user's purposes, it would be nice if the currently selected menu (and parents) had a class="selected" added to the a tag's attributes, making it trivial to highlight it with some CSS.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CLK-551) Menu default rendering with class="selected" on current selection

Posted by "Frederic Daoud (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714708#action_12714708 ] 

Frederic Daoud commented on CLK-551:
------------------------------------

Thank you Malcolm.

> Menu default rendering with class="selected" on current selection
> -----------------------------------------------------------------
>
>                 Key: CLK-551
>                 URL: https://issues.apache.org/jira/browse/CLK-551
>             Project: Click
>          Issue Type: Improvement
>          Components: extras
>    Affects Versions: 2.1.0
>            Reporter: Frederic Daoud
>            Assignee: Malcolm Edgar
>            Priority: Minor
>             Fix For: 2.1.0
>
>         Attachments: CLK-551.patch
>
>
> Menus can be rendered in many different ways of course, and it's up to the user to decide how to do the rendering.
> However, the Menu class does include a default with its toString() method, which is to render the Menu as an anchor link. When that default is sufficient for the user's purposes, it would be nice if the currently selected menu (and parents) had a class="selected" added to the a tag's attributes, making it trivial to highlight it with some CSS.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CLK-551) Menu default rendering with class="selected" on current selection

Posted by "Malcolm Edgar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CLK-551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Malcolm Edgar reassigned CLK-551:
---------------------------------

    Assignee: Malcolm Edgar

> Menu default rendering with class="selected" on current selection
> -----------------------------------------------------------------
>
>                 Key: CLK-551
>                 URL: https://issues.apache.org/jira/browse/CLK-551
>             Project: Click
>          Issue Type: Improvement
>          Components: extras
>    Affects Versions: 2.1.0
>            Reporter: Frederic Daoud
>            Assignee: Malcolm Edgar
>            Priority: Minor
>             Fix For: 2.1.0
>
>         Attachments: CLK-551.patch
>
>
> Menus can be rendered in many different ways of course, and it's up to the user to decide how to do the rendering.
> However, the Menu class does include a default with its toString() method, which is to render the Menu as an anchor link. When that default is sufficient for the user's purposes, it would be nice if the currently selected menu (and parents) had a class="selected" added to the a tag's attributes, making it trivial to highlight it with some CSS.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CLK-551) Menu default rendering with class="selected" on current selection

Posted by "Malcolm Edgar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710979#action_12710979 ] 

Malcolm Edgar commented on CLK-551:
-----------------------------------

Hi Fredric, could you please provide attach a patch file for this change.

regards Malcolm Edgar

> Menu default rendering with class="selected" on current selection
> -----------------------------------------------------------------
>
>                 Key: CLK-551
>                 URL: https://issues.apache.org/jira/browse/CLK-551
>             Project: Click
>          Issue Type: Improvement
>          Components: extras
>    Affects Versions: 2.1.0
>            Reporter: Frederic Daoud
>            Priority: Minor
>             Fix For: 2.1.0
>
>
> Menus can be rendered in many different ways of course, and it's up to the user to decide how to do the rendering.
> However, the Menu class does include a default with its toString() method, which is to render the Menu as an anchor link. When that default is sufficient for the user's purposes, it would be nice if the currently selected menu (and parents) had a class="selected" added to the a tag's attributes, making it trivial to highlight it with some CSS.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CLK-551) Menu default rendering with class="selected" on current selection

Posted by "Frederic Daoud (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CLK-551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frederic Daoud updated CLK-551:
-------------------------------

    Attachment: CLK-551.patch

Hi Malcolm, here is the patch.

> Menu default rendering with class="selected" on current selection
> -----------------------------------------------------------------
>
>                 Key: CLK-551
>                 URL: https://issues.apache.org/jira/browse/CLK-551
>             Project: Click
>          Issue Type: Improvement
>          Components: extras
>    Affects Versions: 2.1.0
>            Reporter: Frederic Daoud
>            Priority: Minor
>             Fix For: 2.1.0
>
>         Attachments: CLK-551.patch
>
>
> Menus can be rendered in many different ways of course, and it's up to the user to decide how to do the rendering.
> However, the Menu class does include a default with its toString() method, which is to render the Menu as an anchor link. When that default is sufficient for the user's purposes, it would be nice if the currently selected menu (and parents) had a class="selected" added to the a tag's attributes, making it trivial to highlight it with some CSS.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CLK-551) Menu default rendering with class="selected" on current selection

Posted by "Malcolm Edgar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CLK-551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Malcolm Edgar resolved CLK-551.
-------------------------------

    Resolution: Fixed

Applied patch and commented out .selected style in menu.css to prevent rendering changes in existing applications.  Should continue discussion on css class conventions in click

> Menu default rendering with class="selected" on current selection
> -----------------------------------------------------------------
>
>                 Key: CLK-551
>                 URL: https://issues.apache.org/jira/browse/CLK-551
>             Project: Click
>          Issue Type: Improvement
>          Components: extras
>    Affects Versions: 2.1.0
>            Reporter: Frederic Daoud
>            Assignee: Malcolm Edgar
>            Priority: Minor
>             Fix For: 2.1.0
>
>         Attachments: CLK-551.patch
>
>
> Menus can be rendered in many different ways of course, and it's up to the user to decide how to do the rendering.
> However, the Menu class does include a default with its toString() method, which is to render the Menu as an anchor link. When that default is sufficient for the user's purposes, it would be nice if the currently selected menu (and parents) had a class="selected" added to the a tag's attributes, making it trivial to highlight it with some CSS.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CLK-551) Menu default rendering with class="selected" on current selection

Posted by "Frederic Daoud (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711696#action_12711696 ] 

Frederic Daoud commented on CLK-551:
------------------------------------

Perhaps I am causing more problems than solutions with this issue.

If you think it's more trouble than it's worth, I'll understand if you prefer not to go ahead with this. It really isn't difficult to just add a CSS class to selected menus in the template.


> Menu default rendering with class="selected" on current selection
> -----------------------------------------------------------------
>
>                 Key: CLK-551
>                 URL: https://issues.apache.org/jira/browse/CLK-551
>             Project: Click
>          Issue Type: Improvement
>          Components: extras
>    Affects Versions: 2.1.0
>            Reporter: Frederic Daoud
>            Assignee: Malcolm Edgar
>            Priority: Minor
>             Fix For: 2.1.0
>
>         Attachments: CLK-551.patch
>
>
> Menus can be rendered in many different ways of course, and it's up to the user to decide how to do the rendering.
> However, the Menu class does include a default with its toString() method, which is to render the Menu as an anchor link. When that default is sufficient for the user's purposes, it would be nice if the currently selected menu (and parents) had a class="selected" added to the a tag's attributes, making it trivial to highlight it with some CSS.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.