mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
chore: update changelog link and remove obsolete changelog components (#2918)
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
import { ChangeLog } from '@affine/component/changeLog';
|
||||
import type { StoryFn } from '@storybook/react';
|
||||
import { within } from '@storybook/testing-library';
|
||||
import { useState } from 'react';
|
||||
|
||||
export default {
|
||||
title: 'AFFiNE/ChangeLog',
|
||||
component: ChangeLog,
|
||||
};
|
||||
|
||||
export const Default: StoryFn = () => (
|
||||
<div
|
||||
style={{
|
||||
width: '256px',
|
||||
height: '100vh',
|
||||
}}
|
||||
>
|
||||
<ChangeLog onCloseWhatsNew={() => {}} />
|
||||
</div>
|
||||
);
|
||||
|
||||
export const Close: StoryFn = () => {
|
||||
const [closed, setIsClosed] = useState(false);
|
||||
return (
|
||||
<>
|
||||
<div>Closed: {closed ? 'true' : 'false'}</div>
|
||||
<div
|
||||
style={{
|
||||
width: '256px',
|
||||
height: '100vh',
|
||||
}}
|
||||
>
|
||||
<ChangeLog
|
||||
onCloseWhatsNew={() => {
|
||||
setIsClosed(true);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Close.play = async ({ canvasElement }) => {
|
||||
const element = within(canvasElement);
|
||||
await new Promise(resolve => setTimeout(resolve, 2000));
|
||||
element.getByTestId('change-log-close-button').click();
|
||||
};
|
||||
@@ -25,7 +25,7 @@ const buildPreset = {
|
||||
enableBroadcastChannelProvider: true,
|
||||
enableDebugPage: true,
|
||||
enableLegacyCloud: false,
|
||||
changelogUrl: 'https://affine.pro/blog/what-is-new-affine-0620',
|
||||
changelogUrl: 'https://affine.pro/blog/whats-new-affine-0630',
|
||||
enablePreloading: true,
|
||||
enableNewSettingModal: false,
|
||||
enableNewSettingUnstableApi: false,
|
||||
@@ -41,7 +41,7 @@ const buildPreset = {
|
||||
enableBroadcastChannelProvider: true,
|
||||
enableDebugPage: true,
|
||||
enableLegacyCloud: false,
|
||||
changelogUrl: 'https://github.com/toeverything/AFFiNE/releases',
|
||||
changelogUrl: 'https://affine.pro/blog/whats-new-affine-0630',
|
||||
enablePreloading: true,
|
||||
enableNewSettingModal: true,
|
||||
enableNewSettingUnstableApi: false,
|
||||
|
||||
@@ -56,7 +56,7 @@ export const AboutAffine = () => {
|
||||
style={{ cursor: 'pointer' }}
|
||||
onClick={() => {
|
||||
window.open(
|
||||
'https://github.com/toeverything/AFFiNE/releases',
|
||||
'https://affine.pro/blog/whats-new-affine-0630',
|
||||
'_blank'
|
||||
);
|
||||
}}
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
import ChangeLogComponent from '@affine/component/changeLog';
|
||||
import { useAtom } from 'jotai';
|
||||
import { useCallback } from 'react';
|
||||
|
||||
import { guideChangeLogAtom } from '../../../../atoms/guide';
|
||||
|
||||
export const ChangeLog = () => {
|
||||
const [showChangeLogTips, setShowChangeLogTips] = useAtom(guideChangeLogAtom);
|
||||
const onCloseWhatsNew = useCallback(() => {
|
||||
setShowChangeLogTips(false);
|
||||
}, [setShowChangeLogTips]);
|
||||
if (!showChangeLogTips) {
|
||||
return <></>;
|
||||
}
|
||||
return <ChangeLogComponent onCloseWhatsNew={onCloseWhatsNew} />;
|
||||
};
|
||||
|
||||
export default ChangeLog;
|
||||
Reference in New Issue
Block a user