option to specify screen width at which point navbar is merged into sidebar
- 主要言語
- JavaScript
- スター
- 31.5k
- フォーク
- 5.8k
- 平均マージ
- 9日 8時間
- マージ済み PR(30日)
- 2
説明
## Feature request
The existing `mergeSidebar` option is nifty: it allows you to merge the navbar into the sidebar for smaller screens, otherwise it won't look right.
However, the navbar can still look funky at certain sizes that are bigger than the mobile size (768px and up).
For example:

#### What problem does this feature solve?
An option would prevent cases when the navbar doesn't fit well at the top, even if the screen width is bigger than mobile.
#### What does the proposed API look like?
A new option (maybe something like `mergeNavbarAtWidth`) would allow us to specify a width at which the navbar should be merged.
#### How should this be implemented in your opinion?
We need to update the `mergeNavbar` feature to operate at runtime any time the width of the Docsify app is updated, instead of only at the beginning. Then, we need to merge the navbar when the width is below the specified size in the `mergeNavbarAtWidth` option.
We need to make this operate on resizes because people may resize their window.
At the moment, the merging only happens once initially, but if we resize our window from desktop size to mobile size then the navbar will not be merged. In this video I shrink my window and the menu does not get merged:

If you visit the site on your mobile phone (https://lume.io/docs), or do a refresh when your desktop browser window is on mobile size, then you will see the menu inside of the sidebar like the following:

#### Are you willing to work on this yourself?
コントリビューションガイド
調査の方向性
まず、既存の mergeNavbar 機能と、ウィンドウのサイズ変更時に Docsify アプリを更新するランタイムパスを追跡します。提案されている mergeNavbarAtWidth オプションが現在のモバイルしきい値とどのように連携すべきかを確認し、設定された幅をまたいでリサイズしたときに navbar が期待どおりに結合および分離されることを検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100