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

[MINT-3217] Common milestone library #1540

Merged

Conversation

patrickseguraoddball
Copy link
Contributor

@patrickseguraoddball patrickseguraoddball commented Nov 26, 2024

MINT-3217

Description

  • Added view for milestone library
  • Added component for <MilestoneCard />
  • Added component and util for <SuggestedMilestoneToggle />
  • Added unit test

Can add this code to manually add a suggested/added milestone

  // TEMP only for demo
  const milestones = useMemo(() => {
    const rawData =
      data?.modelPlan?.mtoMatrix?.commonMilestones ||
      ([] as MilestoneCardType[]);

    const testData = JSON.parse(JSON.stringify(rawData));

    if (testData.length > 0) {
      testData[0].isSuggested = true;
      testData[0].isAdded = true;
    }

    return testData;
  }, [data?.modelPlan?.mtoMatrix?.commonMilestones]);

How to test this change

  1. Create model plan and navigate to MTO
  2. Click on 'Browse common milestone'
  3. Verify table works with pagination, search, and page size
  4. Verify matched figma

Why is this suggested is still in progress pending BE
Add to matrix still pending BE
About this milestone still pending

TODO: Add unit test/file for SuggestedMilestoneToggle once the BE work is complete

PR Author Checklist

  • I have provided a detailed description of the changes in this PR.
  • I have provided clear instructions on how to test the changes in this PR.
  • I have updated tests or written new tests as appropriate in this PR.
  • Updated the Postman Collection if necessary.

PR Reviewer Guidelines

  • It's best to pull the branch locally and test it, rather than just looking at the code online!
  • When approving a PR, provide a reason why you're approving it
    • e.g. "Approving because I tested it locally and all functionality works as expected"
    • e.g. "Approving because the change is simple and matches the Figma design"
  • Don't be afraid to leave comments or ask questions, especially if you don't understand why something was done! (This is often a great time to suggest code comments or documentation updates)
  • Check that all code is adequately covered by tests - if it isn't feel free to suggest the addition of tests.

@patrickseguraoddball patrickseguraoddball marked this pull request as ready for review November 29, 2024 15:01
@patrickseguraoddball patrickseguraoddball requested review from a team as code owners November 29, 2024 15:01
@patrickseguraoddball patrickseguraoddball requested review from StevenWadeOddball and garyjzhao and removed request for a team November 29, 2024 15:01
Copy link
Contributor

@garyjzhao garyjzhao left a comment

Choose a reason for hiding this comment

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

Found this bug:

Screen.Recording.2024-12-02.at.11.08.07.AM.mov

In summary, if I am on page 6 and change the table size to "all", nothing gets rendered on the table. It probably has to do with resetting the page when changing table size

Copy link
Contributor

@garyjzhao garyjzhao left a comment

Choose a reason for hiding this comment

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

LGTM

@patrickseguraoddball patrickseguraoddball merged commit b8a2169 into feature/MINT-3175_mto Dec 2, 2024
10 checks passed
@patrickseguraoddball patrickseguraoddball deleted the MINT-3217/common-milestone-library branch December 2, 2024 16:45
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

Successfully merging this pull request may close these issues.

2 participants