Make more kinds of blocks collapse-able in edit mode

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
markdown
領域
frontend

調査の方向性

この issue ではファイルやテストは指定されていません。まず、見出しと style の波括弧に対する編集モードの折りたたみ実装を見つけ、次にブロック境界がどのように認識されるかを追跡してください。ここに挙げた alert、code、quote、nested bullet、math の各ブロックを、周囲のコンテンツを乱すことなくそれぞれ折りたたんだり展開したりできれば完了です。

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

説明

Is your feature request related to a problem? Please describe.
HackMD already has some support for folding/collapsing blocks in the edit section, specifically headers and style curly brackets. But there seems to be no support for folding blocks of text in:

  • Alert section (:::spoiler)
  • Code blocks (```)
  • Quote section (>)
  • Multi-layer bullet points (-)
  • Math blocks ($$)

They often contain a lot of text, and sometimes (especially :::spoiler and code blocks), their content takes up too much space and would be hard to navigate through all these contents before reaching the later part of the notes.

Describe the solution you'd like
I want the aforementioned blocks to be foldable, like how in the current version of HackMD, you can fold the whole header / paragraph by clicking the arrow on the left, next to the line numbers.

Describe alternatives you've considered
Maybe you can make the part you wanna collapse h6 (######), but that wouldn't make that much sense if there are more support for other kinds of blocks.

Additional context

I use Google Chrome 128.0.6613.86 (64-bit), Windows 11 Pro 23H2 (OS build 22631.4112)

https://github.com/user-attachments/assets/11aaf1ea-dd88-4c33-b118-1ca1c3884429

主要言語
言語のデータがありません
スター
40
フォーク
9
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

hackmdio/hackmd-io-issues のほかの issue

hackmdio/hackmd-io-issues の issue をすべて見る

似ている issue

Web Dev の issue をもっと見る

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

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