-
Notifications
You must be signed in to change notification settings - Fork 2.3k
chore: prevent click outside for edit dialog #6493
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important
Looks good to me! 👍
Reviewed everything up to 6f2a019 in 1 minute and 39 seconds. Click for details.
- Reviewed
350lines of code in5files - Skipped
0files when reviewing. - Skipped posting
7draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. web-app/src/containers/dialogs/AddEditAssistant.tsx:239
- Draft comment:
Good use of onInteractOutside to prevent accidental dialog closure. Inline handler is acceptable. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
2. web-app/src/containers/dialogs/AddEditMCPServer.tsx:307
- Draft comment:
Reformatted validation check for server type improves readability and consistency. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
3. web-app/src/containers/dialogs/AddEditMCPServer.tsx:371
- Draft comment:
Adding onInteractOutside to DialogContent prevents unintended dialog closure on outside clicks. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
4. web-app/src/containers/dialogs/EditJsonMCPserver.tsx:61
- Draft comment:
Consistent use of onInteractOutside here prevents accidental dismissals of the JSON editing dialog. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
5. web-app/src/containers/dialogs/ImportVisionModelDialog.tsx:47
- Draft comment:
Refactored validateGgufFile function enhances clarity and consistency. Consider adding a fallback if the validateGgufFile method is unavailable. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
6. web-app/src/containers/dialogs/ImportVisionModelDialog.tsx:309
- Draft comment:
Consistent use of onInteractOutside in DialogContent ensures the dialog remains open on accidental outside clicks. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
7. web-app/src/containers/dialogs/ImportVisionModelDialog.tsx:288
- Draft comment:
useEffect re-validates the MMProj file when modelName changes, ensuring compatibility checks remain current. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
Workflow ID: wflow_3ZkKgMBzHIdyMS4a
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Describe Your Changes
This pull request focuses on improving the robustness of several dialog components in the web application by preventing them from closing when users interact outside the dialog area. Additionally, it includes minor code style and readability improvements in the model import logic. These changes help ensure that users do not accidentally dismiss dialogs and improve maintainability.
Dialog interaction handling:
DialogContentinAddEditAssistant.tsx,AddEditMCPServer.tsx,EditJsonMCPserver.tsx, andImportVisionModelDialog.tsxto prevent closing dialogs when clicking outside by usingonInteractOutsidewithe.preventDefault(). [1] [2] [3] [4]Code style and readability improvements:
ImportVisionModelDialog.tsxto use consistent arrow function formatting and dependency arrays foruseCallback. [1] [2]ImportVisionModelDialog.tsxby formatting function calls and error messages. [1] [2]AddEditMCPServer.tsxfor clarity and consistency.Fixes Issues
Self Checklist
Important
Prevents dialogs from closing on outside click and improves code style in
ImportVisionModelDialog.tsxandAddEditMCPServer.tsx.AddEditAssistant.tsx,AddEditMCPServer.tsx,EditJsonMCPserver.tsx, andImportVisionModelDialog.tsxusingonInteractOutsidewithe.preventDefault().ImportVisionModelDialog.tsxto use consistent arrow function formatting and dependency arrays foruseCallback.ImportVisionModelDialog.tsx.AddEditMCPServer.tsxfor clarity and consistency.This description was created by
for 6f2a019. You can customize this summary. It will automatically update as commits are pushed.