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

Unable to click off of annotation modal #3488

Open
mkgold opened this issue Nov 2, 2022 · 4 comments
Open

Unable to click off of annotation modal #3488

mkgold opened this issue Nov 2, 2022 · 4 comments

Comments

@mkgold
Copy link
Member

mkgold commented Nov 2, 2022

I may be wrong about this, but I thought that I could close an annotation modal by clicking off of it and on to the main part of the text. In the attached screenshot, which is on the Debates instance, that does not work -- I have to click the Close button to leave the annotation.

Screen Shot 2022-11-02 at 5 39 10 PM

@zdavis
Copy link
Member

zdavis commented Nov 7, 2022

This is by design. When drawers in manifold allow the user to enter content, we typically put an overlay on the main content area that requires the user to press escape or click the close button to close it. We do this to avoid users accidentally closing a modal before they've saved changes.

I'm going to close this as I don't see it as a bug, but feel free to reopen if you want to debate this view or have a bigger discussion about it.

@zdavis zdavis closed this as completed Nov 7, 2022
@mkgold
Copy link
Member Author

mkgold commented Nov 10, 2022

I think the issue here from your use case is that it assumes people are opening the modal to leave a comment. For me, as a teacher, I want to click on annotated passages to see what my students have written; similarly, as an author, I want to be able to click on the annotation to see what comments people have left. In these cases, my intention isn't to enter text, but to read, and it would be so much easier to simply click off of the annotation to go on to the next one or to continue reading the text.

I like your idea of ensuring that people don't lose text that they have typed, but could we activate a "are you sure you want to close? all entered text will be lost" message only when people have actually entered text into the box -- and otherwise, we just let them click off of the modal to close it.

@mkgold mkgold reopened this Nov 10, 2022
@zdavis
Copy link
Member

zdavis commented Nov 10, 2022

I'm not assuming that everyone is going to leave a comment — but we do have to deal with the fact that someone could be leaving a comment.

I'd rather not add a "are you sure" modal because it adds a non-trivial amount of complexity to track the state of the various inputs that can show up when the modal is open. There can be multiple annotations in the modal, each of which can be in an editable state. Each annotation can have comments, and comments have threaded replies. I'm pretty sure it's possible to have more than one editing interface open at a time. We'd have to build some mechanism that spanned all these various editing interfaces and tracked the state of each of them, which is really non-trivial. Tracking that state will be complicated, so it will take time and add complexity to an already complex part of the application. I mean, we could do it, but it's not going to be a particularly quick fix.

You can always press escape to exit out, if you don't want to navigate to the close button with your mouse. Is that not sufficient?

@mkgold
Copy link
Member Author

mkgold commented Nov 10, 2022

That does help, but I didn't know that I could just click ESC. Here's the thing, though. When I click on an annotation, even as a logged in user, I don't see a text box to fill in. So there is no chance of me even losing text unless I actually click "reply" to an existing annotation.

Screen Shot 2022-11-10 at 12 03 47 PM

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

No branches or pull requests

2 participants