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

feat(docs): proposal template drafting #1330

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

stevenj
Copy link
Collaborator

@stevenj stevenj commented Dec 4, 2024

Description

Thanks for contributing to the project!
Please fill out this template to help us review your changes.

Related Issue(s)

List the issue numbers related to this pull request.

e.g., Closes #1, Resolves #1 Fixes #1

Description of Changes

Provide a clear and concise description of what the pull request changes.

Breaking Changes

Describe any breaking changes and the impact.

Screenshots

If applicable, add screenshots to help explain your changes.

Related Pull Requests

If applicable, list any related pull requests.

e.g., #1, #1

Please confirm the following checks

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream module

@stevenj stevenj marked this pull request as draft December 4, 2024 17:01
Copy link
Contributor

github-actions bot commented Dec 4, 2024

Test Report | ${\color{lightgreen}Pass: 333/333}$ | ${\color{red}Fail: 0/333}$ |

Copy link
Contributor

github-actions bot commented Dec 4, 2024

Test Report | ${\color{lightgreen}Pass: 333/333}$ | ${\color{red}Fail: 0/333}$ |

Copy link
Contributor

github-actions bot commented Dec 4, 2024

Test Report | ${\color{lightgreen}Pass: 333/333}$ | ${\color{red}Fail: 0/333}$ |

Copy link
Contributor

github-actions bot commented Dec 4, 2024

Test Report | ${\color{lightgreen}Pass: 333/333}$ | ${\color{red}Fail: 0/333}$ |

Copy link
Contributor

github-actions bot commented Dec 4, 2024

Test Report | ${\color{lightgreen}Pass: 333/333}$ | ${\color{red}Fail: 0/333}$ |

Copy link
Contributor

github-actions bot commented Dec 5, 2024

Test Report | ${\color{lightgreen}Pass: 333/333}$ | ${\color{red}Fail: 0/333}$ |

Copy link
Contributor

github-actions bot commented Dec 5, 2024

Test Report | ${\color{lightgreen}Pass: 333/333}$ | ${\color{red}Fail: 0/333}$ |

@minikin minikin added the draft Draft label Dec 5, 2024
Copy link
Contributor

github-actions bot commented Dec 5, 2024

Test Report | ${\color{lightgreen}Pass: 333/333}$ | ${\color{red}Fail: 0/333}$ |

Copy link
Contributor

github-actions bot commented Dec 5, 2024

Test Report | ${\color{lightgreen}Pass: 333/333}$ | ${\color{red}Fail: 0/333}$ |

Copy link
Contributor

github-actions bot commented Dec 5, 2024

Test Report | ${\color{lightgreen}Pass: 334/334}$ | ${\color{red}Fail: 0/334}$ |

Copy link
Contributor

github-actions bot commented Dec 6, 2024

Test Report | ${\color{lightgreen}Pass: 334/334}$ | ${\color{red}Fail: 0/334}$ |

Copy link
Contributor

github-actions bot commented Dec 6, 2024

Test Report | ${\color{lightgreen}Pass: 334/334}$ | ${\color{red}Fail: 0/334}$ |

@stevenj stevenj added this to the M4: Voting & Delegation milestone Dec 8, 2024
@stevenj stevenj added the F14 label Dec 8, 2024
Copy link
Contributor

github-actions bot commented Dec 8, 2024

Test Report | ${\color{lightgreen}Pass: 334/334}$ | ${\color{red}Fail: 0/334}$ |

Copy link
Contributor

github-actions bot commented Dec 8, 2024

Test Report | ${\color{lightgreen}Pass: 334/334}$ | ${\color{red}Fail: 0/334}$ |

@minikin
Copy link
Collaborator

minikin commented Dec 9, 2024

@stevenj @nathanbogale

I'd like to suggest using x-order extension properties to handle UI element ordering.
This approach provides explicit ordering control while maintaining schema clarity.

Instead of relying on object property order (which is not guaranteed by the specification), we can add x-order arrays at levels where ordering is critical:

{
  "properties": {
    "setup": {
      "properties": {
        "title": { ... },
        "proposer": { ... }
      },
      "x-order": ["title", "proposer"]
    }
  },
  "x-order": ["setup", "summary", "horizons", "details", "milestones", "pitch", "agreements"]
}

Benefits:

  • Explicit ordering control without schema restructuring
  • Follows JSON Schema extension conventions
  • Can be added only where needed
  • Easy to implement in Flutter with fallback behavior

Some additional details about implementing the x-order approach:

  1. Root Level Ordering
{
  "x-order": ["setup", "summary", "horizons", "details", "milestones", "pitch", "agreements"],
  "properties": { ... }
}
  1. Section Level Ordering
{
  "setup": {
    "x-order": ["title", "proposer"],
    "properties": {
      "title": { ... },
      "proposer": { ... }
    }
  }
}
  1. Nested Section Ordering
{
  "proposer": {
    "x-order": ["applicant", "type", "coproposers"],
    "properties": {
      "applicant": { ... },
      "type": { ... },
      "coproposers": { ... }
    }
  }
}
  1. Complex Section Example
{
  "summary": {
    "x-order": [
      "budget",
      "time",
      "translation",
      "problem",
      "solution",
      "supportingLinks",
      "dependencies",
      "open_source"
    ],
    "properties": {
      "budget": {
        "x-order": ["requestedFunds"],
        "properties": { ... }
      },
      "time": {
        "x-order": ["duration"],
        "properties": { ... }
      }
    }
  }
}
  1. Array Items Ordering (for repeatable sections)
{
  "dependencies": {
    "details": {
      "items": {
        "x-order": ["name", "type", "description", "mitigationPlan"],
        "properties": { ... }
      }
    }
  }
}
  1. Conditional Sections
{
  "translation": {
    "x-order": ["isTranslated", "originalLanguage", "translationNotes"],
    "properties": { ... },
    "dependencies": {
      "originalLanguage": ["isTranslated"],
      "translationNotes": ["isTranslated"]
    }
  }
}

"default": [],
"items": {
"$ref": "#/definitions/multiLineTextEntryMarkdown",
"maxLength": 10240
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be 1024?

"items": {
"$ref": "#/definitions/singleLineHttpsURLEntry",
"maxLength": 1024
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how this items object is working?

Copy link
Contributor

github-actions bot commented Dec 9, 2024

Test Report | ${\color{lightgreen}Pass: 334/334}$ | ${\color{red}Fail: 0/334}$ |

Copy link
Contributor

Test Report | ${\color{lightgreen}Pass: 334/334}$ | ${\color{red}Fail: 0/334}$ |

"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Catalyst Fund 14 Base Proposal Template",
"description": "A structured template for creating Fund 14 proposals",
"definitions": {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JsonSchema has structuring tags one of which is $def, should that be used instead of "definitions" for the purpose of defining reusable structures
https://json-schema.org/understanding-json-schema/structuring#defs

Copy link
Contributor

Test Report | ${\color{lightgreen}Pass: 334/334}$ | ${\color{red}Fail: 0/334}$ |

Copy link
Contributor

Test Report | ${\color{lightgreen}Pass: 334/334}$ | ${\color{red}Fail: 0/334}$ |

Copy link
Contributor

Test Report | ${\color{lightgreen}Pass: 334/334}$ | ${\color{red}Fail: 0/334}$ |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.

First
5 participants