Skip to content

Commit b3cdd69

Browse files
[Chat][RTE] RTE feature setup (#3973)
1 parent 6a663c4 commit b3cdd69

7 files changed

Lines changed: 85 additions & 0 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "none",
3+
"area": "improvement",
4+
"workstream": "RTE",
5+
"comment": "Add internal storybook page and a feature flag for Rich Text Editor feature",
6+
"packageName": "@azure/communication-react",
7+
"email": "98852890+vhuseinova-msft@users.noreply.github.com",
8+
"dependentChangeType": "none"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "none",
3+
"area": "improvement",
4+
"workstream": "RTE",
5+
"comment": "Add internal storybook page and a feature flag for Rich Text Editor feature",
6+
"packageName": "@azure/communication-react",
7+
"email": "98852890+vhuseinova-msft@users.noreply.github.com",
8+
"dependentChangeType": "none"
9+
}

common/config/babel/features.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ module.exports = {
8282
'dtmf-dialer',
8383
// Feature for meeting reactions
8484
'reaction',
85+
// Feature for Rich Text Editor (RTE) support
86+
'rich-text-editor',
8587
],
8688
// A list of in progress beta feature.
8789
// These features are still beta feature but "in progress"
@@ -107,6 +109,8 @@ module.exports = {
107109
'dtmf-dialer',
108110
// Feature for meeting reactions
109111
'reaction',
112+
// Feature for Rich Text Editor (RTE) support
113+
'rich-text-editor',
110114
],
111115
// A list of stabilized features.
112116
// These features can be listed in the conditional compilation directives without

packages/react-components/review/beta/react-components.api.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1929,6 +1929,15 @@ export const _RemoteVideoTile: React_2.MemoExoticComponent<(props: {
19291929
toggleAnnouncerString?: ((announcerString: string) => void) | undefined;
19301930
}) => React_2.JSX.Element>;
19311931

1932+
// @beta
1933+
export const RTESendBox: (props: RTESendBoxProps) => JSX.Element;
1934+
1935+
// @beta
1936+
export interface RTESendBoxProps {
1937+
// (undocumented)
1938+
valueToDisplay?: string;
1939+
}
1940+
19321941
// @public
19331942
export const ScreenShareButton: (props: ScreenShareButtonProps) => JSX.Element;
19341943

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
import React from 'react';
5+
6+
/**
7+
* Props for {@link RTESendBox}.
8+
*
9+
* @beta
10+
*/
11+
export interface RTESendBoxProps {
12+
// just a value to be displayed for now but it should be deleted when the component development starts
13+
valueToDisplay?: string;
14+
}
15+
16+
/**
17+
* A component to render SendBox with Rich Text Editor support.
18+
*
19+
* @beta
20+
*/
21+
export const RTESendBox = (props: RTESendBoxProps): JSX.Element => {
22+
const { valueToDisplay = 'Hello World!' } = props;
23+
return <div>{valueToDisplay}</div>;
24+
};

packages/react-components/src/components/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ export type { ImageGalleryStrings } from './ImageGallery';
1919

2020
export type { SendBoxProps, SendBoxStrings, SendBoxStylesProps } from './SendBox';
2121

22+
/* @conditional-compile-remove(rich-text-editor) */
23+
export { RTESendBox } from './RTE/RTESendBox';
24+
/* @conditional-compile-remove(rich-text-editor) */
25+
export type { RTESendBoxProps } from './RTE/RTESendBox';
26+
2227
/* @conditional-compile-remove(mention) */
2328
export type {
2429
_MentionPopoverProps,
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
import { RTESendBox as RTESendBoxComponent } from '@internal/react-components';
5+
import { Meta } from '@storybook/react/types-6-0';
6+
import React from 'react';
7+
import { COMPONENT_FOLDER_PREFIX } from '../../constants';
8+
9+
const RTESendBoxStory = (args): JSX.Element => {
10+
return <RTESendBoxComponent valueToDisplay={args.valueToDisplay} />;
11+
};
12+
13+
// This must be the only named export from this module, and must be named to match the storybook path suffix.
14+
// This ensures that storybook hoists the story instead of creating a folder with a single entry.
15+
export const RTESendBox = RTESendBoxStory.bind({});
16+
17+
export default {
18+
id: `${COMPONENT_FOLDER_PREFIX}-internal-rtesendbox`,
19+
title: `${COMPONENT_FOLDER_PREFIX}/Internal/RTESendBox`,
20+
component: RTESendBoxComponent,
21+
argTypes: {
22+
// just a value to be displayed for now but it should be deleted when the component development starts
23+
valueToDisplay: { control: 'text', defaultValue: 'Hello World!' }
24+
}
25+
} as Meta;

0 commit comments

Comments
 (0)