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

[TASK][Security Serverless]: Add semantic headings to Get Started page #181494

Merged
merged 7 commits into from
Apr 29, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { EuiFlexGroup, EuiFlexItem, EuiLink, EuiSpacer } from '@elastic/eui';
import { EuiFlexGroup, EuiFlexItem, EuiLink, EuiSpacer, EuiTitle } from '@elastic/eui';
import React, { useMemo } from 'react';

import { useFooterStyles } from '../styles/footer.styles';
Expand All @@ -25,7 +25,9 @@ const FooterComponent = () => {
<EuiFlexItem key={`footer-${item.key}`}>
<img src={item.icon} alt={item.title} height="64" width="64" />
<EuiSpacer size="m" />
<p className={titleStyle}>{item.title}</p>
<EuiTitle>
<h3 className={titleStyle}>{item.title}</h3>
</EuiTitle>
<p className={descriptionStyle}>{item.description}</p>
<EuiSpacer size="m" />
<EuiLink href={item.link.href} external={true} target="_blank" className={linkStyle}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ export const useSetUpSections = ({ euiTheme }: { euiTheme: EuiThemeComputed }) =
id={currentSection.id}
data-test-subj={`section-${currentSection.id}`}
>
<span
<h2
css={css`
font-size: ${euiTheme.base * 1.375}px;
font-weight: ${euiTheme.font.weight.bold};
`}
>
{currentSection.title}
</span>
</h2>
<EuiSpacer size="l" />
<EuiFlexGroup
gutterSize="none"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import React, { useCallback, type SVGProps } from 'react';
import { i18n } from '@kbn/i18n';
import { LinkButton } from '@kbn/security-solution-navigation/links';
import type { IconType } from '@elastic/eui';
import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiPanel, EuiText } from '@elastic/eui';
import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiPanel, EuiText, EuiTitle } from '@elastic/eui';
import { AddIntegrationsSteps } from '../types';
import { useStepContext } from '../context/step_context';
import { IntegrationsPageName } from './types';
Expand Down Expand Up @@ -135,7 +135,9 @@ const AddIntegrationPanel: React.FC<{
<EuiIcon type={icon} size="xl" />
</EuiFlexItem>
<EuiFlexItem>
<h4>{title}</h4>
<EuiTitle size="xs">
<h3>{title}</h3>
</EuiTitle>
<EuiText color="subdued" size="xs">
{description}
</EuiText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { useEuiShadow, useEuiTheme } from '@elastic/eui';
import { useEuiShadow, useEuiTheme, useEuiFontSize } from '@elastic/eui';
import { css } from '@emotion/css';
import { useMemo } from 'react';

Expand All @@ -16,6 +16,7 @@ export const RIGHT_CONTENT_WIDTH = 513;
export const useStepContentStyles = () => {
const { euiTheme } = useEuiTheme();
const imageShadow = useEuiShadow('s');
const descriptionHeader = useEuiFontSize('s');

const customStyles = useMemo(
() => ({
Expand Down Expand Up @@ -45,6 +46,11 @@ export const useStepContentStyles = () => {
'.step-paragraph': {
marginTop: euiTheme.size.xl,
},

'.euiTitle': {
fontSize: `${descriptionHeader.fontSize}`,
lineHeight: `${descriptionHeader.lineHeight}`,
},
},
}),
rightPanelStyles: css({
Expand Down Expand Up @@ -77,6 +83,8 @@ export const useStepContentStyles = () => {
euiTheme.size.s,
euiTheme.size.xl,
imageShadow,
descriptionHeader.fontSize,
descriptionHeader.lineHeight,
]
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const WelcomeHeaderComponent: React.FC<{ productTier?: ProductTier }> = ({ produ
</EuiTitle>
)}
<EuiSpacer size="s" />
<span className={headerSubtitleClassNames}>{GET_STARTED_PAGE_SUBTITLE}</span>
<h1 className={headerSubtitleClassNames}>{GET_STARTED_PAGE_SUBTITLE}</h1>
<EuiSpacer size="s" />
<span className={headerDescriptionClassNames}>{GET_STARTED_PAGE_DESCRIPTION}</span>
<CurrentPlan productTier={productTier} projectFeaturesUrl={projectFeaturesUrl} />
Expand Down