-
Notifications
You must be signed in to change notification settings - Fork 115
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
Olympia proposals schema, mappings and tests #2436
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Lezek123
changed the title
Olympia proposals input schema
Olympia proposals schema, mappings and tests
Jun 9, 2021
…time proposals status, small fixes
…nBlock and expireProposal tests, fixes for: unexecuted CreateProposalFixture assertions, proposal resource locking
Merged to #2547 for convinience |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Draft PR based on #2345 in order to include membership and working groups mappings.
Input schema introduced in commit: 62b7310
Future relationship with Council mappings:
It's not yet exactly clear how the Council module mappings will affect this input schema.
For example, assuming we'll have an entity representing either current or past council member:
We might want to switch the relationship in
ProposalVoteEvent
fromMembership
toCouncilMember
.Otherwise we may want to have a relationship between
CouncilTerm
/CouncilCadency
andProposalVoteEvent
instead ofProposalVoteEvent.votingRound
to easier connect proposal votes with council terms.We may also need some other relationships between
CouncilCadency
and proposals to support displaying lists like:Part of Pioneer's Council wireframes
Proposal parameters:
Since all proposals parameters like:
are exposed by the runtime through
proposalCodex
module constants, ie.:api.consts.proposalsCodex.amendConstitutionProposalParameters
api.consts.proposalsCodex.cancelWorkingGroupLeadOpeningProposalParameters
I didn't include those in the mappings and assumed the frontend applications (like Pioneer v2) will use
@polkadot/api
in order to retrieve those values.This means that values that depend on them will need to also be calculated on the frontend, for example:
Proposal status history:
In order to display proposal status history like:
With the current schema we can use
proposal.createdInEvent
for initial status,proposal.proposalStatusUpdates
for or the "intermediate" statuses andproposal.status
for the current (possibly final) status.For example:
Searching and filtering by "endedAt" time/block
To faciliate filtering by ending time:
I added
statusSetAtBlock
andstatusSetAtTime
fields.Otherwise we would need a spearate filter for each possible related event type in proposal status variants.
Also filtering by variant relations is not currently supported by Hydra and even if supported in the future, it's not clear how deeply into the schema this type of filtering would be able to reach.
In order to faciliate searching by "keywords" I also added
fullTextSearch
queries for proposal title and text.History of aprovals:
Currently the votes can be split by
votingRound
(part ofProposalVotedEvent
), which will be incremented after each approval for proposals withconsitutionality > 1
(as described in the input schema) in order to display proposal approvals history data on separate tabs:In the future this may be replaced with relationship between
ProposalVoteEvent
andCouncilTerm
/CouncilCandidacy
. (see: Future relationship with Council mappings)Pioneer wireframes inconsistencies:
I noticed a few incosistencies in the Pioneer v2 Proposals wireframes:
Proposal discussion mode:
As can be seen on the screen above, the proposal discussion mode and whitelist is set during proposal creation, while in the current runtime implementation the discussion thread always begins in
Open
mode, which can then be switched by either proposal creator or an active council member. I didn't notice the action of updating the proposal discussion thread represented in any of the wireframes.Funding request proposal creation:
While the runtime FundingProposal can have multiple destinations specified, the Pioneer designs incidate that only one destination is supported.
Lead opening proposal creation / details:
I think the metadata provided for lead opening proposal should be the same as for any other opening, which means it would also include
applicationDetails
applicationFormQuestions
etc. This doesn't seem to be the case in the current lead opening proposal creation form design.