Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

hash_bookmark doesn't work with non-ASCII headlines and blank headlines

Abierto
#807 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de NUKnightLab/TimelineJS3

Todos los issues de NUKnightLab/TimelineJS3

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.