Dev: Academy guide on group commands (toolbar drop-downs and submenus)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 56/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- hugo
調査の方向性
Start by locating the Academy guide on creating toolbars in the website documentation and read how it is built. Add an example explaining grouped commands, their activation behavior and command type rules, plus guidance for finding valid menu names. Done when the guide covers these behaviors and answers how to identify menu entries.
索引モデルが issue の本文から書いたものです。
説明
Thank you for the great documentation on creating new toolbars.
Here is another useful example:
The command class (which is added via addCommand()) has an optional function named GetCommands(self) -> list[str]. You can return a list of command names to be grouped together. This new Group-Command can be used similar to a normal command item, but:
- In a toolbar it will display a drop-down list (like the Constraints or Circle combo menu).
- As a menu-item it will create a menu entry with all selected commands as submenu items.
There is also GetDefaultCommand(self) -> int which will trigger the command at chosen index (e.g. if user clicks on toolbar combo box without opening the drop-down).
The group can implement Activated(self, cmd: int = 0) -> None which provides the index of the performed action. If the group does NOT implement Activated(), the Activated() function of the child command is executed. If the group does implement Activated(), then the child is not called and the group is responsible for handling the action.
CmdType rules apply to the group first. E.g. if child command can be shown in edit mode, but group cannot, then you wont be able to call any child because the group will be deactivated.
...
As a related question: how to find valid menu names? E.g. I tried "Geometries" and it inserts a new menu item at the end of the "Sketch" menu. While this is where I want it to be, it is not where I would have expected the item to appear. I know the documentation says "names an entry, not a menu", but I dont know how to get either except by trial and error. Using an entry of a menu to append to that menu feels wrong, but I guess it is how it is.
- 主要言語
- HTML
- スター
- 3
- フォーク
- 10
- 平均マージ
- 1日 18時間
- マージ済み PR(30日)
- 27
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
FreeCAD/Website のほかの issue
-
Feature
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
Help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
FreeCAD/Website#89 · コメント 21 件 ·
メンテナーはふだん 1 日以内に返信
-
CMS Help wanted News Tools
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
FreeCAD/Website#112 · コメント 9 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Bug
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
FreeCAD/Website#111 · コメント 26 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
:octocat: Bug github_actions Hugo
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
FreeCAD/Website#105 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
FreeCAD/Website の issue をすべて見る
似ている issue
-
Referencesオープン
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
jaegertracing/documentation#1213 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
sky-map-team/stardroid#1422 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
eclipse-score/kyron#249 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
eclipse-score/logging#531 ·
メンテナーはふだん 2 日以内に返信