hash_bookmark doesn't work with non-ASCII headlines and blank headlines
まだ誰も着手していません。
評価
- 難易度
- 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
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NUKnightLab/TimelineJS3 のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
NUKnightLab/TimelineJS3#797 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
NUKnightLab/TimelineJS3#617 ·
-
Bug CSS
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
NUKnightLab/TimelineJS3#602 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
NUKnightLab/TimelineJS3#904 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
NUKnightLab/TimelineJS3#902 · コメント 2 件 ·
NUKnightLab/TimelineJS3 の issue をすべて見る
似ている issue
-
[Feature]:オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
automated issue report
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
lirantal/discoprint#36 ·
メンテナーはふだん 1 日以内に返信
-
accepting PR Content:HTML
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
mdn/content#45988 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
txn2/mcp-data-platform#2030 ·
メンテナーはふだん 1 日以内に返信