-
Notifications
You must be signed in to change notification settings - Fork 810
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
AI Extension: add a way to cancel the AI request #31596
Conversation
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. Jetpack plugin:
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
As mentioned in Slack, I think this is an acceptable solution for the moment. It is hidden, but totally ok to leave it as a pro user feature that people will have to explore and find for themselves. The animation draws the eye in and gives it a nice affordance, so I'm happy about that. For a future iteration, I'd like to hear from our experts @jasmussen @jay on whether there's an existing visual mechanism (or component, or pattern) we could make use of here to send tips (i.e.: temporary notices) to our users letting them know of power features such as this one. For additional context: what we're trying to communicate here is that users can click the AI button a second time to cancel the prompt. |
I'd echo this, if I ever found a need to stop the process I'd probably intuit clicking that toggle too.
For the moment, there is not. We used to have pointers, but they didn't work very well. The closest we have now are the snackbar and the notice which exists in a gray minimal version; this notice you see in the split inspector informing you where your settings went. So as far as existing notices, you might best fire a snackbar initially or in context of a particular action. So long as you fire it contextually and not all the time, it can probably be a easy good solution. There are some cursory explorations around showing a dot indicator, for example in context of broken or incomplete blocks, or around responsive editing, but no concrete plans at the moment. |
Thanks, folks, for the feedback. To begin with, we have made significant changes to the implementation from the user interface perspective. Now, when the user selects an option from the dropdown, the app replaces the extended block (paragraph, heading) to an AI Assistant instance. Sorry about that Anyway, I'd like to add some comments.
We explored and talked about this idea. The basic conclusion was a Notice seems to be like a response from an action that the user could do: Save the post -> The notice shows a message In this scenario, it's important to inform the user that they have the option to cancel the request process by clicking on the active toolbar button. It's like we should find out a way to inform about it ahead of time. |
Yep, I'll defer to Filipe on the importance of highlighting the stop ability. You could even change the AI icon to a "Stop" icon (square), or add a button when it's working, though the latter would cause a layout shift. But just to be clear I was referring to the snackbar, not the notice. |
Correct, the bar that shows up when the user saves the post, for instance. This bar is always anchored in the same place, right (bottom, left) |
|
fa5288e
to
457f024
Compare
This PR has been marked as stale. This happened because:
If this PR is still useful, please do a [trunk merge or rebase](https://github.com/Automattic/jetpack/blob/trunk/docs/git-workflow.md#keeping-your-branch-up-to-date) and otherwise make sure it's up to date and has clear testing instructions. You may also want to ping possible reviewers in case they've forgotten about it. Please close this PR if you think it's not valid anymore — if you do, please add a brief explanation. If the PR is not updated (or at least commented on) in another month, it will be automatically closed. |
This PR has been automatically closed as it has not been updated in some time. If you want to resume work on the PR, feel free to restore the branch and reopen the PR. |
This PR introduces a functionality to cancel a request in the AI Extension dropdown. Here's an overview:
Fixes issue #31590
This PR implements a way to cancel the request when the user uses the AI Extension dropdown. In summary:
cancelRequest()
helper to the suggestion hookisActive
state to denote the requesting process.Fixes #31590
Proposed changes:
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
Screen.Recording.2023-06-27.at.08.08.22.mov