Skip to content

Conversation

@LynxLynxx
Copy link
Contributor

@LynxLynxx LynxLynxx commented Dec 10, 2025

Description

This PR only sets data source for getting proposal data with all needed information to use it in ProposalViewer and ProposalBuilder. In seprate PR ProposalCubit will start using ProposalDataV2 as 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

  • 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

@LynxLynxx LynxLynxx self-assigned this Dec 10, 2025
@LynxLynxx LynxLynxx added review me PR is ready for review squad: face Frontend Catalyst Experience Team refactor Code refactoring task labels Dec 10, 2025
@LynxLynxx LynxLynxx moved this from New to 🏗 In progress in Catalyst Dec 10, 2025
@LynxLynxx LynxLynxx moved this from 🏗 In progress to 👀 In review in Catalyst Dec 10, 2025
@LynxLynxx LynxLynxx changed the title feat(cat-voices) new datasource of proposal feat(cat-voices): new datasource of proposal data Dec 10, 2025
@LynxLynxx LynxLynxx marked this pull request as ready for review December 10, 2025 13:16
Copy link
Contributor

@damian-molinski damian-molinski left a 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

@github-project-automation github-project-automation bot moved this from 👀 In review to 🔖 Ready in Catalyst Dec 10, 2025
@github-actions
Copy link
Contributor

📚 Docs Preview

The docs for this PR can be previewed at the following URL:

https://docs.dev.projectcatalyst.io/voices/feat/proposal-viewer-v2

@LynxLynxx LynxLynxx moved this from 🔖 Ready to 👀 In review in Catalyst Dec 12, 2025
Copy link
Contributor

@damian-molinski damian-molinski left a 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

Comment on lines 562 to 569
ProposalDocument? proposalDocument;
if (templateData != null) {
final template = ProposalTemplateFactory.create(templateData);
proposalDocument = ProposalDocumentFactory.create(
rawProposal.proposal,
template: template,
);
}
Copy link
Contributor

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?

Copy link
Contributor Author

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

Comment on lines +595 to +602
expect(
actions.any(
(action) =>
action.metadata.ref == proposal1Ref &&
(action.metadata.authors?.contains(author1) ?? false),
),
isTrue,
);
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Code refactoring task review me PR is ready for review squad: face Frontend Catalyst Experience Team

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

3 participants