Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#807 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
javascript
領域
frontend

調査の方向性

src/js/core/TimelineConfig.js の slug 構築と、src/js/core/Util.js の ensureUniqueKey から始めます。非 ASCII の見出しと空の見出しを使って、再読み込み後のハッシュブックマークを再現し、その後、両方のケースで安定した識別子の挙動を確認します。完了条件は、ハッシュブックマークが機能するよう、ページの読み込みをまたいでもスライドの ID が一貫していること、またはサポートされる制限が文書化されていることです。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
JavaScript
スター
3.2k
フォーク
644
平均マージ
3分
マージ済み PR(30日)
2

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NUKnightLab/TimelineJS3 のほかの issue

NUKnightLab/TimelineJS3 の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。