-
Notifications
You must be signed in to change notification settings - Fork 9
feat(cat-voices): new datasource of proposal data #3845
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
base: feat/co-proposers-3677
Are you sure you want to change the base?
Conversation
…catalyst-voices into feat/proposal-viewer-v2
damian-molinski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll review tests after those updates
...ckages/internal/catalyst_voices_models/lib/src/proposal/data/proposal_data_collaborator.dart
Outdated
Show resolved
Hide resolved
..._voices/packages/internal/catalyst_voices_models/lib/src/proposal/data/proposal_data_v2.dart
Outdated
Show resolved
Hide resolved
...ckages/internal/catalyst_voices_models/lib/src/proposal/data/proposal_data_collaborator.dart
Outdated
Show resolved
Hide resolved
...es/packages/internal/catalyst_voices_repositories/lib/src/database/dao/documents_v2_dao.dart
Outdated
Show resolved
Hide resolved
...es/packages/internal/catalyst_voices_repositories/lib/src/database/dao/proposals_v2_dao.dart
Outdated
Show resolved
Hide resolved
...es/packages/internal/catalyst_voices_repositories/lib/src/database/dao/proposals_v2_dao.dart
Outdated
Show resolved
Hide resolved
...nal/catalyst_voices_repositories/lib/src/document/source/database_documents_data_source.dart
Show resolved
Hide resolved
...ces/packages/internal/catalyst_voices_repositories/lib/src/proposal/proposal_repository.dart
Outdated
Show resolved
Hide resolved
…catalyst-voices into feat/proposal-viewer-v2
📚 Docs PreviewThe docs for this PR can be previewed at the following URL: https://docs.dev.projectcatalyst.io/voices/feat/proposal-viewer-v2 |
damian-molinski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few minor comments, other then that LGTM
...ages/internal/catalyst_voices_models/test/proposal/data/proposal_data_collaborator_test.dart
Show resolved
Hide resolved
...es/packages/internal/catalyst_voices_repositories/lib/src/database/dao/proposals_v2_dao.dart
Show resolved
Hide resolved
...atalyst_voices_repositories/lib/src/document/source/proposal_document_data_local_source.dart
Outdated
Show resolved
Hide resolved
| ProposalDocument? proposalDocument; | ||
| if (templateData != null) { | ||
| final template = ProposalTemplateFactory.create(templateData); | ||
| proposalDocument = ProposalDocumentFactory.create( | ||
| rawProposal.proposal, | ||
| template: template, | ||
| ); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't get it. Why do you do this when there is already proposalOrDocument above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because ProposalDocumentFactory is only accessable in repository package so we can't create a proposal doc in cubit. Or we need to export this factory so its ussable in bloc package
...kages/internal/catalyst_voices_repositories/test/src/database/dao/proposals_v2_dao_test.dart
Outdated
Show resolved
Hide resolved
| expect( | ||
| actions.any( | ||
| (action) => | ||
| action.metadata.ref == proposal1Ref && | ||
| (action.metadata.authors?.contains(author1) ?? false), | ||
| ), | ||
| isTrue, | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should check if there are any actions from other authors then author1 and refer is different from proposal1Ref
Description
This PR only sets data source for getting proposal data with all needed information to use it in
ProposalViewerandProposalBuilder. In seprate PRProposalCubitwill start usingProposalDataV2as I still not map all of the data required by this model.Related Issue(s)
Part of #3767
Closes #3836
Please confirm the following checks