feat(startup): add startup side menu component#596
feat(startup): add startup side menu component#596kyasbal wants to merge 2 commits intoGoogleCloudPlatform:mainfrom
Conversation
e2fa9c4 to
83f9d0a
Compare
There was a problem hiding this comment.
Code Review
This pull request replaces the angular-split layout with golden-layout in the main view and introduces a new StartupSideMenuComponent. It also updates project rules and documentation. Feedback focuses on addressing missing icon dependencies, correcting GoldenLayout API usage, preventing memory leaks in the layout service, and improving code consistency through better naming and theme integration.
I am having trouble creating individual review comments. Click here to see my feedback.
web/src/golden-layout-khi-theme.scss (198)
The theme references "Material Symbols Outlined", but this font is not listed in package.json. Without the font being imported, the icons in the GoldenLayout headers (maximize, close, etc.) will not render correctly. Consider adding @fontsource/material-symbols-outlined to your dependencies.
web/src/app/services/layout/layout.service.ts (57)
In GoldenLayout v2, the size property expects a number representing the relative weight of the item. Providing a percentage string like '70%' is not supported by the API and may lead to unexpected layout behavior. Use numeric values instead.
size: 70,
web/src/app/services/layout/layout.service.ts (78-80)
The init method re-initializes goldenLayout and resizeObserver without checking if they already exist. If init is called multiple times on the same service instance, it will lead to memory leaks and multiple active layout instances. Consider cleaning up existing resources before re-initializing.
web/src/app/services/layout/layout.service.ts (139)
Use textContent instead of innerText for better performance and to avoid unnecessary reflows, as the icon name is a simple string.
iconSpan.textContent = iconName;
web/src/app/dialogs/startup/components/startup-side-menu.component.scss (18-25)
These hardcoded color variables should ideally be derived from the Angular Material theme palette for consistency across the application. Using mat.m2-get-color-from-palette ensures that the component respects the global theme settings.
web/src/app/pages/main/main.component.ts (75)
The class name AppComponent is inconsistent with the file name main.component.ts. Following Angular naming conventions, it should be renamed to MainComponent to match its location and purpose within the pages/main directory.
- Removed `KHIIconRegistrationModule` and `...environment.pluginModules` from `imports` in `web/src/app/root.component.ts`. - Removed imports of `KHIIconRegistrationModule` and `environment` from `web/src/app/root.component.ts`. - Created `web/src/main.spec.ts` with a test for `appConfig` initialization. - In `web/src/main.ts`, moved the configuration object from `bootstrapApplication` to a new exported `appConfig` constant. - Added `importProvidersFrom(KHIIconRegistrationModule)` and `importProvidersFrom(...environment.pluginModules)` to `appConfig.providers` in `web/src/main.ts`.
サイドメニュー(ロゴ、タイトル、イタリック体のキャッチフレーズ、ボタン類)の完成形。
83f9d0a to
88dd2ec
Compare
Motivation
To separate the startup dialog UI into logical components for better maintainability and adherence to the Smart-Dumb component pattern. This is the first step of splitting a large startup dialog migration commit.
Changes
StartupSideMenuComponentcontaining the logo, title, italicized catchphrase, and action buttons.動機
メンテナンス性を向上させ、Smart-Dumbコンポーネントパターンに準拠するために、スタートアップダイアログのUIを論理的なコンポーネントに分離します。これは、巨大なスタートアップダイアログ移行コミットを分割する最初のステップです。
変更内容
StartupSideMenuComponentを追加しました。