diff --git a/src/components/ChangelogDialog/ChangelogDialog.tsx b/src/components/ChangelogDialog/ChangelogDialog.tsx index 9bf778ad..94b23f8e 100644 --- a/src/components/ChangelogDialog/ChangelogDialog.tsx +++ b/src/components/ChangelogDialog/ChangelogDialog.tsx @@ -1,7 +1,6 @@ import React from 'react'; -import {ArrowUpRightFromSquare} from '@gravity-ui/icons'; -import {Dialog, Icon, Link} from '@gravity-ui/uikit'; +import {Dialog} from '@gravity-ui/uikit'; import type {DialogProps} from '@gravity-ui/uikit'; import {block} from '../utils/cn'; @@ -17,7 +16,6 @@ const b = block('changelog-dialog'); export interface ChangelogDialogProps { open: boolean; title?: string; - fullListLink?: string; items: ChangelogItem[]; disableBodyScrollLock?: boolean; disableOutsideClick?: boolean; @@ -33,7 +31,6 @@ function getNextId() { export function ChangelogDialog({ open, title = i18n('title'), - fullListLink, items, disableBodyScrollLock = true, disableOutsideClick, @@ -54,16 +51,6 @@ export function ChangelogDialog({ aria-labelledby={dialogCaptionId} > - {fullListLink ? ( - - - {i18n('link_full_list')} - - - - - - ) : null} {items.length > 0 ? ( items.map((item, index) => ( diff --git a/src/components/ChangelogDialog/__stories__/ChangelogDialog.stories.tsx b/src/components/ChangelogDialog/__stories__/ChangelogDialog.stories.tsx index 278e6e78..b9701702 100644 --- a/src/components/ChangelogDialog/__stories__/ChangelogDialog.stories.tsx +++ b/src/components/ChangelogDialog/__stories__/ChangelogDialog.stories.tsx @@ -30,6 +30,7 @@ const items: ChangelogItem[] = [ description: 'At the top of the panel is the service navigation for each service. Below are common navigation elements: a component for switching between accounts and organizations, settings, help center, search, notifications, favorites.', storyId: 'someStoryId1', + link: 'https://github.com/gravity-ui/uikit', }, { date: '23 Jun 2022', @@ -37,6 +38,7 @@ const items: ChangelogItem[] = [ title: 'New components', description: 'At the top of the panel is the service navigation for each service. Below are common navigation elements: a component for switching between accounts and organizations, settings, help center, search, notifications, favorites.', + link: 'https://github.com/gravity-ui/uikit', }, { date: '15 Jun 2022', @@ -65,6 +67,7 @@ const items: ChangelogItem[] = [ description: 'At the top of the panel is the service navigation for each service. Below are common navigation elements: a component for switching between accounts and organizations, settings, help center, search, notifications, favorites.', storyId: 'someStoryId3', + link: 'https://github.com/gravity-ui/uikit', }, { date: '10 May 2022', @@ -106,10 +109,10 @@ const DefaultTemplate: StoryFn = (props: ChangelogDialogPr export const Default = DefaultTemplate.bind({}); Default.args = { - open: false, + open: true, items, - fullListLink: 'https://github.com/gravity-ui/uikit', onStoryClick: (storyId) => { + // eslint-disable-next-line no-console console.log(storyId); }, }; diff --git a/src/components/ChangelogDialog/components/Item/Item.scss b/src/components/ChangelogDialog/components/Item/Item.scss index d14e046f..91f829a1 100644 --- a/src/components/ChangelogDialog/components/Item/Item.scss +++ b/src/components/ChangelogDialog/components/Item/Item.scss @@ -2,7 +2,7 @@ @use '../../../variables'; $block: '.#{variables.$ns}changelog-dialog-item'; -$metaWidth: 124px; +$metaWidth: 80px; #{$block} { display: flex; @@ -17,17 +17,18 @@ $metaWidth: 124px; } &__label-new { - margin-top: 4px; + margin-top: 8px; } &__content { flex: 1; - margin-left: 16px; + margin-left: 20px; } &__title { margin: 0; - @include mixins.text-subheader-3(); + @include mixins.text-subheader-2(); + font-weight: 500; } &__image { @@ -40,7 +41,11 @@ $metaWidth: 124px; margin-top: 12px; } - &__story-button { + &__button { margin-top: 16px; } + + &__button + &__button { + margin-left: 16px; + } } diff --git a/src/components/ChangelogDialog/components/Item/Item.tsx b/src/components/ChangelogDialog/components/Item/Item.tsx index cb224be6..6ac0b2e6 100644 --- a/src/components/ChangelogDialog/components/Item/Item.tsx +++ b/src/components/ChangelogDialog/components/Item/Item.tsx @@ -42,9 +42,19 @@ export function Item({className, data, onStoryClick}: ItemProps) { {data.description ? (
{data.description}
) : null} + {data.link ? ( + + ) : null} {data.storyId && onStoryClick ? (