-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Settings files sanitization (#33057)
- Loading branch information
1 parent
7e2facc
commit 5d657ee
Showing
79 changed files
with
305 additions
and
307 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
26 changes: 0 additions & 26 deletions
26
apps/meteor/client/views/admin/settings/GroupPage.stories.tsx
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
apps/meteor/client/views/admin/settings/GroupSelector.stories.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
apps/meteor/client/views/admin/settings/Section.stories.tsx
This file was deleted.
Oops, something went wrong.
59 changes: 0 additions & 59 deletions
59
apps/meteor/client/views/admin/settings/Setting.stories.tsx
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
apps/meteor/client/views/admin/settings/Setting/ResetSettingButton/index.ts
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './ResetSettingButton'; |
58 changes: 58 additions & 0 deletions
58
apps/meteor/client/views/admin/settings/Setting/Setting.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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { FieldGroup } from '@rocket.chat/fuselage'; | ||
import type { ComponentMeta, ComponentStory } from '@storybook/react'; | ||
import React from 'react'; | ||
|
||
import MemoizedSetting from './MemoizedSetting'; | ||
import Setting from './Setting'; | ||
import SettingSkeleton from './SettingSkeleton'; | ||
|
||
export default { | ||
title: 'Admin/Settings/Setting', | ||
component: Setting, | ||
parameters: { | ||
layout: 'centered', | ||
actions: { | ||
argTypesRegex: '^on.*', | ||
}, | ||
}, | ||
decorators: [ | ||
(fn) => ( | ||
<div className='rc-old'> | ||
<div className='page-settings'>{fn()}</div> | ||
</div> | ||
), | ||
], | ||
} as ComponentMeta<typeof Setting>; | ||
|
||
export const Default: ComponentStory<typeof MemoizedSetting> = (args) => <MemoizedSetting {...args} />; | ||
Default.args = { | ||
_id: 'setting-id', | ||
label: 'Label', | ||
hint: 'Hint', | ||
}; | ||
|
||
export const WithCallout: ComponentStory<typeof MemoizedSetting> = (args) => <MemoizedSetting {...args} />; | ||
WithCallout.args = { | ||
_id: 'setting-id', | ||
label: 'Label', | ||
hint: 'Hint', | ||
callout: 'Callout text', | ||
}; | ||
|
||
export const types = () => ( | ||
<FieldGroup> | ||
<MemoizedSetting packageValue _id='setting-id-1' label='Label' type='action' actionText='Action text' /> | ||
<MemoizedSetting packageValue='' _id='setting-id-2' label='Label' type='asset' /> | ||
<MemoizedSetting packageValue _id='setting-id-3' label='Label' type='boolean' /> | ||
<MemoizedSetting packageValue='' _id='setting-id-4' label='Label' type='code' /> | ||
<MemoizedSetting packageValue='' _id='setting-id-5' label='Label' type='font' /> | ||
<MemoizedSetting packageValue={1} _id='setting-id-6' label='Label' type='int' /> | ||
<MemoizedSetting packageValue='' _id='setting-id-7' label='Label' type='language' /> | ||
<MemoizedSetting packageValue='' _id='setting-id-8' label='Label' type='password' /> | ||
<MemoizedSetting packageValue='' _id='setting-id-9' label='Label' type='relativeUrl' /> | ||
<MemoizedSetting packageValue='' _id='setting-id-10' label='Label' type='select' /> | ||
<MemoizedSetting packageValue='' _id='setting-id-11' label='Label' type='string' /> | ||
</FieldGroup> | ||
); | ||
|
||
export const Skeleton = () => <SettingSkeleton />; |
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './Setting'; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
24 changes: 24 additions & 0 deletions
24
apps/meteor/client/views/admin/settings/SettingsGroupPage/SettingsGroupPage.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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import type { ComponentMeta, ComponentStory } from '@storybook/react'; | ||
import React from 'react'; | ||
|
||
import SettingsGroupPage from './SettingsGroupPage'; | ||
import SettingsGroupPageSkeleton from './SettingsGroupPageSkeleton'; | ||
|
||
export default { | ||
title: 'Admin/Settings/SettingsGroupPage', | ||
component: SettingsGroupPage, | ||
parameters: { | ||
layout: 'fullscreen', | ||
controls: { hideNoControlsWarning: true }, | ||
}, | ||
} as ComponentMeta<typeof SettingsGroupPage>; | ||
|
||
export const Default: ComponentStory<typeof SettingsGroupPage> = (args) => <SettingsGroupPage {...args} />; | ||
|
||
export const WithGroup: ComponentStory<typeof SettingsGroupPage> = (args) => <SettingsGroupPage {...args} />; | ||
WithGroup.args = { | ||
_id: 'General', | ||
i18nLabel: 'General', | ||
}; | ||
|
||
export const Skeleton: ComponentStory<typeof SettingsGroupPageSkeleton> = () => <SettingsGroupPageSkeleton />; |
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.