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(core): fixes an issue with pasting in conditional readonly field #7564

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

binoy14
Copy link
Contributor

@binoy14 binoy14 commented Sep 30, 2024

Description

Fixes an issue where pasting in a conditional readOnly field would not actually resolve the value of the property and always return true for a function. This PR fixes it so that the actual resolved value is used

What to review

Error Case

  1. Navigate to test-studio conditional field document
  2. Add a value to title that does not contain the word "read only"
  3. Find field titled "Read Only If Title Is Read Only" and click on paste item

Actual: Cannot paste even if the field is not read only

Fixed Case

  1. Navigate to preview test-studio conditional field document
  2. Add a value to title that does not contain the word "read only"
  3. Find field titled "Read Only If Title Is Read Only" and click on paste item

Actual: Can paste if the field is not read only also cannot paste if the field is not read only

Testing

Unit tests added for the function

Notes for release

  • Fixes issue where pasting into conditional readOnly field would not used the returned value

Copy link

vercel bot commented Sep 30, 2024

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

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 30, 2024 7:26pm
performance-studio ✅ Ready (Inspect) Visit Preview Sep 30, 2024 7:26pm
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 30, 2024 7:26pm
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 30, 2024 7:26pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 30, 2024 7:26pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Sep 30, 2024 7:26pm

Copy link
Contributor Author

binoy14 commented Sep 30, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @binoy14 and the rest of your teammates on Graphite Graphite

Copy link
Contributor

No changes to documentation

Copy link
Contributor

Component Testing Report Updated Sep 30, 2024 7:29 PM (UTC)

✅ All Tests Passed -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 44s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 9s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 31s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 37s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 17s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 10s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 3m 0s 0 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 45s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 41s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 15s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 8s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 26s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 18s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 35s 12 0 0
formBuilder/tree-editing/TreeEditing.spec.tsx ✅ Passed (Inspect) 0s 0 3 0
formBuilder/tree-editing/TreeEditingNestedObjects.spec.tsx ✅ Passed (Inspect) 0s 0 3 0

Copy link
Member

@rexxars rexxars left a comment

Choose a reason for hiding this comment

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

Great work, and kudos for the thorough tests 👏

Copy link
Member

@sjelfull sjelfull left a comment

Choose a reason for hiding this comment

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

Thanks, great work!

@binoy14 binoy14 added this pull request to the merge queue Oct 1, 2024
Merged via the queue into next with commit 2e47715 Oct 1, 2024
52 checks passed
@binoy14 binoy14 deleted the sdx-1645 branch October 1, 2024 14:04
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.

3 participants