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

fix: Comments cannot be edited or deleted #2725

Merged
merged 6 commits into from
Nov 5, 2023

Conversation

EandrewJones
Copy link
Contributor

Description

See changesets.

Closes #2563 and #2561

See #2563 for in-depth discussion of the proposed and decided upon fix. In brief, the props for the edit/delete buttons were not properly destructured and therefore the wrong item was being unpacked as props. In the comment editing form component, the state and props hooks needed to be added and passed to the text area.

Copy link

changeset-bot bot commented Nov 4, 2023

⚠️ No Changeset found

Latest commit: d3ee34d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Nov 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
plate ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 5, 2023 5:11pm

@EandrewJones
Copy link
Contributor Author

EandrewJones commented Nov 4, 2023

@12joan Which packages should I select for the changeset when none of have been modified? This is all components side.

Also happy to add a test to verify expected behavior but I'm having trouble tracing where existing tests for comments components are, if any, and I only see a single e2e test file for tables.

Copy link
Contributor

reviewpad bot commented Nov 4, 2023

Thank you @EandrewJones for this first contribution!

@12joan
Copy link
Collaborator

12joan commented Nov 4, 2023

@12joan Which packages should I select for the changeset when none of have been modified? This is all components side.

If there are genuinely no changes to any versioned packages, we can merge without a changeset. But I think useCommentValue is now unused, so we can delete that and make a changeset on the comments package.

Also happy to add a test to verify expected behavior but I'm having trouble tracing where existing tests for comments components are, if any, and I only see a single e2e test file for tables.

We didn't get very far with adding e2e tests, that's right. 🙂

If you want to try adding an e2e test, go ahead. It would certianly help to prevent this issue happening again, but it's not required to get the PR merged.

@EandrewJones
Copy link
Contributor Author

EandrewJones commented Nov 4, 2023

We didn't get very far with adding e2e tests, that's right.

Totally understood. I can strongly relate.

Okay, I believe I've made all requested changes.

@12joan 12joan enabled auto-merge November 5, 2023 17:01
@12joan 12joan merged commit dcc3ec5 into udecode:main Nov 5, 2023
7 checks passed
@zbeyens zbeyens mentioned this pull request Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
small Pull request is small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Comments cannot be edited or deleted
2 participants