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

Add optional props to ICard.commit #147

Merged
merged 7 commits into from
Oct 11, 2021
Merged

Conversation

shangzhel
Copy link
Collaborator

async function updateCommitCard(card: ICard) {
  await card.commit({favorite: true});
}

@shangzhel shangzhel added the enhancement New feature or request label Oct 9, 2021
@shangzhel shangzhel self-assigned this Oct 9, 2021
Copy link
Owner

@chomosuke chomosuke left a comment

Choose a reason for hiding this comment

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

When the user is editing something in the card detail, and the same card is marked as favorite, the changes are reverted

Copy link
Owner

@chomosuke chomosuke left a comment

Choose a reason for hiding this comment

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

Thank you

Copy link
Owner

@chomosuke chomosuke left a comment

Choose a reason for hiding this comment

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

Soz for more requested changes.

But I noticed that cardDetail's unsaved changes get commited alongside favorite, is it possible to commit something while retaining the unsaved changes?

Don't care about keys here.
@shangzhel shangzhel added this to Triage in Product backlog via automation Oct 9, 2021
@shangzhel shangzhel added this to In progress in Sprint 3 via automation Oct 9, 2021
@shangzhel shangzhel moved this from Triage to Sprint 3 in Product backlog Oct 9, 2021
@shangzhel shangzhel added this to the Sprint 3 milestone Oct 9, 2021
Copy link
Owner

@chomosuke chomosuke left a comment

Choose a reason for hiding this comment

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

Normal commits after updates now no longer works.

I think:
if something is given to the commit function, then it should only commit what's given.
if nothing is given to the commit function, then it should commits what's been given in update().
override should persist until commit is called with with no arguments.

Alternatively you can make another function called directCommit() or something like that which only commits what's given to it. And commit will simply remain as it is on master.

Sprint 3 automation moved this from In progress to Review in progress Oct 10, 2021
@shangzhel
Copy link
Collaborator Author

if something is given to the commit function, then it should only commit what's given.
if nothing is given to the commit function, then it should commits what's been given in update().

That is what it is supposed to do.

Sprint 3 automation moved this from Review in progress to Reviewer approved Oct 10, 2021
Copy link
Owner

@chomosuke chomosuke left a comment

Choose a reason for hiding this comment

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

lgtm.

Thanks again, I hope I've tested every scenario this time.

@shangzhel shangzhel merged commit c075f4f into master Oct 11, 2021
Sprint 3 automation moved this from Reviewer approved to Done Oct 11, 2021
Product backlog automation moved this from Sprint 3 to Sprint 3 Done Oct 11, 2021
@shangzhel shangzhel deleted the shangzhel/card-update-commit branch October 11, 2021 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Product backlog
  
Sprint 3 Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants