¡Hola a todos!
Estoy trabajando en una funcionalidad muy solicitada y que, en mi opinión, será útil para muchos: ¡la posibilidad de inyectar una variable en las escenas!
Un pequeño adelanto de la funcionalidad:
Edición: la PR:
master ← inject-scene-variables-in-other-boxes
ouvert 02:24PM - 18 Jan 21 UTC
### Pull Request check-list
To ensure your Pull Request can be accepted as fa… st as possible, make sure to review and check all of these items:
- [x] If your changes affects code, did your write the tests?
- [x] Are tests passing? (`npm test` on both front/server)
- [x] Is the linter passing? (`npm run eslint` on both front/server)
- [x] Did you run prettier? (`npm run prettier` on both front/server)
- [x] If you are adding a new features/services, did you run integration comparator? (`npm run compare-translations` on front)
- [x] If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
- [x] If you are adding a new features/services which needs explanation, did you modify the user documentation? See [the GitHub repo](https://github.com/GladysAssistant/v4-website) and the [website](https://gladysassistant.com).
- [x] Did you add fake requests data for the demo mode (`front/src/config/demo.json`) so that the demo website is working without a backend? (if needed) See [https://demo.gladysassistant.com](https://demo.gladysassistant.com).
NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
### Description of change
Please provide a description of the change here. It's always best with screenshots, so don't hesitate to add some!
(Es WIP)
Pequeña demostración en video:
https://streamable.com/wjwojf
Acabo de hacer push de un primer POC de la función en GitHub. ¡Acepto cualquier comentario sobre la PR/pruebas/comentarios de UX!
master ← inject-scene-variables-in-other-boxes
Hi @cicoub13 @VonOx @atrovato, I would love a review from you on this PR!
Th… is is how it looks like:
https://user-images.githubusercontent.com/7365207/104939530-d229c100-59b0-11eb-93e1-87bf4c4bcfe1.mp4
Is the shortcut straightforward? (having to type " {{ " to open the variable list ?) Should we use another trigger ? Like "#" ?
This feature will be extended to basically all input field in scenes, for exemple in the HTTP request it could be super useful to automatically inject a variable into a POST body :)
Hola. He echado un vistazo a la PR y tengo un error al inicializar tagify
Uncaught (in promise) TypeError: _this.props.action.text is undefined
initTagify SendMessageParams.jsx:102
refreshVariables SendMessageParams.jsx:78
promise callback*SendMessageParams/_this.refreshVariables/< SendMessageParams.jsx:76
refreshVariables SendMessageParams.jsx:49
componentWillReceiveProps SendMessageParams.jsx:138
Lo he intentado de todas las maneras, con diferentes dispositivos o acciones en los grupos anteriores
¡Vaya! Gracias por el aviso. Te aviso cuando esté arreglado
@cicoub13 normalmente está bien, ¡he enviado un parche!
Dime si ves otros errores. ¡No dudes en probar la funcionalidad a fondo, tiene que ser robusta!
VonOx
22 Enero, 2021 10:26
7
¡Hola! He hecho checkout de la rama para probar.
En Chromium/Firefox no aparece nada cuando escribo {{
Así que pensé « Vincent, la has cagado, no estás en la rama correcta »
Al parecer sí ^^
¿Solo funciona para los sensores?
Bueno, tal vez no esté claro, pero ¡hay que tener una caja que establezca una variable para poder usar variables!
¡Buena observación :)!
Aquí tienes un ejemplo de escena:
¿Alguna idea de cómo hacerlo más claro?
VonOx
22 Enero, 2021 10:32
9
Ah sí, ahora funciona mejor ^^
Pequeño fallo en FF
Creo que hay que indicar (cuando no aparece nada ^^) que primero hay que recuperar el valor del dispositivo.
Porque, te lo digo, no estaba claro (aunque al final tiene sentido).
VonOx:
Petit glitch sur FF
Vaya. Lo voy a revisar, después es una librería que uso, espero que no sea grave ^^
¡Buena idea!
En mi casa todo funciona en Firefox, creo que es un problema porque tu caja es muy larga.
Edición: es un problema de tamaño de texto.
Incluso podríamos hacer la caja más grande para permitir que entren variables más grandes:
Antes:
Después:
Creo que esta solicitud de función puede cerrarse