Skip to content

Conversation

@iamdharmesh
Copy link
Member

Description of the Change

In #354, we added an API rate limits widget to display the remaining API rate limits for the user and app. This PR makes a minor improvement by not showing the rate limits if the reset time has passed until the latest data is available.

How to test the Change

  1. Tweet using one of the connected accounts and ensure that the rate limit starts appearing in the Dashboard widget and on the post edit screen.
  2. Edit the autoshare_for_twitter_accounts option to set the reset time to a past value for one of the user accounts.
  3. Verify that the rate limit no longer appears for that account and that it displays the message: "No X/Twitter rate limit available yet. Make a post to X/Twitter first." until new limit data becomes available.

Changelog Entry

Fixed - Ensure that no rate limits are shown if the reset time has passed.

Credits

Props @iamdharmesh

Checklist:

@iamdharmesh iamdharmesh self-assigned this Feb 1, 2025
@iamdharmesh iamdharmesh added this to the 2.3.0 milestone Feb 1, 2025
@github-actions github-actions bot added the needs:code-review This requires code review. label Feb 1, 2025
@iamdharmesh iamdharmesh requested review from a team and Sidsector9 and removed request for a team, dkotter and jeffpaul February 1, 2025 08:38
Copy link
Collaborator

@dkotter dkotter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look good here.

While not related, both E2E tests and PHPUnit tests are failing because SVN is no longer installed by default in GitHub Actions.

The E2E tests should be fixed once 10up/action-wordpress-plugin-build-zip#8 is merged and a new release is put out.

For PHPUnit tests, we'll need to fix that on our end. Doesn't have to be done as part of this PR (could be a separate PR if you want) but would be great to resolve those. Can see how we fixed this on ClassifAI for an example

@dkotter dkotter modified the milestones: 2.3.0, 2.4.0 Feb 5, 2025
@dkotter
Copy link
Collaborator

dkotter commented Feb 5, 2025

Code changes look good here.

While not related, both E2E tests and PHPUnit tests are failing because SVN is no longer installed by default in GitHub Actions.

The E2E tests should be fixed once 10up/action-wordpress-plugin-build-zip#8 is merged and a new release is put out.

For PHPUnit tests, we'll need to fix that on our end. Doesn't have to be done as part of this PR (could be a separate PR if you want) but would be great to resolve those. Can see how we fixed this on ClassifAI for an example

E2E tests are fixed now with the upstream release. I've also fixed the PHPUnit tests in #358, so should be good on both once that is merged in

@jeffpaul jeffpaul requested a review from dkotter March 11, 2025 14:06
@github-project-automation github-project-automation bot moved this from Code Review to QA Testing in Open Source Practice Mar 11, 2025
@dkotter dkotter merged commit 965b9da into develop Mar 11, 2025
18 checks passed
@dkotter dkotter deleted the fix/rate-limits branch March 11, 2025 15:06
@github-project-automation github-project-automation bot moved this from QA Testing to Done in Open Source Practice Mar 11, 2025
@dkotter dkotter modified the milestones: 2.4.0, 2.3.1 Jul 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:code-review This requires code review.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants