Skip to content
Open
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
@@ -0,0 +1,5 @@
---
"@linode/manager": Upcoming Features
---

Implement Empty Landing State for Reserve IP ([#13521](https://github.com/linode/manager/pull/13521))
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@

import { LandingHeader } from 'src/components/LandingHeader';

import { ReservedIpsLandingEmptyState } from './ReservedIpsLandingEmptyState';

export const ReservedIpsLanding = () => {
// TODO: Replace with actual data check once API queries are implemented

Check warning on line 9 in packages/manager/src/features/ReservedIps/ReservedIpsLanding/ReservedIpsLanding.tsx

View workflow job for this annotation

GitHub Actions / ESLint Review (manager)

[eslint] reported by reviewdog 🐢 Complete the task associated to this "TODO" comment. Raw Output: {"ruleId":"sonarjs/todo-tag","severity":1,"message":"Complete the task associated to this \"TODO\" comment.","line":9,"column":6,"nodeType":null,"messageId":"completeTODO","endLine":9,"endColumn":10}
const showEmptyState = true;

if (showEmptyState) {
return <ReservedIpsLandingEmptyState />;
}
return (
<>
<LandingHeader
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import * as React from 'react';

import NetworkingIcon from 'src/assets/icons/entityIcons/networking.svg';
import { DocumentTitleSegment } from 'src/components/DocumentTitle';
import { ResourcesSection } from 'src/components/EmptyLandingPageResources/ResourcesSection';

import {
gettingStartedGuides,
headers,
linkAnalyticsEvent,
youtubeLinkData,
} from './ReservedIpsLandingEmptyStateData';

export const ReservedIpsLandingEmptyState = () => {
return (
<React.Fragment>
<DocumentTitleSegment segment="Reserved IP Addresses" />
<ResourcesSection
buttonProps={[
{
children: 'Reserve an IP Address',
onClick: () => {
// TODO: Open Reserve IP create drawer once ready

Check warning on line 23 in packages/manager/src/features/ReservedIps/ReservedIpsLanding/ReservedIpsLandingEmptyState.tsx

View workflow job for this annotation

GitHub Actions / ESLint Review (manager)

[eslint] reported by reviewdog 🐢 Complete the task associated to this "TODO" comment. Raw Output: {"ruleId":"sonarjs/todo-tag","severity":1,"message":"Complete the task associated to this \"TODO\" comment.","line":23,"column":18,"nodeType":null,"messageId":"completeTODO","endLine":23,"endColumn":22}
},
},
]}
descriptionMaxWidth={500}
gettingStartedGuidesData={gettingStartedGuides}
headers={headers}
icon={NetworkingIcon}
linkAnalyticsEvent={linkAnalyticsEvent}
wide={true}
youtubeLinkData={youtubeLinkData}
Comment on lines +32 to +33
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
wide={true}
youtubeLinkData={youtubeLinkData}
wide

if there are no YT videos and it isn't clear at this point if there will be, I think it's better to remove that section by not passing that prop.

Image

/>
</React.Fragment>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import {
docsLink,
youtubeChannelLink,
youtubeMoreLinkText,
} from 'src/utilities/emptyStateLandingUtils';

import type {
ResourcesHeaders,
ResourcesLinks,
ResourcesLinkSection,
} from 'src/components/EmptyLandingPageResources/ResourcesLinksTypes';

export const headers: ResourcesHeaders = {
description:
'Reserve and manage public IPv4 addresses across regions, and assign them to resources like Linodes or NodeBalancers when needed.',
subtitle: 'Dedicated IP addressing for your cloud resources',
title: 'Reserved IP Addresses',
};

export const gettingStartedGuides: ResourcesLinkSection = {
links: [
{
text: 'Overview of Reserved IPs',
to: 'https://www.linode.com/docs/', // To be updated with actual Reserved IPs documentation link once available

Check warning on line 24 in packages/manager/src/features/ReservedIps/ReservedIpsLanding/ReservedIpsLandingEmptyStateData.ts

View workflow job for this annotation

GitHub Actions / ESLint Review (manager)

[eslint] reported by reviewdog 🐢 Define a constant instead of duplicating this literal 3 times. Raw Output: {"ruleId":"sonarjs/no-duplicate-string","severity":1,"message":"Define a constant instead of duplicating this literal 3 times.","line":24,"column":11,"nodeType":"Literal","endLine":24,"endColumn":41}
},
{
text: 'Getting Started with Reserved IPs',
to: 'https://www.linode.com/docs/', // To be updated with actual Reserved IPs documentation link once available
},
{
text: 'Managing and Assigning Reserved IPs',
to: 'https://www.linode.com/docs/', // To be updated with actual Reserved IPs documentation link once available
},
],
moreInfo: {
text: 'View additional Reserved IP documentation',
to: docsLink,
},
title: 'Getting Started Guides',
};

export const youtubeLinkData: ResourcesLinkSection = {
links: [
// To be added once we have Reserved IPs specific YouTube content
],
moreInfo: {
text: youtubeMoreLinkText,
to: youtubeChannelLink,
},
title: 'Video Playlist',
};

export const linkAnalyticsEvent: ResourcesLinks['linkAnalyticsEvent'] = {
action: 'Click:link',
category: 'Reserved IPs landing page empty',
};
Loading