stream icon indicating copy to clipboard operation
stream copied to clipboard

Item count above table cuts off commas when updated via JS

Open cbirdsong opened this issue 3 months ago • 0 comments

Bug Report

Expected Behavior

The item count should accurately reflect how many records are in Stream after it is updated with Javascript.

Actual Behavior

The item count is cut off at the first[^1] comma when it is updated with Javascript.

Steps to Reproduce the Problem

  1. Open the main Stream page (/wp-admin/admin.php?page=wp_stream) on a site with more than 999 items
  2. Look at the number next to the pagination buttons. (ex.: 21,403 items)
  3. Wait for something to happen elsewhere on the site that creates a record and updates the table.
  4. Look at the number again. It will be quite a bit smaller than it was in step 2.

Screenshots

I observed this on two different sites[^2]:

https://github.com/xwp/stream/assets/1672206/896c4b91-4113-4129-b56b-c6d8fbb190af

https://github.com/xwp/stream/assets/1672206/8d1b1c58-e855-4e52-843a-def8d24d5fa6

System Information

  • Stream plugin version: 4.0.0
  • WordPress version: 6.4.3
  • PHP version: observed on both 7.4 and 8.x
  • Browser: Firefox
  • Computer operating system: MacOS

[^1]: I guess technically I don't know if it is the first or second comma since I don't have a site with 1,000,000 records handy. 🙃 [^2]: Both of these show exactly 165 pages, so I just double checked to verify that there is not also a problem with the "page X of Y" count. That number is working as expected on other sites, and these both being 165 is a ridiculous coincidence.

cbirdsong avatar Apr 02 '24 19:04 cbirdsong