-
Notifications
You must be signed in to change notification settings - Fork 28
PORTALS-3651: Portals FileEntity Page: Header card #2024
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: main
Are you sure you want to change the base?
Conversation
apps/synapse-portal-framework/src/pages/FileEntityPage/FileEntityPageHeader.tsx
Outdated
Show resolved
Hide resolved
packages/synapse-react-client/src/components/CitationPopover/CitationPopover.tsx
Outdated
Show resolved
Hide resolved
apps/synapse-portal-framework/src/pages/FileEntityPage/FileEntityPage.tsx
Outdated
Show resolved
Hide resolved
<DetailsPageLayout> | ||
<DetailsPageMenu menuSections={fileEntityPageSections} /> |
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.
Taking a look at these again since your last refactor, and I think it might be slightly cleaner to use the DetailsPageContent
component and pass it a list of sections. It will render the menu and section headers for you, and ensure the style is more consistent with existing details pages.
Or will we need more customization than that component provides?
@@ -24,6 +24,10 @@ const DetailsPageMenu = ({ | |||
} | |||
} | |||
|
|||
const filteredMenuSections = menuSections.filter( |
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.
I need a component in here alongside the other sections without it actually showing up as an option in the menu (SynapseFileEntityLinkCard)
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.
Do all of our existing details page sections have a truthy id and title? If so, then this works
@@ -24,6 +24,10 @@ const DetailsPageMenu = ({ | |||
} | |||
} | |||
|
|||
const filteredMenuSections = menuSections.filter( |
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.
Do all of our existing details page sections have a truthy id and title? If so, then this works
import DetailsPageLayout from '@/components/DetailsPageLayout' | ||
import HeaderCard from 'synapse-react-client/components/HeaderCard' | ||
import CitationPopover from 'synapse-react-client/components/CitationPopover' | ||
import { DetailsPageContent } from '../../components/DetailsPage/DetailsPageContentLayout' | ||
import SynapseFileEntityLinkCard from './SynapseFileEntityLinkCard' | ||
|
||
function FileEntityPage() { |
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.
If we need to change the styles (but not the layout/DOM) of the header card, e.g. to give the title a different font size, we could apply styles to this component that target those elements.
…er from fileentitypage via sx prop
Jira: https://sagebionetworks.jira.com/browse/PORTALS-3651