You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Daniel Watford (Jira)" <ji...@apache.org> on 2022/10/04 14:24:00 UTC

[jira] [Commented] (OFBIZ-12697) Hyperlink: support title attribute

    [ https://issues.apache.org/jira/browse/OFBIZ-12697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17612631#comment-17612631 ] 

Daniel Watford commented on OFBIZ-12697:
----------------------------------------

I agree that its nice to have flexibility in how we specify forms, but the title attribute as defined for the link type in widget-common.xsd does not specify use of ${} expandable notation in the same way as some other attributes.

[~FloMo] do you have a use case that this change will unblock?

I think you can categorise this ticket as a bug since widget-common.xsd definitely states that an attribute called title exists for links which is not currently rendered. However the most basic fix for that bug doesn't necessarily call for FlexibleStringExpander, just the rendering of a string.

I'm would be happy to _upgrade_ the title attribute to use FlexibleStringExpander, particularly since there are some optimisations we could look into (such as memoization) to mitigate any performance issues that might occur when evaluating FSE values. However this will be easier to justify if you already have an existing need for this functionality.

> Hyperlink: support title attribute
> ----------------------------------
>
>                 Key: OFBIZ-12697
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12697
>             Project: OFBiz
>          Issue Type: Improvement
>    Affects Versions: 22.01.01, Upcoming Branch
>            Reporter: Florian Motteau
>            Priority: Minor
>
> The `hyperlink` widget can have a `title` attribute, but this attribute is not rendered as an HTML `title` attribute on the rendered `a` :
> `<hyperlink target="myUrl" description="text content for the rendered 'a'" title="tooltip content">`
> ...renders like :
> `<a href="myUrl">text content for the rendered 'a'</a>`
> ...whereas one can assume that the title attribute will be used like so :
> `<a href="myUrl" title="tooltip content">text content for the rendered 'a'</a>`
> ...so when hovering the link, we get a browser tooltip.
> It would be nice to make the `title` attribute for `hyperlink` (which is already present in the XSD) to be rendered as a `title` HTML attribute on the link, using a `FlexibleStringExpander`.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)