Skip to content

Commit

Permalink
Fix authoring header (#886)
Browse files Browse the repository at this point in the history
  • Loading branch information
thecalcc authored Oct 30, 2024
1 parent 12acd35 commit de6fb3d
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 35 deletions.
6 changes: 1 addition & 5 deletions app-typescript/components/Layouts/AuthoringInnerHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {Icon} from '../Icon';
interface IProps {
children?: React.ReactNode;
collapsed?: boolean;
headerStyles?: string;
}
interface IState {
collapsed: boolean;
Expand All @@ -23,10 +22,7 @@ export class AuthoringInnerHeader extends React.PureComponent<IProps, IState> {
render() {
const classes = classNames(
'sd-editor-content__authoring-header',
{
'authoring-header--collapsed': this.state.collapsed,
[`${this.props.headerStyles}`]: this.props.headerStyles,
},
{'authoring-header--collapsed': this.state.collapsed},
);

return (
Expand Down
6 changes: 1 addition & 5 deletions app-typescript/components/Layouts/AuthoringMain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ interface IProps {
toolBar?: React.ReactNode;
authoringMain?: React.ReactNode;
authoringHeader?: React.ReactNode;
headerStyles?: string;
authoringBookmarks?: React.ReactNode;
headerCollapsed?: boolean;
toolbarCustom?: boolean;
Expand All @@ -32,10 +31,7 @@ export class AuthoringMain extends React.PureComponent<IProps> {
)}
<AuthoringMainContent>
{this.props.authoringHeader && (
<AuthoringInnerHeader
headerStyles={this.props.headerStyles}
collapsed={this.props.headerCollapsed}
>
<AuthoringInnerHeader collapsed={this.props.headerCollapsed}>
{this.props.authoringHeader}
</AuthoringInnerHeader>
)}
Expand Down
19 changes: 0 additions & 19 deletions app/styles/layout/_editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -247,25 +247,6 @@
overflow: hidden;
transition: opacity 0.4s 0.1s;
}

&.authoring-header--padding-small,
&.authoring-header--padding-medium,
&.authoring-header--padding-large {
padding-block-start: 0 !important;
padding-block-end: 0 !important;
}
}

&.authoring-header--padding-small {
padding: $sd-base-increment * 3 $sd-base-increment * 1.5;
}

&.authoring-header--padding-medium {
padding: $sd-base-increment * 3 $sd-base-increment * 3;
}

&.authoring-header--padding-large {
padding: $sd-base-increment * 3 $sd-base-increment * 4;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ export class EditorTest extends React.Component<IProps, IState> {
)}
main={(
<Layout.AuthoringMain
headerStyles='authoring-header--padding-medium'
toolBar={(
<React.Fragment>
<div className="sd-editor-toolbar__content">
Expand Down
1 change: 0 additions & 1 deletion examples/pages/playgrounds/react-playgrounds/Multiedit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ export class Editor extends React.Component<{}, IEditor> {
)}
main={(
<Layout.AuthoringMain
headerStyles='authoring-header--padding-medium'
toolBar={(
<React.Fragment>
<div className="sd-editor-toolbar__content">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ export class RundownEditor extends React.Component<IProps, IState> {

<Layout.MainPanel padding='none'>
<Layout.AuthoringMain
headerStyles='authoring-header--padding-medium'
toolBar={(
<React.Fragment>
<div className="sd-editor-toolbar__content">
Expand Down Expand Up @@ -341,7 +340,6 @@ export class RundownEditor extends React.Component<IProps, IState> {
<Layout.AuthoringFrame
main={
<Layout.AuthoringMain
headerStyles='authoring-header--padding-medium'
toolbarCustom={true}
headerCollapsed={true}
toolBar={(
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "superdesk-ui-framework",
"version": "3.1.25",
"version": "3.1.26",
"license": "AGPL-3.0",
"repository": {
"type": "git",
Expand Down

0 comments on commit de6fb3d

Please sign in to comment.