ubiquity-os / ubiquity-os-plugin-installer

A GUI to install UbiquityOS plugins.
0 stars 8 forks source link

Config Input design #14

Open Keyrxng opened 1 week ago

Keyrxng commented 1 week ago

Look at this config, it's huge. How is a config like this expected to be displayed?

Are we going to have to build custom setups for some plugins or is it expected to just fill the editor and scroll?

Seeing all of this without explicit info about what it is (within the UI) might be a lot to take in.

- skipBotEvents: false
    uses:
      - plugin: ubiquity-os-marketplace/text-conversation-rewards@development
        with:
          logLevel: "debug"
          evmNetworkId: 100
          evmPrivateEncrypted: "giLxu7IVSTpEFO89DaeCgnkKemYf2aFlK9EUQkbt71YmFOcQdIkCT8JDpX5zV5Sg1TqBeziZ486U0E3a6nD3emg0x9oeG3ILRUTlOE4I3RBZ0yTadsnV4RvewJMCMZJaYDuom-rHzog8p9InBwaHBszFeWItttSwS7o" # https://github.com/ubiquibot/conversation-rewards/pull/111#issuecomment-2348639931
          erc20RewardToken: "0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d"
          incentives:
            requirePriceLabel: true
            contentEvaluator:
              multipliers:
                - role:
                    - "ISSUE_SPECIFICATION"
                  relevance: 1
            userExtractor:
              enabled: true
              redeemTask: true
            dataPurge:
              enabled: true
            formattingEvaluator:
              enabled: true
              multipliers:
                - role:
                    - ISSUE_SPECIFICATION
                  multiplier: 3
                  rewards:
                    wordValue: 0.1
                    html:
                      br:
                        score: 0
                        countWords: true
                      code:
                        score: 5
                        countWords: false
                      p:
                        score: 0
                        countWords: true
                      em:
                        score: 0
                        countWords: true
                      img:
                        score: 5
                        countWords: true
                      strong:
                        score: 0
                        countWords: false
                      blockquote:
                        score: 0
                        countWords: false
                      h1:
                        score: 1
                        countWords: true
                      h2:
                        score: 1
                        countWords: true
                      h3:
                        score: 1
                        countWords: true
                      h4:
                        score: 1
                        countWords: true
                      h5:
                        score: 1
                        countWords: true
                      h6:
                        score: 1
                        countWords: true
                      a:
                        score: 5
                        countWords: true
                      li:
                        score: 0.5
                        countWords: true
                      ul:
                        score: 0
                        countWords: true
                      td:
                        score: 0
                        countWords: true
                      hr:
                        score: 0
                        countWords: true
                      pre:
                        score: 0
                        countWords: false
                      ol:
                        score: 0
                        countWords: true
                - role:
                    - ISSUE_AUTHOR
                    - ISSUE_COLLABORATOR
                    - PULL_COLLABORATOR
                  multiplier: 1
                  rewards:
                    wordValue: 0.1
                    html:
                      br:
                        score: 0
                        countWords: true
                      code:
                        score: 5
                        countWords: false
                      p:
                        score: 0
                        countWords: true
                      em:
                        score: 0
                        countWords: true
                      img:
                        score: 5
                        countWords: true
                      strong:
                        score: 0
                        countWords: false
                      blockquote:
                        score: 0
                        countWords: false
                      h1:
                        score: 1
                        countWords: true
                      h2:
                        score: 1
                        countWords: true
                      h3:
                        score: 1
                        countWords: true
                      h4:
                        score: 1
                        countWords: true
                      h5:
                        score: 1
                        countWords: true
                      h6:
                        score: 1
                        countWords: true
                      a:
                        score: 5
                        countWords: true
                      li:
                        score: 0.5
                        countWords: true
                      ul:
                        score: 0
                        countWords: true
                      td:
                        score: 0
                        countWords: true
                      hr:
                        score: 0
                        countWords: true
                      pre:
                        score: 0
                        countWords: false
                      ol:
                        score: 0
                        countWords: true
                - role:
                    - ISSUE_CONTRIBUTOR
                    - PULL_CONTRIBUTOR
                  multiplier: 0.25
                  rewards:
                    wordValue: 0.1
                    html:
                      br:
                        score: 0
                        countWords: true
                      code:
                        score: 5
                        countWords: false
                      p:
                        score: 0
                        countWords: true
                      em:
                        score: 0
                        countWords: true
                      img:
                        score: 5
                        countWords: true
                      strong:
                        score: 0
                        countWords: false
                      blockquote:
                        score: 0
                        countWords: false
                      h1:
                        score: 1
                        countWords: true
                      h2:
                        score: 1
                        countWords: true
                      h3:
                        score: 1
                        countWords: true
                      h4:
                        score: 1
                        countWords: true
                      h5:
                        score: 1
                        countWords: true
                      h6:
                        score: 1
                        countWords: true
                      a:
                        score: 5
                        countWords: true
                      li:
                        score: 0.5
                        countWords: true
                      ul:
                        score: 0
                        countWords: true
                      td:
                        score: 0
                        countWords: true
                      hr:
                        score: 0
                        countWords: true
                      pre:
                        score: 0
                        countWords: false
                      ol:
                        score: 0
                        countWords: true
                - role:
                    - PULL_SPECIFICATION
                    - PULL_AUTHOR
                    - ISSUE_ASSIGNEE
                    - PULL_ASSIGNEE
                  multiplier: 0
                  rewards:
                    wordValue: 0
                    html:
                      br:
                        score: 0
                        countWords: true
                      code:
                        score: 5
                        countWords: false
                      p:
                        score: 0
                        countWords: true
                      em:
                        score: 0
                        countWords: true
                      img:
                        score: 5
                        countWords: true
                      strong:
                        score: 0
                        countWords: false
                      blockquote:
                        score: 0
                        countWords: false
                      h1:
                        score: 1
                        countWords: true
                      h2:
                        score: 1
                        countWords: true
                      h3:
                        score: 1
                        countWords: true
                      h4:
                        score: 1
                        countWords: true
                      h5:
                        score: 1
                        countWords: true
                      h6:
                        score: 1
                        countWords: true
                      a:
                        score: 5
                        countWords: true
                      li:
                        score: 0.5
                        countWords: true
                      ul:
                        score: 0
                        countWords: true
                      td:
                        score: 0
                        countWords: true
                      hr:
                        score: 0
                        countWords: true
                      pre:
                        score: 0
                        countWords: false
                      ol:
                        score: 0
                        countWords: true
              wordCountExponent: 0.85
            permitGeneration:
              enabled: true
            githubComment:
              post: true
              debug: false
          dataCollection:
            maxAttempts: 10
            delayMs: 1000
rndquu commented 1 week ago

How is this config displayed in https://github.com/ubiquity-os/ubiquity-os-plugin-installer/pull/13? I haven't yet managed to run that PR successfully.

Keyrxng commented 6 days ago

How is this config displayed in #13? I haven't yet managed to run that PR successfully.

It looks like this right now because null is a supported default which disables all of the modules which is a contrast to how defaults work for most other plugins so "reset to default" here is suboptimal.

The default HTML tags are not exhaustive but text-conversation-rewards does support all tags exhaustively afaik so I'd imagine the UI would need to accommodate for that.

Imo we need a method for creating an individual multipliers entry which supports most HTML tags and we can assign values to each tag, which roles this entry applies to and then pushes it to the multipliers array. We have four entries but I'd imagine something like what we have now but just for adding an entry and requires a complete and return or add another sort of setup?

image