Open aster-hu opened 1 year ago
I think for viewing you should resolve to use custom.scss
instead.
You can update how components view based on @media
query.
I will close this since this is not really a bug, rather a usage.
@aarnphm this is an actual bug as we kinda do assume that components are singletons and maybe we should revisit that assumption?
Hmm, FWIW, assuming singleton should be ok here, since multiple searches don't make sense.
What do you have in mind?
I think specifically on getting search in various places depending on layout is a common usecase, not sure what the best way to solve this is though lol
Hmm you are right, I'm doing this for Explorer
// components for pages that display lists of pages (e.g. tags or folders)
export const defaultListPageLayout: PageLayout = {
beforeBody: [Component.ArticleTitle()],
left: [
Component.MobileOnly(Component.Explorer()),
Component.MobileOnly(Component.Spacer()),
Component.Search(),
Component.Darkmode(),
Component.DesktopOnly(Component.Explorer({ filterFn: explorerFilterFn })),
],
right: [],
}
Does any workaround exist for this? I'm having the same issue for other components where I want to display them differently based on "Desktop" or "Mobile" user.
Describe the bug When
Component.Search()
exists in bothleft
andright
sidebar inquartz.layout.ts
, the search bar on the right side didn't work.To Reproduce Steps to reproduce the behavior:
Expected behavior The search bar should work even when it shows on both sidebar.
Usually it's no big deal because only one is needed in most case, but I was trying to achieve different layout for mobile and desktop like below, which triggers the issue.
Desktop (please complete the following information):