Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.4k stars 1.98k forks source link

Alphabetical order ignores numerical order in Query Loop #90596

Open nicolynramos opened 4 months ago

nicolynramos commented 4 months ago

Quick summary

When you set the Query Loop block to sort posts alphabetically (A > Z, Z > A), numbers are sorted alphabetically as well. So instead of 1, 2, 3, ... it shows 1, 10, 11, 2, 3, etc.

Steps to reproduce

  1. Add a query loop block on a site with posts that have titles that start with numbers. For instance, "1. Example", "2. Example", etc.
  2. Set the query loop block to sort A > Z or Z > A
  3. Notice that numbers are sorted alphabetically instead of numerically

What you expected to happen

If post titles start with numbers, they should be sorted numerically first. For example, if you have posts titled 1-10, you should see them in that order.

What actually happened

Instead of numerically sorting, numbers in post titles are organized alphabetically as well so instead of 1-10, you'll see 1, 10, 2, 3, 4... etc

Impact

All

Available workarounds?

No but the platform is still usable

Platform (Simple and/or Atomic)

Simple, Atomic

Logs or notes

No response

liviopv commented 4 months ago

📌 REPRODUCTION RESULTS

📌 FINDINGS/SCREENSHOTS/VIDEO CleanShot 2024-05-14 at 12 01 04@2x

📌 ACTIONS