-
Notifications
You must be signed in to change notification settings - Fork 326
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
Add blocking notification to EditPage #3382
Add blocking notification to EditPage #3382
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.
Some thoughts:
- Seeing this popup in action, it occurs to me that it behaves as kind of a mini error page. Would it make more sense to use the common "Error Page" for this message? And put the "click to unlock" button on there?
- The error should probably explain what being "locked" means. I.e. the brew is not visible via the share page, etc.
- So "Click to unlock" just takes you to the editor as normal, but doesn't actually lift the lock. Is there a better name for that button, like "CLICK TO CONTINUE TO THE EDITOR".
- I think a better use for this kind of "popup" thing might be for a "submit to admins" thing. I'm picturing this:
- User tries to open their edit page, and hits the error page instead. This is where all the details are. "your brew is locked. Here are all the details, and what this means for you. etc. Click here to continue to the editor"
- User enters the editor, where this popup now appears with a smaller message: "Your brew is locked. (locking message). Once you have resolved this issue, click here to notify the administrators for review. (BUTTON "REQUEST UNLOCK"). Click (OTHER BUTTON) to temporarily hide this notification (will reappear when the page is next reloaded).
- It might make sense to reuse (and maybe update) the "notificationPopup.jsx" component we already have instead of making a separate component element.
This might need some more discussion but I would like to hear what you think.
Some thoughts:
This can happen as authors do have a habit of opening a brew to edit and leaving it open in their browser for long periods of time (e.g. weeks).
|
I don't think we have any way to push notifications out like that without creating a live socket connection for every editing session, which adds some complexity. Something like that would be a whole separate project, but eventually that might be something we add.
I am imagining whatever notice we send should reappear every time the edit page is re-opened. If they are actively in violation of something I would rather keep reminding them than let them mute it. That said, I'm not really sure how lax or strict we should be in this type of situation. |
I think the question here is what is the locking function here to prevent? what type of content are we expecting to lock? confidential doc leaks? an alien cult manifesto? communist propaganda? (its a joke but you get what i mean). It is a locking function, for content the user can rewrite or already has in their system. If the content of the brew is so bad it is deserving to lock the document, why not delete it entirely? I understand the idea behind the locking, not so sure of its usefulness. Better to have it and not use it than need it and not have it, for sure. |
We could throw the notification upon the first (auto)save of that brew, based on info received then. |
That's a good point. Autosave creates regular periodic requests which could be used this way. |
There might be a copyright claim against an image in a brew. Deleting the entire brew would be an overreaction. |
locking the brew for a copyright claim seems too much for me, however, the "get that image out or we will lock it" would seem more appropiate to me. IDK |
In response to a DMCA notice, we are required by law to remove the offending content from public access until the issue is resolved. We as the hosting service are not liable for our users' copyright infringement unless we knowingly allow infringing content to remain accessible after receiving a notice. |
Rather than creating a new LockNotification component, we could instead
Currently the only fixed text is "BREW LOCKED", everything else comes from the
Should be a fairly simple change.
A method for requesting locks be removed will need to be created, which is intended to be added in a later PR, once functionality to actually add/remove/otherwise update locks has been created.
As NotificationPopup is a non-blocking and permanently clearable message, it has a different purpose to this notification; although I suspect it might work with some modifications. |
It occurs to me that we may want two messages - one for the ErrorPage, and one for the LockNotification. The general public needs only to know that the brew is locked, while the author needs to know the specifics of why it is locked... As such, an |
Looks good to me. |
Stop the notification from covering the renderWarning when both are present
FYI the Lock Notification has both onClick and onCancel methods, so it can be cleared by pressing the ESC key. This calls the same function as clicking the "CONTINUE TO EDITOR" button. |
I disagree with this, if we lock a brew, the user first priority should be removing such content. This encourages that behaviour. Making it wait longer a longer time gives 0 advantages. |
This would be in addition to the existing blocking notification, so authors can't just clear the message and then never refresh the Edit page, and thus never be presented with the notification again. The timed notification would serve as an additional reminder, and potentially also provide an easier way to access the "REQUEST REVIEW" button once the required changes have been made. |
I've run this through the Linter now, the only thing it picked up from these changes is an unused |
Oh, then yeah, sure, great |
Thanks @G-Ambatte ! 💯 ⭐ 🎉 |
This PR contributes towards Issue #3326.
This PR adds a notification to the EditPage which must be acknowledged before the brew itself will become editable.
EditPage:
MongoDB entry: