-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Allow Markdown in item descriptions (#17241)
* feat: Allow Markdown in item descriptions * Allow forcing Link "open in new" icon for non-text children * Fix `LemonFileInput` empty child * Add `LemonMarkdown` * Simplify `LemonMarkdown` imports * Update .eslintrc.js * Update UI snapshots for `chromium` (1) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (2) * Increase test timeout * Update UI snapshots for `chromium` (1) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Paul D'Ambra <[email protected]>
- Loading branch information
1 parent
a352a5b
commit 2edc058
Showing
157 changed files
with
243 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-1.09 KB
(96%)
frontend/__snapshots__/components-cards-text-card--template.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.35 KB
frontend/__snapshots__/components-editable-field--multiline-with-markdown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-6 Bytes
(100%)
...apshots__/components-errors-error-display--anonymous-error-with-stack-trace.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-5 Bytes
(100%)
frontend/__snapshots__/components-errors-error-display--importing-module.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1 Byte
(100%)
...hots__/components-errors-error-display--resize-observer-loop-limit-exceeded.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2 Bytes
(100%)
frontend/__snapshots__/components-errors-error-display--safari-script-error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
frontend/__snapshots__/filters-taxonomic-filter--actions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-4 Bytes
(100%)
frontend/__snapshots__/filters-taxonomic-filter--events-free.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
frontend/__snapshots__/filters-taxonomic-filter--events-premium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
frontend/__snapshots__/filters-taxonomic-filter--properties.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-39 Bytes
(100%)
frontend/__snapshots__/lemon-ui-lemon-file-input--default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-11 Bytes
(100%)
frontend/__snapshots__/lemon-ui-lemon-text-area--lemon-text-markdown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-145 Bytes
(100%)
frontend/__snapshots__/scenes-app-experiments--complete-funnel-experiment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4 Bytes
(100%)
frontend/__snapshots__/scenes-app-experiments--running-trend-experiment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--funnel-historical-trends--webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-5 Bytes
(100%)
...nd/__snapshots__/scenes-app-insights--funnel-historical-trends-edit--webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1 Byte
(100%)
frontend/__snapshots__/scenes-app-insights--funnel-historical-trends-edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--funnel-historical-trends.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--funnel-left-to-right--webkit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1 Byte
(100%)
...d/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-24 Bytes
(100%)
...napshots__/scenes-app-insights--funnel-left-to-right-breakdown-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
...tend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown-edit.png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-breakdown.png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-3 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--funnel-left-to-right-edit.png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
frontend/__snapshots__/scenes-app-insights--funnel-left-to-right.png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
frontend/__snapshots__/scenes-app-insights--funnel-time-to-convert--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-2 Bytes
(100%)
...tend/__snapshots__/scenes-app-insights--funnel-time-to-convert-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--funnel-time-to-convert-edit.png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
frontend/__snapshots__/scenes-app-insights--funnel-time-to-convert.png
Oops, something went wrong.
Binary file modified
BIN
+5 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-21 Bytes
(100%)
...d/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-12 Bytes
(100%)
...napshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+35 Bytes
(100%)
...tend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit.png
Oops, something went wrong.
Binary file modified
BIN
-16 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown.png
Oops, something went wrong.
Binary file modified
BIN
+11 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+29 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit.png
Oops, something went wrong.
Binary file modified
BIN
-18 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom.png
Oops, something went wrong.
Binary file modified
BIN
-5 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--lifecycle--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-3 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--lifecycle-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-7 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--lifecycle-edit.png
Oops, something went wrong.
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--retention--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
frontend/__snapshots__/scenes-app-insights--retention-breakdown--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-60 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--retention-breakdown-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+8 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--retention-breakdown-edit.png
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--retention-breakdown.png
Oops, something went wrong.
Binary file modified
BIN
-67 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--retention-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+8 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--retention-edit.png
Oops, something went wrong.
Oops, something went wrong.
Binary file modified
BIN
+5 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--stickiness--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+4 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--stickiness-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+6 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--stickiness-edit.png
Oops, something went wrong.
Oops, something went wrong.
Binary file modified
BIN
+3 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-area--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
frontend/__snapshots__/scenes-app-insights--trends-area-breakdown--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-3 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-area-breakdown-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+2 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-area-breakdown-edit.png
Oops, something went wrong.
Binary file modified
BIN
-4 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-area-breakdown.png
Oops, something went wrong.
Binary file modified
BIN
-4 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-area-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
frontend/__snapshots__/scenes-app-insights--trends-area-edit.png
Oops, something went wrong.
Binary file modified
BIN
-3 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-area.png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
frontend/__snapshots__/scenes-app-insights--trends-bar--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-2 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+2 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown-edit.png
Oops, something went wrong.
Binary file modified
BIN
-3 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-bar-breakdown.png
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-bar-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+2 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-bar-edit.png
Oops, something went wrong.
Oops, something went wrong.
Binary file modified
BIN
+2 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-line--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-3 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-line-breakdown--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-line-breakdown-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+2 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-line-breakdown-edit.png
Oops, something went wrong.
Binary file modified
BIN
-2 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-line-breakdown.png
Oops, something went wrong.
Binary file modified
BIN
-5 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-line-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
frontend/__snapshots__/scenes-app-insights--trends-line-edit.png
Oops, something went wrong.
Binary file modified
BIN
-3 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-line.png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
frontend/__snapshots__/scenes-app-insights--trends-number--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-4 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-number-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+5 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-number-edit.png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
frontend/__snapshots__/scenes-app-insights--trends-number.png
Oops, something went wrong.
Binary file modified
BIN
+2 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-pie--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-3 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+5 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown-edit.png
Oops, something went wrong.
Binary file modified
BIN
-5 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-pie-breakdown.png
Oops, something went wrong.
Binary file modified
BIN
-2 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-pie-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
frontend/__snapshots__/scenes-app-insights--trends-pie-edit.png
Oops, something went wrong.
Oops, something went wrong.
Binary file modified
BIN
+4 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-table--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-3 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-table-breakdown--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-2 Bytes
(100%)
...tend/__snapshots__/scenes-app-insights--trends-table-breakdown-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+6 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-table-breakdown-edit.png
Oops, something went wrong.
Binary file modified
BIN
-5 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-table-breakdown.png
Oops, something went wrong.
Binary file modified
BIN
-2 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-table-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
frontend/__snapshots__/scenes-app-insights--trends-table-edit.png
Oops, something went wrong.
Binary file modified
BIN
-3 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-table.png
Oops, something went wrong.
Binary file modified
BIN
+2 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-value--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-2 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-value-breakdown--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
...tend/__snapshots__/scenes-app-insights--trends-value-breakdown-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+4 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-value-breakdown-edit.png
Oops, something went wrong.
Binary file modified
BIN
-6 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-value-breakdown.png
Oops, something went wrong.
Binary file modified
BIN
-3 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-value-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
frontend/__snapshots__/scenes-app-insights--trends-value-edit.png
Oops, something went wrong.
Binary file modified
BIN
-2 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-value.png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
frontend/__snapshots__/scenes-app-insights--trends-world-map--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-5 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-world-map-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
+4 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-world-map-edit.png
Oops, something went wrong.
Binary file modified
BIN
-8 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--trends-world-map.png
Oops, something went wrong.
Binary file modified
BIN
-9 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--user-paths--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-72 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--user-paths-edit--webkit.png
Oops, something went wrong.
Binary file modified
BIN
-2 Bytes
(100%)
frontend/__snapshots__/scenes-app-insights--user-paths-edit.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file modified
BIN
-27.4 KB
(68%)
frontend/__snapshots__/scenes-app-notebooks--recordings-playlist.png
Oops, something went wrong.
Binary file modified
BIN
-19.3 KB
(68%)
frontend/__snapshots__/scenes-app-notebooks--text-formats.png
Oops, something went wrong.
Binary file modified
BIN
-3 Bytes
(100%)
frontend/__snapshots__/scenes-app-recordings--recent-recordings.png
Oops, something went wrong.
Binary file modified
BIN
-3 Bytes
(100%)
frontend/__snapshots__/scenes-app-recordings--recordings-list.png
Oops, something went wrong.
Binary file modified
BIN
-592 Bytes
(99%)
...napshots__/scenes-app-recordings--recordings-play-list-no-pinned-recordings.png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
...pshots__/scenes-app-recordings--recordings-play-list-with-pinned-recordings.png
Oops, something went wrong.
Binary file modified
BIN
+87 Bytes
(100%)
frontend/__snapshots__/scenes-app-recordings--second-recording-in-list.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,8 @@ import { ActivityLogItem, humanize, HumanizedActivityLogItem } from 'lib/compone | |
import type { notificationsLogicType } from './notificationsLogicType' | ||
import { describerFor } from 'lib/components/ActivityLog/activityLogLogic' | ||
import { dayjs } from 'lib/dayjs' | ||
import ReactMarkdown from 'react-markdown' | ||
import posthog from 'posthog-js' | ||
import { LemonMarkdown } from 'lib/lemon-ui/LemonMarkdown' | ||
|
||
const POLL_TIMEOUT = 5 * 60 * 1000 | ||
const MARK_READ_TIMEOUT = 2500 | ||
|
@@ -156,11 +156,7 @@ export const notificationsLogic = kea<notificationsLogicType>([ | |
email: '[email protected]', | ||
name: 'Joe', | ||
isSystem: true, | ||
description: ( | ||
<> | ||
<ReactMarkdown linkTarget="_blank">{changelogNotification.markdown}</ReactMarkdown> | ||
</> | ||
), | ||
description: <LemonMarkdown>{changelogNotification.markdown}</LemonMarkdown>, | ||
created_at: changelogNotification.notificationDate, | ||
unread: changeLogIsUnread, | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 16 additions & 16 deletions
32
frontend/src/lib/components/EditableField/EditableField.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
import { Meta } from '@storybook/react' | ||
import { Meta, StoryFn } from '@storybook/react' | ||
|
||
import { EditableField as EditableFieldComponent } from './EditableField' | ||
import { PageHeader } from '../PageHeader' | ||
import { useState } from 'react' | ||
|
||
const meta: Meta<typeof EditableFieldComponent> = { | ||
title: 'Components/Editable Field', | ||
component: EditableFieldComponent, | ||
tags: ['autodocs'], | ||
} | ||
export default meta | ||
|
||
export function EditableField_(): JSX.Element { | ||
const [savedTitle, setSavedTitle] = useState('Foo') | ||
const [savedDescription, setSavedDescription] = useState('Lorem ipsum dolor sit amet.') | ||
const Template: StoryFn<typeof EditableFieldComponent> = (args) => { | ||
const [value, setValue] = useState(args.value ?? 'Lorem ipsum') | ||
|
||
return ( | ||
<PageHeader | ||
title={<EditableFieldComponent name="title" value={savedTitle} onSave={(value) => setSavedTitle(value)} />} | ||
caption={ | ||
<EditableFieldComponent | ||
name="description" | ||
value={savedDescription} | ||
onSave={(value) => setSavedDescription(value)} | ||
multiline | ||
/> | ||
} | ||
/> | ||
<div className="flex"> | ||
<EditableFieldComponent {...args} value={value} onSave={(value) => setValue(value)} /> | ||
</div> | ||
) | ||
} | ||
|
||
export const Default = Template.bind({}) | ||
|
||
export const MultilineWithMarkdown = Template.bind({}) | ||
MultilineWithMarkdown.args = { | ||
multiline: true, | ||
markdown: true, | ||
value: 'Lorem ipsum **dolor** sit amet, consectetur adipiscing _elit_.', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.