Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-18604

Expose the Icon Theme through the REST API

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 13.3-rc-1
    • Fix Version/s: 13.4-rc-1
    • Component/s: Icon Themes
    • Labels:
      None
    • Tests:
      Unit, Integration
    • Difficulty:
      Unknown
    • Pull Request Status:
      Pull Request accepted
    • Similar issues:

      Description

      ATM is not possible to use the Icon Theme from JavaScript code unless:

      • you mix the JavaScript code with Velocity
      • or you read the icons from HTML (where they were placed by some server side script)
      • or you get the icons from some service (e.g. search suggest)

      Ideally, a pure JavaScript module should be able to request from the server side the icons it needs, in the same way it asks for the translation keys (XWIKI-18491). For this we should probably add a new REST resource that could look like this:

      /xwiki/rest/wikis/{wikiName}/iconThemes/{iconTheme}/icons?icon=one&icon=two&...
      /xwiki/rest/wikis/{wikiName}/iconThemes/silk/icons?icon=one&icon=two&...
      

      or

      /xwiki/rest/wikis/{wikiName}/iconSets/{iconSet}/icons?icon=one&icon=two&...
      /xwiki/rest/wikis/{wikiName}/iconSets/fa/icons?icon=one&icon=two&...
      

      and return a list of icon meta data (XWIKI-15389). I'm not sure how to ask for icons from the current icon set/theme though. Maybe by omitting the icon set/theme name.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mleduc Manuel Leduc
                Reporter:
                mflorea Marius Dumitru Florea
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: