4 Replies Latest reply on Feb 25, 2017 3:16 PM by Griffel

    Tooltips for custom metadata

    br80

      In the Library module under the Metadata panel, when you hover over IPTC fields ("Creator" is an example) you get a tooltip which includes a longer description:

       

      tooltip.png

       

      Most other non-IPTC fields just show the field name:

       

      tooltip2.png

       

      Does anyone know how to add a tooltip with a longer description to custom metadata fields? I know that if the title is longer than 100px it will be truncated and the full text will be in the tooltip but when that happens it adds "..." to the end of the label and it is difficult to position correctly (right justify).

       

      I've searched through the SDK and API and just hope I overlooked something simple . . .

        • 1. Re: Tooltips for custom metadata
          johnrellis Most Valuable Participant

          There is no documented way of doing that.  I haven't seen anyone describe an undocumented way either.

          • 2. Re: Tooltips for custom metadata
            Griffel Level 1

            My workaround needs a plug-in specific metadata set and assumes, the user works with this set instead of using the predefined metadata set "All Plug-in Metadata".
            We need two strings, a short one which wil be shown as label, and a long one which provides the tooltip text.

            If we set the long string as title at "metadataFieldsForPhotos" and set the short string as title at the plug-in specific metadata set, we can achieve the intended effect at the plug-in specific metadata set.
            The disadvantage of this workaround: The long string will be shown as label at the metadata set "All Plug-in Metadata".

            • 3. Re: Tooltips for custom metadata
              johnrellis Most Valuable Participant

              Great tip.  Here's an example:

               

              In MetadataDefinition.lua, define a custom field as:

               

              {id = "locations",
               title = "Locations",
               ...},
              

               

              In the tagset definition file Tagset.lua, define the corresponding item as:

               

              {"com.johnrellis.anyvision.locations", 
               label = "Loc", 
               ...},
              

               

              Note the undocumented use of the "label" key.

               

              Now the custom tagset will show "Loc" as the label of the field, with the tooltip "Locations".

              1 person found this helpful
              • 4. Re: Tooltips for custom metadata
                Griffel Level 1

                Griffel  schrieb

                If we set the long string as title at "metadataFieldsForPhotos" and set the short string as title at the plug-in specific metadata set, we can achieve the intended effect at the plug-in specific metadata set.

                I did a typing error. It should be:

                If we set the long string as title at "metadataFieldsForPhotos" and set the short string as label at the plug-in specific metadata set, we can achieve the intended effect at the plug-in specific metadata set.