Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config Input design #14

Open
Keyrxng opened this issue Nov 9, 2024 · 2 comments
Open

Config Input design #14

Keyrxng opened this issue Nov 9, 2024 · 2 comments

Comments

@Keyrxng
Copy link
Member

Keyrxng commented Nov 9, 2024

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
Copy link
Member

rndquu commented Nov 15, 2024

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

@Keyrxng
Copy link
Member Author

Keyrxng commented Nov 15, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants