Javascript Initialization
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript, python
- Área
- api
Línea de trabajo
Comienza localizando el punto de entrada frag.initialize_js y siguiendo cómo se expone actualmente la inicialización de JavaScript a XBlocks. Define cómo llegan cero o más parámetros compatibles con JSON al lado de JavaScript sin requerir plantillas de HTML, CSS o JavaScript. Se considera terminado cuando la API acepta las formas de parámetros solicitadas y conserva los recursos estáticos compatibles con los navegadores.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
@pmitros: "It'd be nice if I could pass parameters to frag.initialize_js. I'd suggest these could be JSON objects (so string, dicts, arrays, integers), and I could have anywhere between 0 and infinity of them.
Right now my options for doing this are:
- Add templates to my HTML/JS/CSS. This is ugly.
a. I can no longer develop in browser without running the workbench. It forces my code to couple to workbench. I know I could probably find some way to split this among files where there is a test file and a workbench file, but that kind of sucks.
b. It forces me to put things inside HTML/CSS/JS files that break the semantics of what those files mean. I have to template in big data blobs in human-readable files. - I can do AJAX, with extra requests.
In addition, in both cases, it's an extra chunk of unnecessary code. I have to do $("#script_tag").text() or make web requests or similar."
@cpennington: "How does it couple you to workbench? Unlike XModules, w/ XBlocks we're advocating that users do their own templating (rather than relying on the runtime for templating). For instance, you could just do native python string interpolation, if that's enough for your needs.
Otherwise, I like the idea."
@pmitros: "If I can keep pure JavaScript, HTML, and CSS in files, I can develop and debug directly in Chrome/Firefox, as per my preference, and I can deploy either to the XBlock, or just upload static files to the web.
The instance I have /any/ kind of templates, be it Python .replace(), Python .format(), mako, etc., the code can only work inside of some kind of server which does that templating. I'm coupled to a more complex development and deployment mechanism. In abstract, I could build a separate server, one for XBlocks and one not to do the templating, or build an independent deployment mechanism, but in practice, that's a lot of work with no benefit (if I need a server, workbench is as good as any and better than most), so I'm left with developing in workbench. Being able to develop and deploy just in-browser is, on the other hand, a big benefit, as is being able to use the same HTML/CSS/JS files for both interactives on static pages as in XBlocks."
- Lenguaje dominante
- Python
- Estrellas
- 470
- Forks
- 231
- Merge medio
- 2 d 14 h
- PR fusionados (30 d)
- 7
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de openedx/XBlock
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
-
performance
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 45/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
[DEPR]: Support for XBlock Runtimes with raw string scope IDsPosiblemente ocupada @salman2013 la tomó hace 211 días. Abiertodepr
openedx/XBlock#784 · 10 comentarios · 3 reacciones · 1 asignado ·
Todos los issues de openedx/XBlock
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
UKGovernmentBEIS/inspect_ai#5781 ·
Los mantenedores suelen responder en 2 días
-
Bump .cicd to wamp-cicd 4c2f9ac: `just land` refuses open A18 decisions, `just where` lists themAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
crossbario/cfxdb#139 ·
-
Bump .cicd to wamp-cicd 4c2f9ac: `just land` refuses open A18 decisions, `just where` lists themAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
crossbario/txaio#241 ·
-
UX
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
mediajunkie/piper-morgan-product#1963 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100