hash_bookmark doesn't work with non-ASCII headlines and blank headlines
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript
- Área
- frontend
Línea de trabajo
Empieza con la construcción del slug en src/js/core/TimelineConfig.js y ensureUniqueKey en src/js/core/Util.js. Reproduce los marcadores hash después de recargas con titulares no ASCII y vacíos, y determina después el comportamiento de los identificadores estables para ambos casos. Se considera terminado cuando los IDs de las diapositivas se mantienen coherentes entre cargas de página para que los marcadores hash funcionen, o cuando se documenta la limitación admitida.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
We got a support request from the creator of a Chinese-language timeline who wanted to use hash bookmarks.
They were failing because the slide IDs were different every time the page is loaded.
When a TimelineConfig object is instantiated, populated, it attempts to ensure that all slides have unique identifiers, mostly to support the hash bookmark feature. If the configuration is JSON based, the IDs can be specified using
the unique_id property of a slide object, but for most people using Spreadsheet configuration, there is no direct control over the IDs.
If no ID is specified, timeline tries to construct one from the headline, but the slugify function filters out non-ASCII characters, leaving an empty "slug" for Chinese-language headlines (among others).
That function calls out to another, ensureUniqueKey which is designed to do things like add numbers if the same headline is used more than once. If this function gets a blank ID, it generates a random six-character string. Since these have no relationship to the content of the slide, they will almost never come up the same way twice.
The tl;dr is that for timelines that have slides with non-ascii headlines or blank headlines, the hash_bookmark function will not work, unless the timelines are configured using JSON with explicit IDs specified.
Probably we need to come up with some kind of hashing function, which could be applied to non-ascii strings, but there would still be an issue with slides which have no headline. I'd probably be OK with saying that people who want to use hash_bookmark and have slides with blank headlines should use the JSON format, since it seems like quite an edge case.
- Lenguaje dominante
- JavaScript
- Estrellas
- 3.2k
- Forks
- 644
- Merge medio
- 3 min
- PR fusionados (30 d)
- 2
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 NUKnightLab/TimelineJS3
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
NUKnightLab/TimelineJS3#797 ·
-
multiple header commentsAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
NUKnightLab/TimelineJS3#617 ·
-
Bug CSS
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
NUKnightLab/TimelineJS3#602 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
NUKnightLab/TimelineJS3#904 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
NUKnightLab/TimelineJS3#902 · 2 comentarios ·
Todos los issues de NUKnightLab/TimelineJS3
Issues similares
-
[Feature]:Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
automated issue report
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
lirantal/discoprint#36 ·
Los mantenedores suelen responder en 1 día
-
accepting PR Content:HTML
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
mdn/content#45988 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
pnpm/pnpm#16635 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
txn2/mcp-data-platform#2030 ·
Los mantenedores suelen responder en 1 día