-
Notifications
You must be signed in to change notification settings - Fork 235
imprv: New help button #10553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev/7.4.x
Are you sure you want to change the base?
imprv: New help button #10553
Conversation
| <DropdownItem | ||
| tag="a" | ||
| href="https://docs.growi.org" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="my-1" | ||
| data-testid="growi-docs-link" | ||
| > | ||
| <span className="d-flex align-items-center"> | ||
| GROWI Docs | ||
| <span className="material-symbols-outlined ms-1 fs-6">open_in_new</span> | ||
| </span> | ||
| </DropdownItem> | ||
|
|
||
| <DropdownItem | ||
| tag="a" | ||
| href="https://growi.cloud/help/" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="my-1" | ||
| data-testid="growi-cloud-help-link" | ||
| > | ||
| <span className="d-flex align-items-center"> | ||
| {t('help_dropdown.growi_cloud_help')} | ||
| <span className="material-symbols-outlined ms-1 fs-6">open_in_new</span> | ||
| </span> | ||
| </DropdownItem> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs と Help は両方出さなくてもいいかと思います (Cloud ユーザーに「開発ガイド」 等は不要なので)。Cloud のアプリの場合は Help でそれ以外は Docs のリンクを表示するで良いかと思います。
Help/Docs の出し分けは SecondaryItems.tsx の旧実装を参考に useGrowiCloudUri() を使えばできます。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
対応しました
| export const SecondaryItems: FC = memo(() => { | ||
|
|
||
| const isAdmin = useIsAdmin(); | ||
| const growiCloudUri = useGrowiCloudUri(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
growiCloudUri を使わなくなったのであれば削除お願いします (import 文も)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
削除しました
| const HelpDropdown = dynamic(() => import('./HelpDropdown').then(mod => mod.HelpDropdown), { | ||
| ssr: false, | ||
| loading: () => <SkeletonItem />, | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
細かいですが、親コンポーネントである Sidebar.tsx が dynamic import しており、HelpDropdown は Sidebar.tsx がレンダリングされていれば必ずレンダリングされるものなのでこれは Dynamic import しなくても良いかと思います。
PersonalDropdown は isGuestUser: true という条件の時は読み込まれなくてよい (Dom に存在しなくてよい) ので dynamic import の恩恵があります。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修正しました
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the help UI by moving the GROWI version display and keyboard shortcuts access from a fixed position at the bottom-right of the screen into a new Help dropdown menu in the sidebar navigation. The SystemVersion component is removed and replaced with a more comprehensive HelpDropdown component that provides centralized access to documentation, shortcuts, and version information.
Key changes:
- Replaces the
SystemVersioncomponent with a newHelpDropdowncomponent in the sidebar - Consolidates help resources (GROWI Docs, GROWI.cloud Help, shortcuts modal, and version info) into a single dropdown menu
- Adds translations for the new dropdown labels in 5 languages (en_US, ja_JP, fr_FR, ko_KR, zh_CN)
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
apps/app/src/components/Layout/ShareLinkLayout.tsx |
Removes SystemVersion component import and usage |
apps/app/src/components/Layout/BasicLayout.tsx |
Removes SystemVersion component import and usage |
apps/app/src/components/Layout/AdminLayout.tsx |
Removes SystemVersion component import and usage |
apps/app/src/client/components/SystemVersion.tsx |
Deletes the entire SystemVersion component file |
apps/app/src/client/components/SystemVersion.module.scss |
Deletes the SystemVersion styles file |
apps/app/src/client/components/Sidebar/SidebarNav/SecondaryItems.tsx |
Replaces simple Help link with new HelpDropdown component |
apps/app/src/client/components/Sidebar/SidebarNav/HelpDropdown.tsx |
Adds new HelpDropdown component with documentation links, shortcuts, and version display |
apps/app/src/client/components/Sidebar/SidebarNav/HelpDropdown.module.scss |
Adds styles for the new HelpDropdown component |
apps/app/public/static/locales/{lang}/translation.json |
Adds translations for help dropdown labels in 5 languages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
|
|
||
| .help-dropdown-menu :global { |
Copilot
AI
Dec 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .help-dropdown-menu :global selector is duplicated. Lines 7-9 and 11-14 both target the same selector. These should be merged into a single block:
.help-dropdown-menu :global {
@include modifier-keys.modifier-key;
--bs-dropdown-font-size: 14px;
min-width: 240px;
}| } | |
| .help-dropdown-menu :global { |
| <DropdownItem | ||
| tag="a" | ||
| href="https://docs.growi.org" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="my-1" | ||
| data-testid="growi-docs-link" | ||
| > | ||
| <span className="d-flex align-items-center"> | ||
| GROWI Docs | ||
| <span className="material-symbols-outlined ms-1 fs-6">open_in_new</span> | ||
| </span> | ||
| </DropdownItem> | ||
|
|
||
| <DropdownItem | ||
| tag="a" | ||
| href="https://growi.cloud/help/" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="my-1" | ||
| data-testid="growi-cloud-help-link" | ||
| > | ||
| <span className="d-flex align-items-center"> | ||
| {t('help_dropdown.growi_cloud_help')} | ||
| <span className="material-symbols-outlined ms-1 fs-6">open_in_new</span> | ||
| </span> | ||
| </DropdownItem> |
Copilot
AI
Dec 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The HelpDropdown component shows both GROWI Docs and GROWI.cloud Help links unconditionally, but the original behavior (see SecondaryItems.tsx line 56 in the diff) was to show different help URLs based on whether growiCloudUri exists.
The component should conditionally render help links:
- If
growiCloudUriexists: show GROWI.cloud Help - Otherwise: show GROWI Docs
Consider using the existing useGrowiDocumentationUrl() hook from ~/states/context which already handles this logic, or implement similar conditional logic using useGrowiCloudUri().
| data-testid="help-dropdown-button" | ||
| > | ||
| <span className="material-symbols-outlined">help</span> | ||
| </DropdownToggle> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
テーマ統一のため、SecondaryItem を利用すべきだと思う
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Claude に聞いた所 SecondaryItem はリンクベースでhrefを受け取るのでドロップダウンには使えないと言われました
onClick や Children で無理やりやってみましたがposition-absolute でアイコンを重ねる形になってしまうためホバー時のスタイルがばらついてしまいました
Task
https://redmine.weseek.co.jp/issues/173835
Summary