Skip to content

Commit

Permalink
Normalize interlink URL usage (#698)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrey Myssak <andreymyssak@gmail.com>
Signed-off-by: Sergey Myssak <sergey.myssak@gmail.com>
  • Loading branch information
SergeyMyssak and andreymyssak committed Jun 15, 2023
1 parent 27a5a29 commit c0fa659
Show file tree
Hide file tree
Showing 37 changed files with 152 additions and 79 deletions.
4 changes: 3 additions & 1 deletion src-docs/src/views/badge/badge_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ const badgeHealthSnippet = [
import BadgeHref from './badge_href';
const badgeHrefSource = require('!!raw-loader!./badge_href');
const badgeHrefHtml = renderToHtml(BadgeHref);
const badgeHrefSnippet = ['<OuiBadge href="#" />'];
const badgeHrefSnippet = [
'<OuiBadge href="https://oui.opensearch.org/latest/" />',
];

import BadgeTruncate from './badge_truncate';
const badgeTruncateSource = require('!!raw-loader!./badge_truncate');
Expand Down
5 changes: 4 additions & 1 deletion src-docs/src/views/call_out/danger.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ export default () => (
<OuiCallOut title="There was an error" color="danger" iconType="alert">
<p>
Now you have to fix it, but maybe{' '}
<OuiLink href="#">this link can help</OuiLink>.
<OuiLink href="https://opensearch.org/docs/latest/">
this link can help
</OuiLink>
.
</p>
</OuiCallOut>
);
2 changes: 1 addition & 1 deletion src-docs/src/views/call_out/warning.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default () => (
</OuiLink>
.
</p>
<OuiButton href="#" color="warning">
<OuiButton href="https://opensearch.org/docs/latest/" color="warning">
Link button
</OuiButton>
</OuiCallOut>
Expand Down
9 changes: 6 additions & 3 deletions src-docs/src/views/card/card_footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export default () => (
<OuiSpacer size="xs" />
<OuiText size="s">
<p>
Choice <OuiLink href="https://opensearch.org">Two</OuiLink>
Choice{' '}
<OuiLink href="https://oui.opensearch.org/latest/">Two</OuiLink>
</p>
</OuiText>
</div>
Expand All @@ -55,7 +56,8 @@ export default () => (
<OuiSpacer size="xs" />
<OuiText size="s">
<p>
Choice <OuiLink href="https://opensearch.org">Two</OuiLink>
Choice{' '}
<OuiLink href="https://oui.opensearch.org/latest/">Two</OuiLink>
</p>
</OuiText>
</div>
Expand All @@ -73,7 +75,8 @@ export default () => (
<OuiSpacer size="xs" />
<OuiText size="s">
<p>
Choice <OuiLink href="https://opensearch.org">Two</OuiLink>
Choice{' '}
<OuiLink href="https://oui.opensearch.org/latest/">Two</OuiLink>
</p>
</OuiText>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/card/card_image.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default () => (
<OuiFlexItem>
<OuiCard
textAlign="left"
href="https://oui.opensearch.org/"
href="https://oui.opensearch.org/latest/"
image="https://source.unsplash.com/400x200/?City"
icon={<OuiIcon size="xxl" type="logoBeats" />}
title={'Title'}
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/card/card_layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default () => (
title={'No icon example'}
description="Example of a card's description. Stick to one or two sentences."
onClick={() => {}}
href="#"
href="https://oui.opensearch.org/latest/"
/>
</OuiFlexItem>
</OuiFlexGroup>
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/datagrid/additional_controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ for (let i = 1; i < 20; i++) {
),
email: faker.helpers.fake('{{internet.email}}'),
city: (
<OuiLink href="http://google.com">
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{location.city}}')}
</OuiLink>
),
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/datagrid/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ for (let i = 1; i < 20; i++) {
),
email: faker.helpers.fake('{{internet.email}}'),
city: (
<OuiLink href="http://google.com">
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{location.city}}')}
</OuiLink>
),
Expand Down
6 changes: 4 additions & 2 deletions src-docs/src/views/datagrid/datagrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,16 @@ for (let i = 1; i < 100; i++) {
},
email: {
formatted: (
<OuiLink href="">{faker.helpers.fake('{{internet.email}}')}</OuiLink>
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{internet.email}}')}
</OuiLink>
),
raw: email,
},
location: (
<Fragment>
{`${faker.helpers.fake('{{location.city}}')}, `}
<OuiLink href="https://google.com">
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{location.country}}')}
</OuiLink>
</Fragment>
Expand Down
6 changes: 4 additions & 2 deletions src-docs/src/views/datagrid/in_memory.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ for (let i = 1; i < 100; i++) {
'{{person.lastName}}, {{person.firstName}} {{person.suffix}}'
),
email: (
<OuiLink href="">{faker.helpers.fake('{{internet.email}}')}</OuiLink>
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{internet.email}}')}
</OuiLink>
),
location: (
<Fragment>
{`${faker.helpers.fake('{{location.city}}')}, `}
<OuiLink href="https://google.com">
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{location.country}}')}
</OuiLink>
</Fragment>
Expand Down
6 changes: 4 additions & 2 deletions src-docs/src/views/datagrid/in_memory_enhancements.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ for (let i = 1; i < 100; i++) {
'{{person.lastName}}, {{person.firstName}} {{person.suffix}}'
),
email: (
<OuiLink href="">{faker.helpers.fake('{{internet.email}}')}</OuiLink>
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{internet.email}}')}
</OuiLink>
),
location: (
<Fragment>
{`${faker.helpers.fake('{{location.city}}')}, `}
<OuiLink href="https://google.com">
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{location.country}}')}
</OuiLink>
</Fragment>
Expand Down
6 changes: 4 additions & 2 deletions src-docs/src/views/datagrid/in_memory_pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ for (let i = 1; i < 100; i++) {
'{{person.lastName}}, {{person.firstName}} {{person.suffix}}'
),
email: (
<OuiLink href="">{faker.helpers.fake('{{internet.email}}')}</OuiLink>
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{internet.email}}')}
</OuiLink>
),
location: (
<Fragment>
{`${faker.helpers.fake('{{location.city}}')}, `}
<OuiLink href="https://google.com">
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{location.country}}')}
</OuiLink>
</Fragment>
Expand Down
6 changes: 4 additions & 2 deletions src-docs/src/views/datagrid/in_memory_sorting.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ for (let i = 1; i < 100; i++) {
'{{person.lastName}}, {{person.firstName}} {{person.suffix}}'
),
email: (
<OuiLink href="">{faker.helpers.fake('{{internet.email}}')}</OuiLink>
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{internet.email}}')}
</OuiLink>
),
location: (
<Fragment>
{`${faker.helpers.fake('{{location.city}}')}, `}
<OuiLink href="https://google.com">
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{location.country}}')}
</OuiLink>
</Fragment>
Expand Down
6 changes: 4 additions & 2 deletions src-docs/src/views/datagrid/virtualization.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@ function RenderCellValue({ rowIndex, columnId }) {
const suffix = faker.helpers.fake('{{person.suffix}}');
data[rowIndex] = {
name: `${name} ${suffix}`,
email: <OuiLink href="">{email}</OuiLink>,
email: (
<OuiLink href="https://oui.opensearch.org/latest/">{email}</OuiLink>
),
location: (
<Fragment>
{`${faker.helpers.fake('{{location.city}}')}, `}
<OuiLink href="https://google.com">
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{location.country}}')}
</OuiLink>
</Fragment>
Expand Down
6 changes: 4 additions & 2 deletions src-docs/src/views/datagrid/virtualization_constrained.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,13 @@ function RenderCellValue({ rowIndex, columnId }) {
const suffix = faker.helpers.fake('{{person.suffix}}');
data[rowIndex] = {
name: `${name} ${suffix}`,
email: <OuiLink href="">{email}</OuiLink>,
email: (
<OuiLink href="https://oui.opensearch.org/latest/">{email}</OuiLink>
),
location: (
<Fragment>
{`${faker.helpers.fake('{{location.city}}')}, `}
<OuiLink href="https://google.com">
<OuiLink href="https://oui.opensearch.org/latest/">
{faker.helpers.fake('{{location.country}}')}
</OuiLink>
</Fragment>
Expand Down
3 changes: 2 additions & 1 deletion src-docs/src/views/flyout/flyout_banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ export default () => {
<OuiCallOut iconType="help">
<p>
Here&rsquo;s some stuff that you need to know. This banner helps
highlight important information. <OuiLink href="#">View docs</OuiLink>
highlight important information.{' '}
<OuiLink href="https://oui.opensearch.org/latest/">View docs</OuiLink>
</p>
</OuiCallOut>
);
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/header/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default () => {
const renderLogo = () => (
<OuiHeaderLogo
iconType="logoOpenSearch"
href="#"
href="https://oui.opensearch.org/latest/"
onClick={(e) => e.preventDefault()}
aria-label="Go to home page"
/>
Expand Down
12 changes: 10 additions & 2 deletions src-docs/src/views/header/header_alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ const HeaderUpdates = () => {
{
title: 'Control access to features',
text: 'Show or hide applications and features per space in Kibana.',
action: <OuiLink href="">Learn about feature controls</OuiLink>,
action: (
<OuiLink href="https://oui.opensearch.org/latest/">
Learn about feature controls
</OuiLink>
),
date: '1 May 2019',
badge: <OuiBadge>7.1</OuiBadge>,
},
Expand All @@ -71,7 +75,11 @@ const HeaderUpdates = () => {
title: 'Enter dark mode',
text:
'Kibana now supports the easy-on-the-eyes theme across the entire UI.',
action: <OuiLink href="">Go to Advanced Settings</OuiLink>,
action: (
<OuiLink href="https://oui.opensearch.org/latest/">
Go to Advanced Settings
</OuiLink>
),
date: '10 April 2019',
badge: <OuiBadge color="hollow">7.0</OuiBadge>,
},
Expand Down
4 changes: 3 additions & 1 deletion src-docs/src/views/header/header_elastic_pattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@ export default ({ theme }) => {
sections={[
{
items: [
<OuiHeaderLogo iconType="logoOpenSearch" href="">
<OuiHeaderLogo
iconType="logoOpenSearch"
href="https://oui.opensearch.org/latest/">
OpenSearch
</OuiHeaderLogo>,
deploymentMenu,
Expand Down
6 changes: 3 additions & 3 deletions src-docs/src/views/header/header_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,16 @@ const headerLinksSnippet = `<OuiHeader>
<OuiHeaderSectionItem border="right">
<OuiHeaderLogo
iconType="iconName"
href=""
href="https://oui.opensearch.org/latest/"
/>
</OuiHeaderSectionItem>
<OuiHeaderLinks>
<OuiHeaderLink href="" isActive>
<OuiHeaderLink href="https://oui.opensearch.org/latest/" isActive>
<!-- First link -->
</OuiHeaderLink>
<OuiHeaderLink href="">
<OuiHeaderLink href="https://oui.opensearch.org/latest/">
<!-- Second link -->
</OuiHeaderLink>
</OuiHeaderLinks>
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/header/header_sections.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default () => {
const renderLogo = (
<OuiHeaderLogo
iconType="logoOpenSearch"
href="#"
href="https://oui.opensearch.org/latest/"
onClick={(e) => e.preventDefault()}
aria-label="Navigate to home page"
/>
Expand Down
8 changes: 5 additions & 3 deletions src-docs/src/views/key_pad_menu/key_pad_beta.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,23 @@ import {

export default () => (
<OuiKeyPadMenu>
<OuiKeyPadMenuItem label="Dashboard" href="#">
<OuiKeyPadMenuItem
label="Dashboard"
href="https://oui.opensearch.org/latest/">
<OuiIcon type="dashboardApp" size="l" />
</OuiKeyPadMenuItem>

<OuiKeyPadMenuItem
label="Dashboard"
href="#"
href="https://oui.opensearch.org/latest/"
betaBadgeLabel="Experimental"
betaBadgeTooltipContent="This module is not GA. Please help us by reporting any bugs.">
<OuiIcon type="dashboardApp" size="l" />
</OuiKeyPadMenuItem>

<OuiKeyPadMenuItem
label="Dashboard"
href="#"
href="https://oui.opensearch.org/latest/"
betaBadgeLabel="External"
betaBadgeTooltipContent="This module is an external app."
betaBadgeIconType="popout">
Expand Down
17 changes: 13 additions & 4 deletions src-docs/src/views/key_pad_menu/key_pad_menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,28 @@ import {

export default () => (
<OuiKeyPadMenu>
<OuiKeyPadMenuItem label="Dashboard" href="#">
<OuiKeyPadMenuItem
label="Dashboard"
href="https://oui.opensearch.org/latest/">
<OuiIcon type="dashboardApp" size="l" />
</OuiKeyPadMenuItem>

<OuiKeyPadMenuItem label="Dashboard" href="#">
<OuiKeyPadMenuItem
label="Dashboard"
href="https://oui.opensearch.org/latest/">
<OuiIcon type="dashboardApp" size="l" />
</OuiKeyPadMenuItem>

<OuiKeyPadMenuItem label="Dashboard" href="#">
<OuiKeyPadMenuItem
label="Dashboard"
href="https://oui.opensearch.org/latest/">
<OuiIcon type="dashboardApp" size="l" />
</OuiKeyPadMenuItem>

<OuiKeyPadMenuItem isDisabled label="Dashboard" href="#">
<OuiKeyPadMenuItem
isDisabled
label="Dashboard"
href="https://oui.opensearch.org/latest/">
<OuiIcon type="dashboardApp" size="l" />
</OuiKeyPadMenuItem>
</OuiKeyPadMenu>
Expand Down
6 changes: 3 additions & 3 deletions src-docs/src/views/key_pad_menu/key_pad_menu_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ import KeyPadMenu from './key_pad_menu';
const keyPadMenuSource = require('!!raw-loader!./key_pad_menu');
const keyPadMenuHtml = renderToHtml(KeyPadMenu);
const keyPadMenuSnippet = `<OuiKeyPadMenu>
<OuiKeyPadMenuItem label={label1} href="#">
<OuiKeyPadMenuItem label={label1} href="https://oui.opensearch.org/latest/">
<OuiIcon type={icon1} size="l" />
</OuiKeyPadMenuItem>
<OuiKeyPadMenuItem label={label2} href="#">
<OuiKeyPadMenuItem label={label2} href="https://oui.opensearch.org/latest/">
<OuiIcon type={icon2} size="l" />
</OuiKeyPadMenuItem>
</OuiKeyPadMenu>
Expand All @@ -51,7 +51,7 @@ const keyPadBetaSource = require('!!raw-loader!./key_pad_beta');
const keyPadBetaHtml = renderToHtml(KeyPadBeta);
const keyPadBetaSnippet = `<OuiKeyPadMenuItem
label={label}
href="#"
href="https://oui.opensearch.org/latest/"
betaBadgeLabel={betaBadgeLabel}
betaBadgeTooltipContent={tooltipContent}
betaBadgeIconType={badgeIconType}>
Expand Down
Loading

0 comments on commit c0fa659

Please sign in to comment.