-
Notifications
You must be signed in to change notification settings - Fork 1
Feat/ choices js #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
mpertici-beapi
commented
Dec 8, 2025
- Add choices js for advanced select https://github.com/Choices-js/Choices
|
@mpertici-beapi @francoistibo le but du jeu, c'est d'éviter que le plugin ne fasse cette requête : https://github.com/BeAPI/simple-punctual-translation/blob/master/inc/class.admin.php#L275 qui crash sur les "gros" WP, donc il ne faut pas ajouter un JS pour juste avoir une recherche, mais bien éviter toute requête serveur ultra-fat. Merci de revoir la PR, et étant l'auteur du plugin, je veux la valider, svp. |
|
@herewithme la PR est à jour. 1. PHP - ajaxBuildSelect() (ligne 376)
2. PHP - MetaboxOriginalContent() (ligne 277)
3. JavaScript - admin.js
Avantages
Choix librairie JS pour le select (qui permet à la liste d'etre recherchable) |
| ## Changelog | ||
|
|
||
| * Version 1.1.6 : | ||
| * Use Choices.js to enable search on select |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
préciser aussi l'impact sur la performance/crash sur les gros sites.
| 'post_type' => ! empty( $current_options['cpt'] ) ? $current_options['cpt'] : 'any', | ||
| 'post_status' => 'any', | ||
| 'posts_per_page' => 2000, | ||
| 'posts_per_page' => 100, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a besoin d'afficher quelque chose dans le HTML ? on peut pas ne rien afficher du tout ? à la part, la valeur cochée ? est-ce que si la valeur choisi est dans 400ème dans la liste, la sélection reste préservée avec ce limite à 100 ?
|
@francoistibo 2 commentaires |
