Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-28360

As a plugin developer, I want to be able to modify the generated property panel after creation

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Fixed
    • None
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      NOTE: This suggestion is for Confluence Cloud. Using Confluence Server? See the corresponding suggestion.

      Currently we have no way to hook into the Macro Property Panel creation which is based on the macro descriptor.

          <xhtml-macro key="status" name="status"
                       class="com.atlassian.confluence.plugins.status.StatusMacro"
                       icon="/download/resources/com.atlassian.confluence.plugins.status-macro/images/status-icon.png">
              ...
              <property-panel>
                  <spacer/>
                  <button id="subtle" label="Subtle"/>
                  <spacer/>
                  <button id="Grey" label=""/>
                  <button id="Red" label=""/>
                  <button id="Yellow" label=""/>
                  <button id="Green" label=""/>
                  <button id="Blue" label=""/>
                  <button id="Brown" label=""/>
                  <spacer/>
              </property-panel>
          </xhtml-macro>
      

      A use case would be to be able to add additional CSS classes for a button in order to steer its visual appearance, e.g. the selected class. Since we require to wire up the code via JS anyway, the easiest way would be to allow the registration of callbacks able to modify the buttons before they get attached to the DOM. This is an easier to implement and flexible approach than changing the descriptor to allow additional CSS classes on the property-panel elements, as this would be static by default and I'd assume that for the majority of use cases you'd need to assert a state at runtime.

      Attachments

        Issue Links

          Activity

            People

              fakraemer fabs
              fakraemer fabs
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: