Hi all,
We're considering creating a new repository for these site-specific selectors to use CSS selectors, with XPath as an option if CSS selectors are not expressive enough. I wanted to get your thoughts on such a move.
The mains reasons are:
- CSS selectors are more concise and more people are familiar with them than XPath selectors
- For
contains() applied to text content (second to last line in the image above), which the CSS spec does not support, we can use CSS to XPath convertors like Symfony's CSS select which has support for it.
- For more complicated selectors, we'd probably still want to allow XPath expressions to be entered somehow, but I assume this would not be used so much.
- PHP 8.4+ has native CSS selector support, so for most selectors, converting to XPath is not necessary.
The reason we're thinking of doing this in a new repo is so any code dependent on this repo can continue to function. And any new applications can use the new repo if they want. I'm thinking we may even be able to create a regular one-way sync if need be, from new repo to old, if there are no conflicts, as CSS to XPath isn't so difficult.
If anyone has any thoughts or suggestions, please do share. @j0k3r @HolgerAusB @Kdecherf
Hi all,
We're considering creating a new repository for these site-specific selectors to use CSS selectors, with XPath as an option if CSS selectors are not expressive enough. I wanted to get your thoughts on such a move.
The mains reasons are:
contains()applied to text content (second to last line in the image above), which the CSS spec does not support, we can use CSS to XPath convertors like Symfony's CSS select which has support for it.The reason we're thinking of doing this in a new repo is so any code dependent on this repo can continue to function. And any new applications can use the new repo if they want. I'm thinking we may even be able to create a regular one-way sync if need be, from new repo to old, if there are no conflicts, as CSS to XPath isn't so difficult.
If anyone has any thoughts or suggestions, please do share. @j0k3r @HolgerAusB @Kdecherf