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

Property names in App Within Minutes should automatically match their corresponding Pretty Names

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • 15.0
    • App Within Minutes
    • None
    • Unknown

    Description

      Property names in App Within Minutes do not automatically match what the user wrote in the corresponding Pretty Name field. Instead, they fall back on generic names like shortText1.

      How to reproduce

      1. Open App Within Minutes with the proper privileges
      2. Click "Create Application", give the application a name and click "Next Step"
      3. Drag a field into the main area (e.g. Short Text)
      4. Set the Pretty Name of the field to something different than the default (e.g. Your Name)
      5. Open the settings for the field

      Expected behavior

      The name of the field should be "yourName".

      Actual behavior

      The name of the field is "shortText1" (the default).

      Proposed solution

      Client-side JavaScript can be used to retrieve the content of the Pretty Name <input> element (e.g. input#field-shortText1_prettyName) as it's edited by the user and store it into the corresponding Name <input> element (e.g. input#field-shortText1_name) dynamically.

      This can be implemented in JQuery by binding the change() event of the Pretty Name <input> element. Since both <input> elements belong to the same parent <div>, the callback function bound to the Pretty Name <input> element's change() event should navigate parentElements until the parent <div> of both is reached, then a CSS selector should be executed in order to find the <input> for the corresponding Name so that its value attribute can be set.

      This should also work when the settings are hidden (so, as a "silent default" for the user), which can be done since div.field-config can be technically hidden but active even when the settings are not opened.

      Attachments

        Activity

          People

            Unassigned Unassigned
            fpesari Fabio Pesari
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: