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

[FC-0036] refactor: Further refinements to tag drawer #970

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/content-tags-drawer/ContentTagsCollapsible.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ const ContentTagsCollapsible = ({
<Collapsible.Visible whenOpen>
<Icon src={KeyboardArrowUp} />
</Collapsible.Visible>
<h4 className="flex-grow-1 pl-2">{name}</h4>
<h3 className="h5 flex-grow-1 pl-2">{name}</h3>
</Collapsible.Trigger>

<Collapsible.Body className="collapsible-body">
Expand Down
38 changes: 20 additions & 18 deletions src/content-tags-drawer/ContentTagsDrawer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ const ContentTagsDrawer = ({ id, onClose }) => {

return (
<ContentTagsDrawerContext.Provider value={context}>
<div id="content-tags-drawer" className="mt-1 tags-drawer d-flex flex-column justify-content-between min-vh-100">
<div id="content-tags-drawer" className="mt-1 tags-drawer d-flex flex-column justify-content-between min-vh-100 pt-3">
<Container size="xl">
{ isContentDataLoaded
? <h2>{ contentName }</h2>
? <h2 className="h3 pl-2.5">{ contentName }</h2>
: (
<div className="d-flex justify-content-center align-items-center flex-column">
<Spinner
Expand All @@ -103,23 +103,25 @@ const ContentTagsDrawer = ({ id, onClose }) => {
/>
</div>
)}

<hr />
<p className="lead text-gray-500 font-weight-bold">{intl.formatMessage(messages.headerSubtitle)}</p>

{ isTaxonomyListLoaded && isContentTaxonomyTagsLoaded
? tagsByTaxonomy.map((data) => (
<div key={`taxonomy-tags-collapsible-${data.id}`}>
<ContentTagsCollapsible
contentId={contentId}
taxonomyAndTagsData={data}
stagedContentTags={stagedContentTags[data.id] || []}
collapsibleState={collapsibleStates[data.id] || false}
/>
<hr />
</div>
))
: <Loading />}
<Container>
<p className="h4 text-gray-500 font-weight-bold">
{intl.formatMessage(messages.headerSubtitle)}
</p>
{ isTaxonomyListLoaded && isContentTaxonomyTagsLoaded
? tagsByTaxonomy.map((data) => (
<div key={`taxonomy-tags-collapsible-${data.id}`}>
<ContentTagsCollapsible
contentId={contentId}
taxonomyAndTagsData={data}
stagedContentTags={stagedContentTags[data.id] || []}
collapsibleState={collapsibleStates[data.id] || false}
/>
<hr />
</div>
))
: <Loading />}
</Container>
</Container>

{ isTaxonomyListLoaded && isContentTaxonomyTagsLoaded && (
Expand Down
Loading