How to customize the sorting of the Product options in the Shop view?


how can I customize the Product options sorting in the dropdown element in the Shop view? For example here:

How can nicely customize the sorting of the T-Shirt sizes for example?

Is there a proper extension point for it?

Answer from @vvasiloi via Slack:

For all options you can do smth in the getOptions method of the product class.

For all or individual logic, you can modify the form type Sylius\Bundle\ProductBundle\Form\Type\ProductOptionValueChoiceType or maybe decorate Sylius\Component\Product\Resolver\AvailableProductOptionValuesResolver