[MM-61626] Replace most uses of <header> with <div> where not needed (#31371)
Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b784074212
Коммит
3d2aa70b7b
@@ -31,7 +31,7 @@ const FormFieldLabel = styled.label`
|
|||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const SectionHeader = styled.header.attrs({className: 'header'})<{$borderless?: boolean}>`
|
export const SectionHeader = styled.div.attrs({className: 'header'})<{$borderless?: boolean}>`
|
||||||
&&& {
|
&&& {
|
||||||
padding: 24px 32px;
|
padding: 24px 32px;
|
||||||
${({$borderless}) => !$borderless && css`
|
${({$borderless}) => !$borderless && css`
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export const SectionHeading = styled.h3`
|
|||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const SectionHeader = styled.header.attrs({className: 'header'})<{$borderless?: boolean}>`
|
export const SectionHeader = styled.div.attrs({className: 'header'})<{$borderless?: boolean}>`
|
||||||
&&& {
|
&&& {
|
||||||
padding: 24px 32px;
|
padding: 24px 32px;
|
||||||
${({$borderless}) => !$borderless && css`
|
${({$borderless}) => !$borderless && css`
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ Object {
|
|||||||
class="modal-title"
|
class="modal-title"
|
||||||
id="genericModalLabel"
|
id="genericModalLabel"
|
||||||
>
|
>
|
||||||
<header
|
<div
|
||||||
class="mm-modal-header"
|
class="mm-modal-header"
|
||||||
>
|
>
|
||||||
<h2
|
<h2
|
||||||
@@ -69,7 +69,7 @@ Object {
|
|||||||
channel_display_name
|
channel_display_name
|
||||||
</span>
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</div>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -534,7 +534,7 @@ Object {
|
|||||||
class="modal-title"
|
class="modal-title"
|
||||||
id="genericModalLabel"
|
id="genericModalLabel"
|
||||||
>
|
>
|
||||||
<header
|
<div
|
||||||
class="mm-modal-header"
|
class="mm-modal-header"
|
||||||
>
|
>
|
||||||
<h2
|
<h2
|
||||||
@@ -553,7 +553,7 @@ Object {
|
|||||||
channel_display_name
|
channel_display_name
|
||||||
</span>
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</div>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1178,7 +1178,7 @@ Object {
|
|||||||
class="modal-title"
|
class="modal-title"
|
||||||
id="genericModalLabel"
|
id="genericModalLabel"
|
||||||
>
|
>
|
||||||
<header
|
<div
|
||||||
class="mm-modal-header"
|
class="mm-modal-header"
|
||||||
>
|
>
|
||||||
<h2
|
<h2
|
||||||
@@ -1197,7 +1197,7 @@ Object {
|
|||||||
channel_display_name
|
channel_display_name
|
||||||
</span>
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</div>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1541,7 +1541,7 @@ Object {
|
|||||||
class="modal-title"
|
class="modal-title"
|
||||||
id="genericModalLabel"
|
id="genericModalLabel"
|
||||||
>
|
>
|
||||||
<header
|
<div
|
||||||
class="mm-modal-header"
|
class="mm-modal-header"
|
||||||
>
|
>
|
||||||
<h2
|
<h2
|
||||||
@@ -1560,7 +1560,7 @@ Object {
|
|||||||
channel_display_name
|
channel_display_name
|
||||||
</span>
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</div>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2123,7 +2123,7 @@ Object {
|
|||||||
class="modal-title"
|
class="modal-title"
|
||||||
id="genericModalLabel"
|
id="genericModalLabel"
|
||||||
>
|
>
|
||||||
<header
|
<div
|
||||||
class="mm-modal-header"
|
class="mm-modal-header"
|
||||||
>
|
>
|
||||||
<h2
|
<h2
|
||||||
@@ -2142,7 +2142,7 @@ Object {
|
|||||||
channel_display_name
|
channel_display_name
|
||||||
</span>
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</div>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2705,7 +2705,7 @@ Object {
|
|||||||
class="modal-title"
|
class="modal-title"
|
||||||
id="genericModalLabel"
|
id="genericModalLabel"
|
||||||
>
|
>
|
||||||
<header
|
<div
|
||||||
class="mm-modal-header"
|
class="mm-modal-header"
|
||||||
>
|
>
|
||||||
<h2
|
<h2
|
||||||
@@ -2724,7 +2724,7 @@ Object {
|
|||||||
channel_display_name
|
channel_display_name
|
||||||
</span>
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</div>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`components/drafts/panel/panel_header should match snapshot 1`] = `
|
exports[`components/drafts/panel/panel_header should match snapshot 1`] = `
|
||||||
<header
|
<div
|
||||||
className="PanelHeader"
|
className="PanelHeader"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -52,11 +52,11 @@ exports[`components/drafts/panel/panel_header should match snapshot 1`] = `
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`components/drafts/panel/panel_header should show sync icon when draft is from server 1`] = `
|
exports[`components/drafts/panel/panel_header should show sync icon when draft is from server 1`] = `
|
||||||
<header
|
<div
|
||||||
className="PanelHeader"
|
className="PanelHeader"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -123,5 +123,5 @@ exports[`components/drafts/panel/panel_header should show sync icon when draft i
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ function PanelHeader({
|
|||||||
const timestampDateObject = useMemo(() => new Date(timestamp), [timestamp]);
|
const timestampDateObject = useMemo(() => new Date(timestamp), [timestamp]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<header className='PanelHeader'>
|
<div className='PanelHeader'>
|
||||||
<div className='PanelHeader__left'>{title}</div>
|
<div className='PanelHeader__left'>{title}</div>
|
||||||
<div className='PanelHeader__right'>
|
<div className='PanelHeader__right'>
|
||||||
<div className='PanelHeader__actions'>
|
<div className='PanelHeader__actions'>
|
||||||
@@ -118,7 +118,7 @@ function PanelHeader({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ const SidebarHeader = (props: Props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<header className='sidebarHeaderContainer'>
|
<div className='sidebarHeaderContainer'>
|
||||||
<SidebarTeamMenu currentTeam={currentTeam}/>
|
<SidebarTeamMenu currentTeam={currentTeam}/>
|
||||||
{(props.canCreateChannel || props.canJoinPublicChannel) && (
|
{(props.canCreateChannel || props.canJoinPublicChannel) && (
|
||||||
<SidebarBrowseOrAddChannelMenu
|
<SidebarBrowseOrAddChannelMenu
|
||||||
@@ -48,7 +48,7 @@ const SidebarHeader = (props: Props) => {
|
|||||||
onInvitePeopleClick={props.invitePeopleModal}
|
onInvitePeopleClick={props.invitePeopleModal}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</header>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,9 @@ exports[`components/threading/global_threads/thread_item should report total num
|
|||||||
role="link"
|
role="link"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
>
|
>
|
||||||
<header>
|
<div
|
||||||
|
className="thread-item-header"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
className="ThreadItem__author"
|
className="ThreadItem__author"
|
||||||
>
|
>
|
||||||
@@ -40,7 +42,7 @@ exports[`components/threading/global_threads/thread_item should report total num
|
|||||||
}
|
}
|
||||||
useTime={false}
|
useTime={false}
|
||||||
/>
|
/>
|
||||||
</header>
|
</div>
|
||||||
<div
|
<div
|
||||||
className="menu-anchor alt-visible"
|
className="menu-anchor alt-visible"
|
||||||
>
|
>
|
||||||
@@ -155,7 +157,9 @@ exports[`components/threading/global_threads/thread_item should report unread me
|
|||||||
role="link"
|
role="link"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
>
|
>
|
||||||
<header>
|
<div
|
||||||
|
className="thread-item-header"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
className="indicator"
|
className="indicator"
|
||||||
>
|
>
|
||||||
@@ -192,7 +196,7 @@ exports[`components/threading/global_threads/thread_item should report unread me
|
|||||||
}
|
}
|
||||||
useTime={false}
|
useTime={false}
|
||||||
/>
|
/>
|
||||||
</header>
|
</div>
|
||||||
<div
|
<div
|
||||||
className="menu-anchor alt-visible"
|
className="menu-anchor alt-visible"
|
||||||
>
|
>
|
||||||
@@ -307,7 +311,9 @@ exports[`components/threading/global_threads/thread_item should report unread me
|
|||||||
role="link"
|
role="link"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
>
|
>
|
||||||
<header>
|
<div
|
||||||
|
className="thread-item-header"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
className="indicator"
|
className="indicator"
|
||||||
>
|
>
|
||||||
@@ -342,7 +348,7 @@ exports[`components/threading/global_threads/thread_item should report unread me
|
|||||||
}
|
}
|
||||||
useTime={false}
|
useTime={false}
|
||||||
/>
|
/>
|
||||||
</header>
|
</div>
|
||||||
<div
|
<div
|
||||||
className="menu-anchor alt-visible"
|
className="menu-anchor alt-visible"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ function ThreadItem({
|
|||||||
onKeyDown={selectHandler}
|
onKeyDown={selectHandler}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
>
|
>
|
||||||
<header>
|
<div className='thread-item-header'>
|
||||||
{Boolean(newMentions || newReplies) && (
|
{Boolean(newMentions || newReplies) && (
|
||||||
<div className='indicator'>
|
<div className='indicator'>
|
||||||
{newMentions ? (
|
{newMentions ? (
|
||||||
@@ -249,7 +249,7 @@ function ThreadItem({
|
|||||||
className='alt-hidden'
|
className='alt-hidden'
|
||||||
value={lastReplyAt}
|
value={lastReplyAt}
|
||||||
/>
|
/>
|
||||||
</header>
|
</div>
|
||||||
<div className='menu-anchor alt-visible'>
|
<div className='menu-anchor alt-visible'>
|
||||||
<ThreadMenu
|
<ThreadMenu
|
||||||
threadId={threadId}
|
threadId={threadId}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`components/widgets/header should match basic snapshot 1`] = `
|
exports[`components/widgets/header should match basic snapshot 1`] = `
|
||||||
<header
|
<div
|
||||||
className="Header"
|
className="Header"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -20,5 +20,5 @@ exports[`components/widgets/header should match basic snapshot 1`] = `
|
|||||||
<div>
|
<div>
|
||||||
addons
|
addons
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ const Header = ({
|
|||||||
}: Props & HTMLAttributes<HTMLElement>) => {
|
}: Props & HTMLAttributes<HTMLElement>) => {
|
||||||
const H = Headings[level];
|
const H = Headings[level];
|
||||||
return (
|
return (
|
||||||
<header
|
<div
|
||||||
{...attrs}
|
{...attrs}
|
||||||
className={classNames('Header', attrs.className)}
|
className={classNames('Header', attrs.className)}
|
||||||
>
|
>
|
||||||
@@ -37,7 +37,7 @@ const Header = ({
|
|||||||
</div>
|
</div>
|
||||||
<div className='spacer'/>
|
<div className='spacer'/>
|
||||||
{right}
|
{right}
|
||||||
</header>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ type Props = {
|
|||||||
function ModalHeader({id, title, subtitle, handleClose}: Props) {
|
function ModalHeader({id, title, subtitle, handleClose}: Props) {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
return (
|
return (
|
||||||
<header className='mm-modal-header'>
|
<div className='mm-modal-header'>
|
||||||
<h2
|
<h2
|
||||||
id={`mm-modal-header-${id}`}
|
id={`mm-modal-header-${id}`}
|
||||||
className='mm-modal-header__title'
|
className='mm-modal-header__title'
|
||||||
@@ -33,7 +33,7 @@ function ModalHeader({id, title, subtitle, handleClose}: Props) {
|
|||||||
</button>
|
</button>
|
||||||
</div>}
|
</div>}
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export default ModalHeader;
|
export default ModalHeader;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user