Skip to content
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

support: Display brand logo when editor mode #9632

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

satof3
Copy link
Contributor

@satof3 satof3 commented Feb 7, 2025

#9596 のFBを受けてブランチを切り直してやり直し

Task

https://redmine.weseek.co.jp/issues/160589

Summary

  • エディタモード時に左上にブランドロゴを表示
  • 出し分け制御を Sidebar.tsx と AppTitle.tsx に集約
  • AppTitle の条件を変えたことにより、モバイル表示で apptitle が出てこない問題も解決した

Screenshot

image image image

@satof3 satof3 requested a review from yuki-takei February 7, 2025 10:46
@satof3 satof3 self-assigned this Feb 7, 2025
Copy link

changeset-bot bot commented Feb 7, 2025

⚠️ No Changeset found

Latest commit: a3e00e9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR


const isEditorMode = editorMode === EditorMode.Editor;
const shouldHideTitle = isEditorMode && isMdSize && (isDrawerMode() || isCollapsedMode());
const shouldShowEditorHead = isEditorMode && isXlSize;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldShowEditorSidebarHead にしよう

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

このコンポーネントは冗長なので、AppTitle.tsx に AppTitleOnSidebarHead のエディターバージョンを作る
その際、新規コンポーネント追加でもいいし、props にしてもよい

{appTitle}
</Link>
</div>
)}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

このコンポーネントは小さいので、appTitle を出すか出さないかを自律的に判断しない方がよい
props に hideAppTitle?: boolean のようなものを用意し、true が入っていたら隠すようにする

}
}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppTitle.module.scss に入れるべき

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants