-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Outbound requests: Add "Pause polling" button #47812
Conversation
|
❌ Problem: the label |
Bundle size report 📦
Look at the Statoscope report for a full comparison between the commits 90348da and 6b357b3 or learn more. Open explanation
|
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.
Very nice!
|
Marked @pjlast because I have a vague memory that you wanted to add this earlier. (Sorry if I remembered wrong.) |
| <div className="site-admin-outbound-requests-page"> | ||
| <PageTitle title="Outbound requests - Admin" /> | ||
| <Button variant="secondary" onClick={togglePolling} className="float-right"> | ||
| {polling ? 'Pause polling' : 'Resume polling'} |
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.
Is polling a good name to show for the admins? Maybe "Pause updates"?
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.
👍 Modified it to "Pause/Resume updating"
| </Button> | ||
| <PageHeader | ||
| path={[{ text: 'Outbound requests' }]} | ||
| headingElement="h2" |
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.
The text below mentions "The list updates every five seconds." - Should we update this as well when the updates are paused?
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.
Now I'm removing that when you stop polling. It's totally fancy now. ✨
I've found that on dotcom, there are so many outbound requests per minute that it's practically impossible to investigate the requests because of the 5-sec polling. Annoying vid that demoes this in 25 seconds
In this PR, I add this button to the top-right to pause/resume polling:
I just copy-pasted the existing solution on the "background jobs" page. Didn't bother this time to extract the functionality to a component because it's not that long, it's only two copies for now, and I think it could be a good improvement for this page before the branch cut. Would consider extracting this code to a component/hook at its third use.
Test plan
Tested it locally, it nicely pauses and resumes polling: 20-sec Loom
App preview:
Check out the client app preview documentation to learn more.