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(pte): PTE modal re-render on validation state change due to tooltip disabled change #5766

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

pedrobonamin
Copy link
Contributor

@pedrobonamin pedrobonamin commented Feb 16, 2024

Description

When there are validation errors the tooltip is enabled, when validation errors disappear the tooltip is disabled.
Making that update when the modal is rendered it will trigger a "unmount" and "re-mount" of the BlockObject causing the modal to unmount and remount, triggering the animation again and losing the input focus.

By checking if the modal is open to enable / disable the tooltip, we can be sure that this component won't unmount and mount causing this unwanted issues.

Screen.Recording.2024-02-16.at.11.29.58.mov

What to review

PTE dialogs and tooltips work as always

Testing

Create a new object within pte with validation eror

Notes for release

@pedrobonamin pedrobonamin requested review from a team and sjelfull and removed request for a team February 16, 2024 09:34
Copy link

vercel bot commented Feb 16, 2024

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

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview Feb 16, 2024 9:38am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 16, 2024 9:38am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Feb 16, 2024 9:38am

@pedrobonamin pedrobonamin changed the title fix(pte): PTE modal re-render on validation state change due… fix(pte): PTE modal re-render on validation state change due to tooltip disabled change Feb 16, 2024
Copy link
Contributor

No changes to documentation

Copy link
Contributor

Component Testing Report Updated Feb 16, 2024 9:41 AM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 31s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 6s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 12s 3 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 12s 4 2 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 12s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 32s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 18s 9 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 59s 18 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 14s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 19s 9 0 0

@pedrobonamin pedrobonamin added this pull request to the merge queue Feb 16, 2024
Merged via the queue into next with commit c24e4d9 Feb 16, 2024
40 checks passed
@pedrobonamin pedrobonamin deleted the edx-1058 branch February 16, 2024 14:13
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