-
Notifications
You must be signed in to change notification settings - Fork 22
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
#9222 Add policy for hiding the sidebar logo #9224
Changes from 6 commits
0ee3c37
2bcc02e
5d60f92
d3db8e9
7b1e90e
319fdb6
afa7f80
58f65a8
3924d4d
ebba63f
4cba229
cb2355f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,17 +53,16 @@ const Header: React.FunctionComponent = () => { | |
|
||
return ( | ||
<div className="d-flex py-2 pl-2 pr-0 align-items-center"> | ||
{showSidebarLogo && ( | ||
// `mx-auto` centers the logo | ||
<div className="mx-auto"> | ||
<div className="mx-auto"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Always include a placeholder for the image so that it still fills the space when hidden; before the extension buttons (e.g. the cog button) were left-aligned instead of staying in place |
||
{showSidebarLogo && ( | ||
<img | ||
src={customSidebarLogo ?? logo.regular} | ||
alt={customSidebarLogo ? "Custom logo" : "PixieBrix logo"} | ||
className={styles.logo} | ||
data-testid="sidebarHeaderLogo" | ||
/> | ||
</div> | ||
)} | ||
)} | ||
</div> | ||
{showDeveloperUI && ( | ||
<Button | ||
type="button" | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -73,4 +73,9 @@ export type ManagedStorageState = { | |||||
* @since 1.7.36 | ||||||
*/ | ||||||
disableBrowserWarning?: boolean; | ||||||
/** | ||||||
* Hides the logo in the PixieBrix sidebar, overriding the team theme. | ||||||
* @since 2.1.4 | ||||||
mnholtz marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
*/ | ||||||
hideSidebarLogo?: boolean; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be:
Suggested change
Since the schema says it defaults to false? Or does that default not actually do anything? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a great question. Upon manual inspection the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
That's correct - the default does not flow through to Chrome. In general,
|
||||||
}; |
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.
NIT: instead of using useAsyncState with readManagedStorageByKey, we might consider using useManagedStorageState (and standardizing that hook return value use theAsyncState shape)
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.
TIL we have a useManagedStorageState hook. Since we're releasing tomorrow, let's merge this as-is.
@mnholtz before you move on to something else, can you open up a follow-up PR to leverage useManageStorageState, including the enhancement to return AsyncState?
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.
Ticket here: #9227