Part-DB-server/config/packages
Wieland Schopohl 29db029d69
Add SI-prefix-aware sorting column for parts tableFeature/si value sort (#1344)
* Add SI-prefix-aware sorting column for the parts table

Adds an optional "Name (SI)" column that parses numeric values with SI
prefixes (p, n, u/µ, m, k/K, M, G, T) from part names and sorts by the
resulting physical value. This is useful for electronic components where
alphabetical sorting produces wrong results — e.g. 100nF, 10pF, 1uF
should sort as 10pF < 100nF < 1uF.

Implementation:
- New SiValueSort DQL function with platform-specific SQL generation
  for PostgreSQL (POSIX regex), MySQL/MariaDB (REGEXP_SUBSTR), and
  SQLite (PHP callback registered via the existing middleware).
- The regex is start-anchored: only names beginning with a number are
  matched. Part numbers like "MCP2515" or "Crystal 20MHz" are ignored.
- When SI sort is active, NATSORT is appended as a secondary sort so
  that non-matching parts fall back to natural string ordering instead
  of appearing in arbitrary order.
- The column is opt-in (not in default columns) and displays the parsed
  float value, or an empty cell for non-matching names.

* Rename SI column from "Name (SI)" to "SI Value"

The column now shows the parsed numeric value rather than the part name,
so the label should reflect that.

* Support comma as decimal separator in SI value parsing

Part names using European decimal notation (e.g. "4,7 kΩ", "2,2uF")
were parsed incorrectly because the regex only recognized dots. Now
commas are normalized to dots before parsing, matching the existing
pattern used elsewhere in the codebase (PartNormalizer, price providers).
2026-04-15 22:56:34 +02:00
..
dev Use jbtronics/translation-editor bundle instead of php-translation/symfony-bundle for profiler translation editing 2024-09-08 20:03:33 +02:00
prod Upgraded doctrine-bundle recipe 2023-02-11 22:27:51 +01:00
test Use str_contains and similar instead of strpos 2023-05-27 23:58:28 +02:00
api_platform.yaml Updated to API Platform 4 2025-08-04 23:32:42 +02:00
assets.yaml Added a basic show part info with new design. Not finished yet... 2019-02-24 18:05:06 +01:00
cache.yaml Moved cache.settings to cache.system adapter to ensure it is cleared on updating 2026-03-04 23:31:16 +01:00
csrf.yaml Updated ux-turbo recipe 2025-07-13 16:46:41 +02:00
dama_doctrine_test_bundle.yaml Updated recipes to update docker related files 2024-03-10 18:08:22 +01:00
datatables.yaml Disable searching option on datatables which we do not need and which causes an CSP violation 2025-08-31 01:34:31 +02:00
debug.yaml Updated symfony/debug recipe 2022-03-04 19:07:10 +01:00
doctrine.php Ran rector 2026-02-14 23:33:40 +01:00
doctrine.yaml Add SI-prefix-aware sorting column for parts tableFeature/si value sort (#1344) 2026-04-15 22:56:34 +02:00
doctrine_migrations.yaml Updated doctrine/doctrine-migrations recipe. 2021-10-02 20:47:01 +02:00
dompdf_font_loader.yaml Added GNU unifont as fallback font for labels with CJK characters 2023-07-02 03:26:56 +02:00
framework.yaml Only allow to set the DELETE method via HTTP method overriding 2026-02-07 17:18:31 +01:00
http_client.yaml Added proper OAuth authentication for digikey and other providers 2023-07-16 03:07:53 +02:00
http_discovery.yaml Updated recipe of php-http/discovery 2023-05-27 20:52:04 +02:00
knpu_oauth2_client.yaml Added info provider for Buerklin (#1151) 2026-01-04 21:05:47 +01:00
liip_imagine.yaml Fixed LiipImagine deprecation 2023-04-15 19:11:06 +02:00
mailer.yaml Added an mechanism to reset passwords via mail. 2019-11-24 22:49:22 +01:00
monolog.yaml Updated monolog recipe 2025-11-30 14:51:56 +01:00
nbgrp_onelogin_saml.yaml Use the DEFAULT_URI setting for SAML base url instead of auto determining it. 2023-12-10 22:52:59 +01:00
nelmio_cors.yaml Added first API endpoint 2023-08-06 00:42:34 +02:00
nelmio_security.yaml Removed Microsoft X-XSS-Protection header, as it is not recommended on modern browsers anymore and is considered deprecated 2025-09-19 09:18:49 +02:00
nyholm_psr7.yaml Added an console command for updating currency exchange rates. 2019-08-13 13:04:31 +02:00
property_info.yaml Updated recipe for property_info 2025-07-13 12:13:10 +02:00
routing.yaml Updated routing recipe 2025-07-13 16:40:56 +02:00
scheb_2fa.yaml Removed deprecated google 2FA option 2023-12-05 22:07:48 +01:00
security.yaml Use new webauthn library for 2FA 2025-08-14 18:46:10 +02:00
settings.yaml Use a special settings cache that lives in cache.system to ensure that it is properly cleared on cache clear 2026-02-03 20:49:25 +01:00
swap.yaml Allow for more currency exchange rate pairs, without need for fixer.io 2025-09-05 22:15:04 +02:00
translation.yaml Fixed 2DA login 2025-12-07 22:47:27 +01:00
twig.yaml Make form layout better at wide screens & Make horizontal form column layout configurable via global Twig variables (#1293) 2026-03-07 16:14:58 +01:00
ux_translator.yaml Move frontend translations to separate domain to reduce bundle size (#1197) 2026-01-18 18:50:38 +01:00
ux_turbo.yaml Fixed login CSFR token error 2025-08-04 23:50:25 +02:00
validator.yaml Updated validator recipe 2025-07-13 16:30:11 +02:00
web_profiler.yaml Use ajax_replace option for symfony debug toolbar instead of custom event subscriber 2025-08-24 12:24:08 +02:00
webauthn_2fa.yaml Renamed security template folder to recommended snake_case style 2023-02-04 22:59:43 +01:00
webpack_encore.yaml Automatic reload assets on when they change. 2022-03-04 20:19:43 +01:00