Skip to content

Commit 5afef9f

Browse files
committed
Rename to referenceListDefaultOpen
1 parent ca9749b commit 5afef9f

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Breaking changes in this release:
104104
- Updated Fluent theme to use the new attachment preview feature
105105
- Added collapsible activity and activity with abstract handling, in PR [#5506](https://github.com/microsoft/BotFramework-WebChat/pull/5506), in PR [#5513](https://github.com/microsoft/BotFramework-WebChat/pull/5513), in PR [#5771](https://github.com/microsoft/BotFramework-WebChat/pull/5771), by [@OEvgeny](https://github.com/OEvgeny)
106106
- Added `styleOptions.partGroupDefaultOpen` to configure whether part groups are open by default, defaults to `true`
107-
- Added `styleOptions.referencesDefaultOpen` to configure whether references are open by default, defaults to `true`
107+
- Added `styleOptions.referenceListDefaultOpen` to configure whether references are open by default, defaults to `true`
108108
- In the Fluent theme "copilot" variant, part groups and references now default to closed
109109
- Added `disableFileUpload` flag to completelly disable file upload feature, in PR [#5508](https://github.com/microsoft/BotFramework-WebChat/pull/5508), by [@JamesNewbyAtMicrosoft](https://github.com/JamesNewbyAtMicrosoft)
110110
- Deprecated `hideUploadButton` in favor of `disableFileUpload`.

__tests__/html2/side-by-side/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@
864864
},
865865
styleOptions: {
866866
groupTimestamp: 1,
867-
referencesDefaultOpen: true,
867+
referenceListDefaultOpen: true,
868868
timestampFormat: 'absolute',
869869
botAvatarBackgroundColor: '#304E7A',
870870
...adjustStyleOptions

packages/api/src/StyleOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,7 @@ type StyleOptions = {
978978
*
979979
* @default true
980980
*/
981-
referencesDefaultOpen?: boolean | undefined;
981+
referenceListDefaultOpen?: boolean | undefined;
982982

983983
/**
984984
* Defines how activities are being grouped by (in the order of appearance in the array). Default to `['sender', 'status', 'part']` or `sender,status` in CSS.

packages/api/src/defaultStyleOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ const DEFAULT_OPTIONS: Required<StyleOptions> = {
314314
speechRecognitionContinuous: false,
315315

316316
partGroupDefaultOpen: true,
317-
referencesDefaultOpen: true,
317+
referenceListDefaultOpen: true,
318318

319319
groupActivitiesBy: ['sender', 'status', 'part'],
320320

packages/component/src/LinkDefinition/LinkDefinitions.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ const LinkDefinitions = <TAccessoryProps extends {}>({
5555
const localizeWithPlural = useLocalizer({ plural: true });
5656
const summaryRef = useRef<HTMLElement>(null);
5757
const classNames = useStyles(styles);
58-
const [{ referencesDefaultOpen }] = useStyleOptions();
58+
const [{ referenceListDefaultOpen }] = useStyleOptions();
5959

6060
const headerText = localizeWithPlural(REFERENCE_LIST_HEADER_IDS, childrenCount(children));
6161

62-
const defaultOpenString = useMemo(() => (referencesDefaultOpen ? 'true' : 'false'), [referencesDefaultOpen]);
62+
const defaultOpenString = useMemo(() => (referenceListDefaultOpen ? 'true' : 'false'), [referenceListDefaultOpen]);
6363

6464
const handleToggle = useCallback<ReactEventHandler<HTMLDetailsElement>>(event => {
6565
const summary = summaryRef.current;
@@ -77,7 +77,7 @@ const LinkDefinitions = <TAccessoryProps extends {}>({
7777
// eslint-disable-next-line react/forbid-dom-props
7878
id={id}
7979
onToggle={handleToggle}
80-
open={referencesDefaultOpen}
80+
open={referenceListDefaultOpen}
8181
>
8282
<summary
8383
aria-controls={id}

packages/fluent-theme/src/private/FluentThemeProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ function FluentThemeProvider(props: FluentThemeProviderProps) {
104104
const fluentStyleOptions = useMemo(
105105
() =>
106106
Object.freeze({
107-
...(variant === 'copilot' && { partGroupDefaultOpen: false, referencesDefaultOpen: false }),
107+
...(variant === 'copilot' && { partGroupDefaultOpen: false, referenceListDefaultOpen: false }),
108108
feedbackActionsPlacement: 'activity-actions',
109109
stylesRoot
110110
}),

0 commit comments

Comments
 (0)