Preserve unset accessibilityState.selected in C++ props (#58599)

Summary:
Pull Request resolved: https://github.com/react/react-native/pull/58599

`AccessibilityState::selected` was a plain `bool` defaulting to `false`, so the
native side could not tell a component that is selectable but currently
unselected (`accessibilityState={{selected: false}}`) from one that is not
selectable at all (`accessibilityState={{}}`). Both arrived as `false`. The JS
type is already `selected?: ?boolean`, so this is the bridge discarding a value
the public API accepts.

Make `selected` a `std::optional<bool>` defaulting to `std::nullopt`.

  JS accessibilityState      native selected  (before -> after)
  {}                         false -> undefined
  {selected: false}          false -> false
  {selected: true}           true  -> true

This aligns the representation with ARIA, which `accessibilityState` mirrors:
the bool / tri-state split now tracks which ARIA attributes admit an undefined
value.

  field      ARIA value type  admits undefined  representation
  disabled   boolean          no                bool
  busy       boolean          no                bool
  selected   boolean          yes               std::optional<bool>  (changed)
  expanded   boolean          yes               std::optional<bool>
  checked    tristate         yes               CheckedState (None = unset)

That is also why `disabled` and `busy` stay plain `bool`: ARIA gives them no
undefined value, so there is no unset state to preserve. `expanded` was made
optional for this same reason in
https://github.com/facebook/react-native/pull/40881 and `checked` has always
carried a `None`; `selected` was the outlier.

Nor is "unset" merely "absent" for this attribute. `testing-library/dom`
computes it as `boolean | undefined`, documented "false/true if (not)selected,
undefined if not selectable" -- the same shape, with the same meaning, that
this change introduces.

Host platforms need the distinction: on Windows a selectable component must
implement ISelectionItemProvider so UIA can report selection state, and with
the old representation every component carrying an accessibilityState looked
selectable.

iOS and Android rendering is unchanged. Trait derivation coalesces the optional
with `value_or(false)`, and the Android serializer omits the key when the value
is unset, which `BaseViewManager#setViewState` already handles by falling back
to `setSelected(false)`.

Reviewer note: `std::optional<bool>` is contextually convertible to `bool`, so a
bare `if (state.selected)` still compiles but tests engagement rather than
value, silently marking an explicitly unselected component as selected. There is
a regression test for that specific hazard.

Fixes https://github.com/facebook/react-native/issues/46988
Supersedes https://github.com/facebook/react-native/pull/47296, which went stale.

Changelog:
[General][Breaking] - `AccessibilityState::selected` is now `std::optional<bool>` in C++ props, preserving an unset `selected` instead of coercing it to `false`

Reviewed By: javache

Differential Revision: D120049025

fbshipit-source-id: 53ac440976f00daffb3f0599c8841ada2a1452a6
This commit is contained in:
Calvin Liu authored and meta-codesync[bot] committed 2026-09-18 15:42:35 -07:00
1 parent ea9e4832ad
commit af4d8eb08a
34 files changed
+368 -95

No files matched your search

@@ -46,7 +46,7 @@ describe('<Pressable>', () => {
expect(root.getRenderedOutput().toJSX()).toEqual(
<rn-view
accessible="true"
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
backgroundColor="rgba(0, 0, 255, 1)"
borderWidth="3"
height="50"
@@ -70,7 +70,7 @@ describe('<Pressable>', () => {
expect(root.getRenderedOutput().toJSX()).toEqual(
<rn-view
accessible="true"
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
backgroundColor="rgba(128, 128, 128, 1)"
/>,
);
@@ -134,7 +134,7 @@ describe('<Pressable>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:true,selected:false,checked:None,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:true,selected:null,checked:None,busy:false,expanded:null}" />,
);
});
@@ -148,7 +148,7 @@ describe('<Pressable>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:true,selected:false,checked:None,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:true,selected:null,checked:None,busy:false,expanded:null}" />,
);
});
@@ -164,7 +164,7 @@ describe('<Pressable>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:true,selected:false,checked:Checked,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:true,selected:null,checked:Checked,busy:false,expanded:null}" />,
);
});
@@ -183,7 +183,7 @@ describe('<Pressable>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:true,selected:false,checked:None,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:true,selected:null,checked:None,busy:false,expanded:null}" />,
);
});
});
@@ -201,7 +201,7 @@ describe('<Pressable>', () => {
expect(root.getRenderedOutput().toJSX()).toEqual(
<rn-view
accessible="true"
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
/>,
);
});
@@ -223,7 +223,7 @@ describe('<Pressable>', () => {
expect(root.getRenderedOutput().toJSX()).toEqual(
<rn-view
accessible="true"
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
/>,
);
});
@@ -245,7 +245,7 @@ describe('<Pressable>', () => {
expect(root.getRenderedOutput().toJSX()).toEqual(
<rn-view
accessible="true"
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
/>,
);
});
@@ -270,7 +270,7 @@ describe('<Pressable>', () => {
expect(root.getRenderedOutput().toJSX()).toEqual(
<rn-view
accessible="true"
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}">
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}">
<rn-paragraph
allowFontScaling="true"
ellipsizeMode="tail"
@@ -42,7 +42,7 @@ describe('Switch', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-androidSwitch accessibilityState="{disabled:true,selected:false,checked:None,busy:false,expanded:null}" />,
<rn-androidSwitch accessibilityState="{disabled:true,selected:null,checked:None,busy:false,expanded:null}" />,
);
});
@@ -285,7 +285,7 @@ describe('<TouchableHighlight>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:true,selected:false,checked:None,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:true,selected:null,checked:None,busy:false,expanded:null}" />,
);
});
@@ -303,7 +303,7 @@ describe('<TouchableHighlight>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:true,selected:false,checked:None,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:true,selected:null,checked:None,busy:false,expanded:null}" />,
);
});
@@ -323,7 +323,7 @@ describe('<TouchableHighlight>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:true,selected:false,checked:Checked,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:true,selected:null,checked:Checked,busy:false,expanded:null}" />,
);
});
@@ -343,7 +343,7 @@ describe('<TouchableHighlight>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:true,selected:false,checked:None,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:true,selected:null,checked:None,busy:false,expanded:null}" />,
);
});
@@ -367,7 +367,7 @@ describe('<TouchableHighlight>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:true,selected:false,checked:None,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:true,selected:null,checked:None,busy:false,expanded:null}" />,
);
const element = nullthrows(elementRef.current);
@@ -54,7 +54,7 @@ describe('<TouchableNativeFeedback>', () => {
expect(root.getRenderedOutput().toJSX()).toEqual(
<rn-view
accessible="true"
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
/>,
);
});
@@ -75,7 +75,7 @@ describe('<TouchableNativeFeedback>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:true,selected:false,checked:None,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:true,selected:null,checked:None,busy:false,expanded:null}" />,
);
});
@@ -93,7 +93,7 @@ describe('<TouchableNativeFeedback>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:true,selected:false,checked:None,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:true,selected:null,checked:None,busy:false,expanded:null}" />,
);
});
@@ -113,7 +113,7 @@ describe('<TouchableNativeFeedback>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:true,selected:false,checked:Checked,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:true,selected:null,checked:Checked,busy:false,expanded:null}" />,
);
});
@@ -133,7 +133,7 @@ describe('<TouchableNativeFeedback>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:true,selected:false,checked:None,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:true,selected:null,checked:None,busy:false,expanded:null}" />,
);
});
@@ -153,7 +153,7 @@ describe('<TouchableNativeFeedback>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}" />,
);
});
});
@@ -155,7 +155,7 @@ describe('<TouchableOpacity>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:true,selected:false,checked:None,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:true,selected:null,checked:None,busy:false,expanded:null}" />,
);
});
@@ -171,7 +171,7 @@ describe('<TouchableOpacity>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:true,selected:false,checked:None,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:true,selected:null,checked:None,busy:false,expanded:null}" />,
);
});
});
@@ -63,7 +63,7 @@ describe('<TouchableWithoutFeedback>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:true,selected:false,checked:None,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:true,selected:null,checked:None,busy:false,expanded:null}" />,
);
});
@@ -81,7 +81,7 @@ describe('<TouchableWithoutFeedback>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:true,selected:false,checked:None,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:true,selected:null,checked:None,busy:false,expanded:null}" />,
);
});
@@ -101,7 +101,7 @@ describe('<TouchableWithoutFeedback>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:true,selected:false,checked:Checked,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:true,selected:null,checked:Checked,busy:false,expanded:null}" />,
);
});
@@ -121,7 +121,7 @@ describe('<TouchableWithoutFeedback>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:true,selected:false,checked:None,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:true,selected:null,checked:None,busy:false,expanded:null}" />,
);
});
});
@@ -854,7 +854,7 @@ describe('<View>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:false,selected:false,checked:None,busy:true,expanded:null}" />,
<rn-view accessibilityState="{disabled:false,selected:null,checked:None,busy:true,expanded:null}" />,
);
});
@@ -866,7 +866,7 @@ describe('<View>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:false,selected:false,checked:None,busy:true,expanded:null}" />,
<rn-view accessibilityState="{disabled:false,selected:null,checked:None,busy:true,expanded:null}" />,
);
Fantom.runTask(() => {
root.render(<View accessible={true} />);
@@ -888,7 +888,7 @@ describe('<View>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:true,selected:false,checked:None,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:true,selected:null,checked:None,busy:false,expanded:null}" />,
);
});
@@ -900,7 +900,7 @@ describe('<View>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:true,selected:false,checked:None,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:true,selected:null,checked:None,busy:false,expanded:null}" />,
);
Fantom.runTask(() => {
root.render(<View accessible={true} />);
@@ -922,7 +922,7 @@ describe('<View>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:true}" />,
<rn-view accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:true}" />,
);
});
@@ -934,7 +934,7 @@ describe('<View>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:true}" />,
<rn-view accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:true}" />,
);
Fantom.runTask(() => {
root.render(<View accessible={true} />);
@@ -990,7 +990,7 @@ describe('<View>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:false,selected:false,checked:Checked,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:false,selected:null,checked:Checked,busy:false,expanded:null}" />,
);
});
@@ -1002,7 +1002,7 @@ describe('<View>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-view accessibilityState="{disabled:false,selected:false,checked:Checked,busy:false,expanded:null}" />,
<rn-view accessibilityState="{disabled:false,selected:null,checked:Checked,busy:false,expanded:null}" />,
);
Fantom.runTask(() => {
root.render(<View accessible={true} />);
@@ -2,7 +2,7 @@
exports[`LogBoxButton should render Pressable and pass through props 1`] = `
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
backgroundColor="rgba(0, 0, 0, 1)"
>
@@ -10,7 +10,7 @@ exports[`LogBoxInspector should render fatal with selectedIndex 2 1`] = `
backgroundColor="rgba(243, 83, 105, 1)"
/>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
alignItems="center"
aspectRatio="1"
@@ -42,13 +42,14 @@ exports[`LogBoxInspector should render fatal with selectedIndex 2 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
nativeID="logbox_header_title_text"
overflow="hidden"
>
Log 3 of 3
</rn-paragraph>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
alignItems="center"
aspectRatio="1"
@@ -85,6 +86,7 @@ exports[`LogBoxInspector should render fatal with selectedIndex 2 1`] = `
foregroundColor="rgba(243, 83, 105, 1)"
includeFontPadding="false"
lineHeight="28"
maxFontSizeMultiplier="1.5"
nativeID="logbox_message_title_text"
overflow="hidden"
>
@@ -98,6 +100,7 @@ exports[`LogBoxInspector should render fatal with selectedIndex 2 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
nativeID="logbox_message_contents_text"
overflow="hidden"
paddingBottom="10"
@@ -109,6 +112,7 @@ exports[`LogBoxInspector should render fatal with selectedIndex 2 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
Some kind of message (third)
</rn-text>
@@ -128,7 +132,7 @@ exports[`LogBoxInspector should render fatal with selectedIndex 2 1`] = `
flexDirection="row"
>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
nativeID="logbox_footer_button_dismiss"
>
@@ -139,13 +143,14 @@ exports[`LogBoxInspector should render fatal with selectedIndex 2 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Dismiss
</rn-paragraph>
</rn-view>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
nativeID="logbox_footer_button_minimize"
>
@@ -156,13 +161,14 @@ exports[`LogBoxInspector should render fatal with selectedIndex 2 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Minimize
</rn-paragraph>
</rn-view>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
nativeID="logbox_footer_button_copy"
>
@@ -173,6 +179,7 @@ exports[`LogBoxInspector should render fatal with selectedIndex 2 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Copy
@@ -194,7 +201,7 @@ exports[`LogBoxInspector should render warning with selectedIndex 0 1`] = `
backgroundColor="rgba(250, 186, 48, 1)"
/>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
alignItems="center"
aspectRatio="1"
@@ -226,13 +233,14 @@ exports[`LogBoxInspector should render warning with selectedIndex 0 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
nativeID="logbox_header_title_text"
overflow="hidden"
>
Log 1 of 3
</rn-paragraph>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
alignItems="center"
aspectRatio="1"
@@ -269,6 +277,7 @@ exports[`LogBoxInspector should render warning with selectedIndex 0 1`] = `
foregroundColor="rgba(250, 186, 48, 1)"
includeFontPadding="false"
lineHeight="28"
maxFontSizeMultiplier="1.5"
nativeID="logbox_message_title_text"
overflow="hidden"
>
@@ -282,6 +291,7 @@ exports[`LogBoxInspector should render warning with selectedIndex 0 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
nativeID="logbox_message_contents_text"
overflow="hidden"
paddingBottom="10"
@@ -293,6 +303,7 @@ exports[`LogBoxInspector should render warning with selectedIndex 0 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
Some kind of message (first)
</rn-text>
@@ -312,7 +323,7 @@ exports[`LogBoxInspector should render warning with selectedIndex 0 1`] = `
flexDirection="row"
>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
nativeID="logbox_footer_button_dismiss"
>
@@ -323,13 +334,14 @@ exports[`LogBoxInspector should render warning with selectedIndex 0 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Dismiss
</rn-paragraph>
</rn-view>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
nativeID="logbox_footer_button_minimize"
>
@@ -340,13 +352,14 @@ exports[`LogBoxInspector should render warning with selectedIndex 0 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Minimize
</rn-paragraph>
</rn-view>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
nativeID="logbox_footer_button_copy"
>
@@ -357,6 +370,7 @@ exports[`LogBoxInspector should render warning with selectedIndex 0 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Copy
@@ -12,6 +12,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`]
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Source
@@ -44,6 +45,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`]
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -53,6 +55,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`]
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ 63 | function ConsoleWithThrow() {
</rn-text>
@@ -64,6 +67,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`]
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -73,6 +77,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`]
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ 64 | console.error('hit');
</rn-text>
@@ -84,6 +89,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`]
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -93,6 +99,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`]
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎&gt; 65 | throw new Error('test');
</rn-text>
@@ -104,6 +111,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`]
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -113,6 +121,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`]
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ | ^
</rn-text>
@@ -124,6 +133,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`]
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -133,6 +143,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`]
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ 66 | }
</rn-text>
@@ -144,6 +155,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`]
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -153,6 +165,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`]
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ 67 |
</rn-text>
@@ -164,6 +177,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`]
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -173,6 +187,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`]
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ 68 |
</rn-text>
@@ -180,7 +195,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`]
</rn-androidHorizontalScrollContentView>
</rn-scrollView>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
paddingBottom="10"
paddingTop="10"
@@ -196,6 +211,7 @@ exports[`LogBoxInspectorCodeFrame should dedupe if code frames are the same 1`]
foregroundColor="rgba(255, 255, 255, 0.501961)"
includeFontPadding="false"
lineHeight="16"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
CrashReactApp.js (65:19)
@@ -216,6 +232,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Source
@@ -248,6 +265,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame 1`] = `
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -257,6 +275,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ 197 | });
</rn-text>
@@ -268,6 +287,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame 1`] = `
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -277,6 +297,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ 198 |
</rn-text>
@@ -288,6 +309,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame 1`] = `
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -297,6 +319,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ &gt; 199 | export default CrashReactApp;
</rn-text>
@@ -308,6 +331,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame 1`] = `
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -317,6 +341,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ | ^
</rn-text>
@@ -328,6 +353,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame 1`] = `
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -337,6 +363,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ 200 |
</rn-text>
@@ -344,7 +371,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame 1`] = `
</rn-androidHorizontalScrollContentView>
</rn-scrollView>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
paddingBottom="10"
paddingTop="10"
@@ -360,6 +387,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame 1`] = `
foregroundColor="rgba(255, 255, 255, 0.501961)"
includeFontPadding="false"
lineHeight="16"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
CrashReactApp.js (199:1)
@@ -380,6 +408,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame without a location
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Source
@@ -412,6 +441,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame without a location
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -421,6 +451,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame without a location
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ 197 | });
</rn-text>
@@ -432,6 +463,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame without a location
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -441,6 +473,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame without a location
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ 198 |
</rn-text>
@@ -452,6 +485,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame without a location
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -461,6 +495,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame without a location
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ &gt; 199 | export default CrashReactApp;
</rn-text>
@@ -472,6 +507,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame without a location
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -481,6 +517,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame without a location
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ | ^
</rn-text>
@@ -492,6 +529,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame without a location
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -501,6 +539,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame without a location
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ 200 |
</rn-text>
@@ -508,7 +547,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame without a location
</rn-androidHorizontalScrollContentView>
</rn-scrollView>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
paddingBottom="10"
paddingTop="10"
@@ -524,6 +563,7 @@ exports[`LogBoxInspectorCodeFrame should render a code frame without a location
foregroundColor="rgba(255, 255, 255, 0.501961)"
includeFontPadding="false"
lineHeight="16"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
CrashReactApp.js
@@ -544,6 +584,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Sources
@@ -576,6 +617,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -585,6 +627,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ 62 |
</rn-text>
@@ -596,6 +639,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -605,6 +649,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ 63 | function ConsoleWithThrow() {
</rn-text>
@@ -616,6 +661,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -625,6 +671,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎&gt; 64 | console.error('hit');
</rn-text>
@@ -636,6 +683,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -645,6 +693,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ | ^
</rn-text>
@@ -656,6 +705,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -665,6 +715,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ 65 | throw new Error('test');
</rn-text>
@@ -676,6 +727,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -685,6 +737,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ 66 | }
</rn-text>
@@ -696,6 +749,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -705,6 +759,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ 67 |
</rn-text>
@@ -712,7 +767,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
</rn-androidHorizontalScrollContentView>
</rn-scrollView>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
paddingBottom="10"
paddingTop="10"
@@ -728,6 +783,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
foregroundColor="rgba(255, 255, 255, 0.501961)"
includeFontPadding="false"
lineHeight="16"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
CrashReactApp.js (64:17)
@@ -761,6 +817,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -770,6 +827,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ 89 |
</rn-text>
@@ -781,6 +839,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -790,6 +849,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ 90 | function Child() {
</rn-text>
@@ -801,6 +861,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -810,6 +871,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎&gt; 91 | return &lt;ConsoleWithThrow /&gt;;
</rn-text>
@@ -821,6 +883,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -830,6 +893,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ | ^
</rn-text>
@@ -841,6 +905,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -850,6 +915,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ 92 | }
</rn-text>
@@ -861,6 +927,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -870,6 +937,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ 93 |
</rn-text>
@@ -881,6 +949,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -890,6 +959,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
‎ 94 |
</rn-text>
@@ -897,7 +967,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
</rn-androidHorizontalScrollContentView>
</rn-scrollView>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
paddingBottom="10"
paddingTop="10"
@@ -913,6 +983,7 @@ exports[`LogBoxInspectorCodeFrame should render both a code frame and a componen
foregroundColor="rgba(255, 255, 255, 0.501961)"
includeFontPadding="false"
lineHeight="16"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
CrashReactApp.js (90:11)
@@ -14,6 +14,7 @@ exports[`LogBoxInspectorFooter should render no buttons and a message for syntax
foregroundColor="rgba(255, 255, 255, 0.6)"
height="48"
lineHeight="20"
maxFontSizeMultiplier="1.5"
nativeID="logbox_dismissable_text"
overflow="hidden"
paddingBottom="50"
@@ -31,7 +32,7 @@ exports[`LogBoxInspectorFooter should render two buttons for error 1`] = `
flexDirection="row"
>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
nativeID="logbox_footer_button_dismiss"
>
@@ -42,13 +43,14 @@ exports[`LogBoxInspectorFooter should render two buttons for error 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Dismiss
</rn-paragraph>
</rn-view>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
nativeID="logbox_footer_button_minimize"
>
@@ -59,13 +61,14 @@ exports[`LogBoxInspectorFooter should render two buttons for error 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Minimize
</rn-paragraph>
</rn-view>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
nativeID="logbox_footer_button_copy"
>
@@ -76,6 +79,7 @@ exports[`LogBoxInspectorFooter should render two buttons for error 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Copy
@@ -90,7 +94,7 @@ exports[`LogBoxInspectorFooter should render two buttons for fatal 1`] = `
flexDirection="row"
>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
nativeID="logbox_footer_button_dismiss"
>
@@ -101,13 +105,14 @@ exports[`LogBoxInspectorFooter should render two buttons for fatal 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Dismiss
</rn-paragraph>
</rn-view>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
nativeID="logbox_footer_button_minimize"
>
@@ -118,13 +123,14 @@ exports[`LogBoxInspectorFooter should render two buttons for fatal 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Minimize
</rn-paragraph>
</rn-view>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
nativeID="logbox_footer_button_copy"
>
@@ -135,6 +141,7 @@ exports[`LogBoxInspectorFooter should render two buttons for fatal 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Copy
@@ -149,7 +156,7 @@ exports[`LogBoxInspectorFooter should render two buttons for warning 1`] = `
flexDirection="row"
>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
nativeID="logbox_footer_button_dismiss"
>
@@ -160,13 +167,14 @@ exports[`LogBoxInspectorFooter should render two buttons for warning 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Dismiss
</rn-paragraph>
</rn-view>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
nativeID="logbox_footer_button_minimize"
>
@@ -177,13 +185,14 @@ exports[`LogBoxInspectorFooter should render two buttons for warning 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Minimize
</rn-paragraph>
</rn-view>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
nativeID="logbox_footer_button_copy"
>
@@ -194,6 +203,7 @@ exports[`LogBoxInspectorFooter should render two buttons for warning 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Copy
@@ -6,7 +6,7 @@ exports[`LogBoxInspectorHeader should render both buttons for two total 1`] = `
backgroundColor="rgba(250, 186, 48, 1)"
/>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
alignItems="center"
aspectRatio="1"
@@ -38,13 +38,14 @@ exports[`LogBoxInspectorHeader should render both buttons for two total 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
nativeID="logbox_header_title_text"
overflow="hidden"
>
Log 2 of 2
</rn-paragraph>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
alignItems="center"
aspectRatio="1"
@@ -94,6 +95,7 @@ exports[`LogBoxInspectorHeader should render no buttons for one total 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
nativeID="logbox_header_title_text"
overflow="hidden"
>
@@ -126,6 +128,7 @@ exports[`LogBoxInspectorHeader should render syntax error header 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
nativeID="logbox_header_title_text"
overflow="hidden"
>
@@ -158,6 +161,7 @@ exports[`LogBoxInspectorHeader should render two buttons for three or more total
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
nativeID="logbox_header_title_text"
overflow="hidden"
>
@@ -15,6 +15,7 @@ exports[`LogBoxInspectorMessageHeader should not render "See More" if expanded 1
foregroundColor="rgba(250, 186, 48, 1)"
includeFontPadding="false"
lineHeight="28"
maxFontSizeMultiplier="1.5"
nativeID="logbox_message_title_text"
overflow="hidden"
>
@@ -28,6 +29,7 @@ exports[`LogBoxInspectorMessageHeader should not render "See More" if expanded 1
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
nativeID="logbox_message_contents_text"
overflow="hidden"
paddingBottom="10"
@@ -39,6 +41,7 @@ exports[`LogBoxInspectorMessageHeader should not render "See More" if expanded 1
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
#############################################################################################################################################################################################################################################################################################################
</rn-text>
@@ -61,6 +64,7 @@ exports[`LogBoxInspectorMessageHeader should not render See More button for shor
foregroundColor="rgba(250, 186, 48, 1)"
includeFontPadding="false"
lineHeight="28"
maxFontSizeMultiplier="1.5"
nativeID="logbox_message_title_text"
overflow="hidden"
>
@@ -74,6 +78,7 @@ exports[`LogBoxInspectorMessageHeader should not render See More button for shor
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
nativeID="logbox_message_contents_text"
overflow="hidden"
paddingBottom="10"
@@ -85,6 +90,7 @@ exports[`LogBoxInspectorMessageHeader should not render See More button for shor
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
Short
</rn-text>
@@ -107,6 +113,7 @@ exports[`LogBoxInspectorMessageHeader should render "See More" if collapsed 1`]
foregroundColor="rgba(250, 186, 48, 1)"
includeFontPadding="false"
lineHeight="28"
maxFontSizeMultiplier="1.5"
nativeID="logbox_message_title_text"
overflow="hidden"
>
@@ -120,6 +127,7 @@ exports[`LogBoxInspectorMessageHeader should render "See More" if collapsed 1`]
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
nativeID="logbox_message_contents_text"
overflow="hidden"
paddingBottom="10"
@@ -131,6 +139,7 @@ exports[`LogBoxInspectorMessageHeader should render "See More" if collapsed 1`]
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
############################################################################################################################################################################################################################################################################################################
</rn-text>
@@ -143,6 +152,7 @@ exports[`LogBoxInspectorMessageHeader should render "See More" if collapsed 1`]
isPressable="true"
layoutDirection="ltr"
lineHeight="12"
maxFontSizeMultiplier="1.5"
>
... See More
</rn-text>
@@ -165,6 +175,7 @@ exports[`LogBoxInspectorMessageHeader should render error 1`] = `
foregroundColor="rgba(243, 83, 105, 1)"
includeFontPadding="false"
lineHeight="28"
maxFontSizeMultiplier="1.5"
nativeID="logbox_message_title_text"
overflow="hidden"
>
@@ -178,6 +189,7 @@ exports[`LogBoxInspectorMessageHeader should render error 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
nativeID="logbox_message_contents_text"
overflow="hidden"
paddingBottom="10"
@@ -189,6 +201,7 @@ exports[`LogBoxInspectorMessageHeader should render error 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
Some error message
</rn-text>
@@ -211,6 +224,7 @@ exports[`LogBoxInspectorMessageHeader should render fatal 1`] = `
foregroundColor="rgba(243, 83, 105, 1)"
includeFontPadding="false"
lineHeight="28"
maxFontSizeMultiplier="1.5"
nativeID="logbox_message_title_text"
overflow="hidden"
>
@@ -224,6 +238,7 @@ exports[`LogBoxInspectorMessageHeader should render fatal 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
nativeID="logbox_message_contents_text"
overflow="hidden"
paddingBottom="10"
@@ -235,6 +250,7 @@ exports[`LogBoxInspectorMessageHeader should render fatal 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
Some fatal message
</rn-text>
@@ -257,6 +273,7 @@ exports[`LogBoxInspectorMessageHeader should render syntax error 1`] = `
foregroundColor="rgba(243, 83, 105, 1)"
includeFontPadding="false"
lineHeight="28"
maxFontSizeMultiplier="1.5"
nativeID="logbox_message_title_text"
overflow="hidden"
>
@@ -270,6 +287,7 @@ exports[`LogBoxInspectorMessageHeader should render syntax error 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
nativeID="logbox_message_contents_text"
overflow="hidden"
paddingBottom="10"
@@ -281,6 +299,7 @@ exports[`LogBoxInspectorMessageHeader should render syntax error 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="20"
maxFontSizeMultiplier="1.5"
>
Some syntax error message
</rn-text>
@@ -12,12 +12,13 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with ful
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Component Stack
</rn-paragraph>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
flex="1"
paddingHorizontal="10"
@@ -31,6 +32,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with ful
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="18"
maxFontSizeMultiplier="1.5"
nativeID="logbox_component_stack_frame_text"
overflow="hidden"
>
@@ -41,6 +43,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with ful
foregroundColor="rgba(255, 255, 255, 0.4)"
layoutDirection="ltr"
lineHeight="18"
maxFontSizeMultiplier="1.5"
>
&lt;
</rn-text>
@@ -52,6 +55,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with ful
foregroundColor="rgba(255, 255, 255, 0.4)"
layoutDirection="ltr"
lineHeight="18"
maxFontSizeMultiplier="1.5"
>
/&gt;
</rn-text>
@@ -65,6 +69,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with ful
foregroundColor="rgba(255, 255, 255, 0.701961)"
includeFontPadding="false"
lineHeight="16"
maxFontSizeMultiplier="1.5"
overflow="hidden"
paddingLeft="10"
>
@@ -72,7 +77,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with ful
</rn-paragraph>
</rn-view>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
>
<rn-paragraph
@@ -84,6 +89,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with ful
foregroundColor="rgba(255, 255, 255, 0.701961)"
lineHeight="20"
marginTop="0"
maxFontSizeMultiplier="1.5"
overflow="hidden"
paddingHorizontal="10"
paddingVertical="5"
@@ -104,12 +110,13 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Component Stack
</rn-paragraph>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
flex="1"
paddingHorizontal="10"
@@ -123,6 +130,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="18"
maxFontSizeMultiplier="1.5"
nativeID="logbox_component_stack_frame_text"
overflow="hidden"
>
@@ -133,6 +141,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor
foregroundColor="rgba(255, 255, 255, 0.4)"
layoutDirection="ltr"
lineHeight="18"
maxFontSizeMultiplier="1.5"
>
&lt;
</rn-text>
@@ -144,6 +153,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor
foregroundColor="rgba(255, 255, 255, 0.4)"
layoutDirection="ltr"
lineHeight="18"
maxFontSizeMultiplier="1.5"
>
/&gt;
</rn-text>
@@ -157,6 +167,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor
foregroundColor="rgba(255, 255, 255, 0.701961)"
includeFontPadding="false"
lineHeight="16"
maxFontSizeMultiplier="1.5"
overflow="hidden"
paddingLeft="10"
>
@@ -164,7 +175,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor
</rn-paragraph>
</rn-view>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
flex="1"
paddingHorizontal="10"
@@ -178,6 +189,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="18"
maxFontSizeMultiplier="1.5"
nativeID="logbox_component_stack_frame_text"
overflow="hidden"
>
@@ -188,6 +200,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor
foregroundColor="rgba(255, 255, 255, 0.4)"
layoutDirection="ltr"
lineHeight="18"
maxFontSizeMultiplier="1.5"
>
&lt;
</rn-text>
@@ -199,6 +212,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor
foregroundColor="rgba(255, 255, 255, 0.4)"
layoutDirection="ltr"
lineHeight="18"
maxFontSizeMultiplier="1.5"
>
/&gt;
</rn-text>
@@ -212,6 +226,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor
foregroundColor="rgba(255, 255, 255, 0.701961)"
includeFontPadding="false"
lineHeight="16"
maxFontSizeMultiplier="1.5"
overflow="hidden"
paddingLeft="10"
>
@@ -219,7 +234,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor
</rn-paragraph>
</rn-view>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
flex="1"
paddingHorizontal="10"
@@ -233,6 +248,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="18"
maxFontSizeMultiplier="1.5"
nativeID="logbox_component_stack_frame_text"
overflow="hidden"
>
@@ -243,6 +259,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor
foregroundColor="rgba(255, 255, 255, 0.4)"
layoutDirection="ltr"
lineHeight="18"
maxFontSizeMultiplier="1.5"
>
&lt;
</rn-text>
@@ -254,6 +271,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor
foregroundColor="rgba(255, 255, 255, 0.4)"
layoutDirection="ltr"
lineHeight="18"
maxFontSizeMultiplier="1.5"
>
/&gt;
</rn-text>
@@ -267,6 +285,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor
foregroundColor="rgba(255, 255, 255, 0.701961)"
includeFontPadding="false"
lineHeight="16"
maxFontSizeMultiplier="1.5"
overflow="hidden"
paddingLeft="10"
>
@@ -274,7 +293,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor
</rn-paragraph>
</rn-view>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
>
<rn-paragraph
@@ -286,6 +305,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with mor
foregroundColor="rgba(255, 255, 255, 0.701961)"
lineHeight="20"
marginTop="0"
maxFontSizeMultiplier="1.5"
overflow="hidden"
paddingHorizontal="10"
paddingVertical="5"
@@ -308,12 +328,13 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with par
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Component Stack
</rn-paragraph>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
flex="1"
paddingHorizontal="10"
@@ -327,6 +348,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with par
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="18"
maxFontSizeMultiplier="1.5"
nativeID="logbox_component_stack_frame_text"
overflow="hidden"
>
@@ -337,6 +359,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with par
foregroundColor="rgba(255, 255, 255, 0.4)"
layoutDirection="ltr"
lineHeight="18"
maxFontSizeMultiplier="1.5"
>
&lt;
</rn-text>
@@ -348,6 +371,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with par
foregroundColor="rgba(255, 255, 255, 0.4)"
layoutDirection="ltr"
lineHeight="18"
maxFontSizeMultiplier="1.5"
>
/&gt;
</rn-text>
@@ -361,6 +385,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with par
foregroundColor="rgba(255, 255, 255, 0.701961)"
includeFontPadding="false"
lineHeight="16"
maxFontSizeMultiplier="1.5"
overflow="hidden"
paddingLeft="10"
>
@@ -368,7 +393,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with par
</rn-paragraph>
</rn-view>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
>
<rn-paragraph
@@ -380,6 +405,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames with par
foregroundColor="rgba(255, 255, 255, 0.701961)"
lineHeight="20"
marginTop="0"
maxFontSizeMultiplier="1.5"
overflow="hidden"
paddingHorizontal="10"
paddingVertical="5"
@@ -400,6 +426,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames without
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Component Stack
@@ -412,6 +439,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames without
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="18"
maxFontSizeMultiplier="1.5"
nativeID="logbox_component_stack_frame_text"
overflow="hidden"
>
@@ -422,6 +450,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames without
foregroundColor="rgba(255, 255, 255, 0.4)"
layoutDirection="ltr"
lineHeight="18"
maxFontSizeMultiplier="1.5"
>
&lt;
</rn-text>
@@ -433,6 +462,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames without
foregroundColor="rgba(255, 255, 255, 0.4)"
layoutDirection="ltr"
lineHeight="18"
maxFontSizeMultiplier="1.5"
>
/&gt;
</rn-text>
@@ -446,13 +476,14 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames without
foregroundColor="rgba(255, 255, 255, 0.701961)"
includeFontPadding="false"
lineHeight="16"
maxFontSizeMultiplier="1.5"
overflow="hidden"
paddingLeft="10"
>
MyComponentFile.js:1
</rn-paragraph>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
>
<rn-paragraph
@@ -464,6 +495,7 @@ exports[`LogBoxInspectorReactFrames should render componentStack frames without
foregroundColor="rgba(255, 255, 255, 0.701961)"
lineHeight="20"
marginTop="0"
maxFontSizeMultiplier="1.5"
overflow="hidden"
paddingHorizontal="10"
paddingVertical="5"
@@ -12,6 +12,7 @@ exports[`LogBoxInspectorSection should render with action on the right 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Test Section
@@ -51,6 +52,7 @@ exports[`LogBoxInspectorSection should render with only heading 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Test Section
@@ -2,7 +2,7 @@
exports[`LogBoxInspectorSourceMapStatus should render for failed 1`] = `
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
alignItems="center"
flexDirection="row"
@@ -29,6 +29,7 @@ exports[`LogBoxInspectorSourceMapStatus should render for failed 1`] = `
foregroundColor="rgba(243, 83, 105, 1)"
includeFontPadding="false"
lineHeight="16"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Source Map
@@ -38,7 +39,7 @@ exports[`LogBoxInspectorSourceMapStatus should render for failed 1`] = `
exports[`LogBoxInspectorSourceMapStatus should render for pending 1`] = `
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
alignItems="center"
flexDirection="row"
@@ -66,6 +67,7 @@ exports[`LogBoxInspectorSourceMapStatus should render for pending 1`] = `
foregroundColor="rgba(250, 186, 48, 1)"
includeFontPadding="false"
lineHeight="16"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Source Map
@@ -2,7 +2,7 @@
exports[`LogBoxInspectorStackFrame should render collapsed stack frame with dimmed text 1`] = `
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
flex="1"
paddingHorizontal="10"
@@ -17,6 +17,7 @@ exports[`LogBoxInspectorStackFrame should render collapsed stack frame with dimm
foregroundColor="rgba(255, 255, 255, 0.4)"
includeFontPadding="false"
lineHeight="18"
maxFontSizeMultiplier="1.5"
nativeID="logbox_stack_frame_text"
overflow="hidden"
>
@@ -31,6 +32,7 @@ exports[`LogBoxInspectorStackFrame should render collapsed stack frame with dimm
foregroundColor="rgba(255, 255, 255, 0.4)"
includeFontPadding="false"
lineHeight="16"
maxFontSizeMultiplier="1.5"
maximumNumberOfLines="1"
overflow="hidden"
paddingLeft="10"
@@ -42,7 +44,7 @@ exports[`LogBoxInspectorStackFrame should render collapsed stack frame with dimm
exports[`LogBoxInspectorStackFrame should render stack frame 1`] = `
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
flex="1"
paddingHorizontal="10"
@@ -57,6 +59,7 @@ exports[`LogBoxInspectorStackFrame should render stack frame 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="18"
maxFontSizeMultiplier="1.5"
nativeID="logbox_stack_frame_text"
overflow="hidden"
>
@@ -71,6 +74,7 @@ exports[`LogBoxInspectorStackFrame should render stack frame 1`] = `
foregroundColor="rgba(255, 255, 255, 0.8)"
includeFontPadding="false"
lineHeight="16"
maxFontSizeMultiplier="1.5"
maximumNumberOfLines="1"
overflow="hidden"
paddingLeft="10"
@@ -82,7 +86,7 @@ exports[`LogBoxInspectorStackFrame should render stack frame 1`] = `
exports[`LogBoxInspectorStackFrame should render stack frame without press feedback 1`] = `
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
flex="1"
paddingHorizontal="10"
@@ -97,6 +101,7 @@ exports[`LogBoxInspectorStackFrame should render stack frame without press feedb
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="18"
maxFontSizeMultiplier="1.5"
nativeID="logbox_stack_frame_text"
overflow="hidden"
>
@@ -111,6 +116,7 @@ exports[`LogBoxInspectorStackFrame should render stack frame without press feedb
foregroundColor="rgba(255, 255, 255, 0.8)"
includeFontPadding="false"
lineHeight="16"
maxFontSizeMultiplier="1.5"
maximumNumberOfLines="1"
overflow="hidden"
paddingLeft="10"
@@ -14,6 +14,7 @@ exports[`LogBoxInspectorStackFrames should render stack frames with 1 frame coll
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="20"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Call Stack
@@ -35,12 +36,13 @@ exports[`LogBoxInspectorStackFrames should render stack frames with 1 frame coll
includeFontPadding="false"
lineHeight="18"
marginHorizontal="10"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
This call stack is not symbolicated. Some features are unavailable such as viewing the function name or tapping to open files.
</rn-paragraph>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
flex="1"
paddingHorizontal="10"
@@ -55,6 +57,7 @@ exports[`LogBoxInspectorStackFrames should render stack frames with 1 frame coll
foregroundColor="rgba(255, 255, 255, 1)"
includeFontPadding="false"
lineHeight="18"
maxFontSizeMultiplier="1.5"
nativeID="logbox_stack_frame_text"
overflow="hidden"
>
@@ -69,6 +72,7 @@ exports[`LogBoxInspectorStackFrames should render stack frames with 1 frame coll
foregroundColor="rgba(255, 255, 255, 0.8)"
includeFontPadding="false"
lineHeight="16"
maxFontSizeMultiplier="1.5"
maximumNumberOfLines="1"
overflow="hidden"
paddingLeft="10"
@@ -77,7 +81,7 @@ exports[`LogBoxInspectorStackFrames should render stack frames with 1 frame coll
</rn-paragraph>
</rn-view>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
>
<rn-paragraph
@@ -89,6 +93,7 @@ exports[`LogBoxInspectorStackFrames should render stack frames with 1 frame coll
foregroundColor="rgba(255, 255, 255, 0.701961)"
lineHeight="20"
marginTop="0"
maxFontSizeMultiplier="1.5"
overflow="hidden"
paddingHorizontal="10"
paddingVertical="5"
@@ -7,6 +7,7 @@ exports[`LogBoxMessage Should handle multiple links 1`] = `
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -15,6 +16,7 @@ exports[`LogBoxMessage Should handle multiple links 1`] = `
isHighlighted="false"
isPressable="true"
layoutDirection="ltr"
maxFontSizeMultiplier="1.5"
textDecorationLineType="underline"
>
https://reactnative.dev
@@ -22,6 +24,7 @@ exports[`LogBoxMessage Should handle multiple links 1`] = `
<rn-text
allowFontScaling="true"
layoutDirection="ltr"
maxFontSizeMultiplier="1.5"
>
and
</rn-text>
@@ -31,6 +34,7 @@ exports[`LogBoxMessage Should handle multiple links 1`] = `
isHighlighted="false"
isPressable="true"
layoutDirection="ltr"
maxFontSizeMultiplier="1.5"
textDecorationLineType="underline"
>
https://react.dev
@@ -45,6 +49,7 @@ exports[`LogBoxMessage Should handle truncated links 1`] = `
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -53,6 +58,7 @@ exports[`LogBoxMessage Should handle truncated links 1`] = `
isHighlighted="false"
isPressable="true"
layoutDirection="ltr"
maxFontSizeMultiplier="1.5"
textDecorationLineType="underline"
>
https://reactnative.dev
@@ -60,6 +66,7 @@ exports[`LogBoxMessage Should handle truncated links 1`] = `
<rn-text
allowFontScaling="true"
layoutDirection="ltr"
maxFontSizeMultiplier="1.5"
>
and https:/
</rn-text>
@@ -73,6 +80,7 @@ exports[`LogBoxMessage Should make links tappable 1`] = `
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
<rn-text
@@ -81,6 +89,7 @@ exports[`LogBoxMessage Should make links tappable 1`] = `
isHighlighted="false"
isPressable="true"
layoutDirection="ltr"
maxFontSizeMultiplier="1.5"
textDecorationLineType="underline"
>
https://reactnative.dev
@@ -96,6 +105,7 @@ exports[`LogBoxMessage Should strip "TransformError " without breaking substitut
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
normal
@@ -106,6 +116,7 @@ exports[`LogBoxMessage Should strip "TransformError " without breaking substitut
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
substitution
@@ -116,6 +127,7 @@ exports[`LogBoxMessage Should strip "TransformError " without breaking substitut
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
normal
@@ -130,6 +142,7 @@ exports[`LogBoxMessage should render a plaintext message and clean the content 1
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1"
overflow="hidden"
>
This should not start with Error:
@@ -143,6 +156,7 @@ exports[`LogBoxMessage should render a plaintext message with no substitutions 1
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1"
overflow="hidden"
>
normal substitution normal
@@ -156,6 +170,7 @@ exports[`LogBoxMessage should render message 1`] = `
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Some kind of message
@@ -169,6 +184,7 @@ exports[`LogBoxMessage should render message truncated to 6 chars 1`] = `
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Some
@@ -183,6 +199,7 @@ exports[`LogBoxMessage should render message with substitution 1`] = `
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
normal
@@ -193,6 +210,7 @@ exports[`LogBoxMessage should render message with substitution 1`] = `
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
substitution
@@ -203,6 +221,7 @@ exports[`LogBoxMessage should render message with substitution 1`] = `
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
normal
@@ -217,6 +236,7 @@ exports[`LogBoxMessage should render message with substitution, truncating the f
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
nor
@@ -231,6 +251,7 @@ exports[`LogBoxMessage should render message with substitution, truncating the s
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
normal
@@ -241,6 +262,7 @@ exports[`LogBoxMessage should render message with substitution, truncating the s
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
substi
@@ -256,6 +278,7 @@ exports[`LogBoxMessage should render message with substitution, truncating the t
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
normal
@@ -266,6 +289,7 @@ exports[`LogBoxMessage should render message with substitution, truncating the t
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
substitution
@@ -276,6 +300,7 @@ exports[`LogBoxMessage should render message with substitution, truncating the t
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
no
@@ -290,6 +315,7 @@ exports[`LogBoxMessage should render the whole message when maxLength = message
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
Some kind of message
@@ -304,6 +330,7 @@ exports[`LogBoxMessage should render the whole message with substitutions when m
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
normal
@@ -314,6 +341,7 @@ exports[`LogBoxMessage should render the whole message with substitutions when m
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
substitution
@@ -324,6 +352,7 @@ exports[`LogBoxMessage should render the whole message with substitutions when m
fontSize="NaN"
fontSizeMultiplier="NaN"
foregroundColor="rgba(0, 0, 0, 0)"
maxFontSizeMultiplier="1.5"
overflow="hidden"
>
normal
@@ -10,7 +10,7 @@ exports[`LogBoxNotification should render log 1`] = `
width="100%"
>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
backgroundColor="rgba(51, 51, 51, 1)"
height="48"
@@ -39,6 +39,7 @@ exports[`LogBoxNotification should render log 1`] = `
fontWeight="600"
foregroundColor="rgba(255, 255, 255, 1)"
lineHeight="18"
maxFontSizeMultiplier="1"
nativeID="logbox_notification_count_text"
overflow="hidden"
textShadowColor="rgba(51, 51, 51, 0.4)"
@@ -61,6 +62,7 @@ exports[`LogBoxNotification should render log 1`] = `
fontSizeMultiplier="NaN"
foregroundColor="rgba(255, 255, 255, 1)"
lineHeight="22"
maxFontSizeMultiplier="1"
maximumNumberOfLines="1"
nativeID="logbox_notification_message_text"
overflow="hidden"
@@ -70,12 +72,13 @@ exports[`LogBoxNotification should render log 1`] = `
foregroundColor="rgba(255, 255, 255, 1)"
layoutDirection="ltr"
lineHeight="22"
maxFontSizeMultiplier="1"
>
Some kind of message
</rn-text>
</rn-paragraph>
<rn-view
accessibilityState="{disabled:false,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:false,selected:null,checked:None,busy:false,expanded:null}"
accessible="true"
alignItems="center"
alignSelf="flex-end"
@@ -609,7 +609,7 @@ describe('<Text>', () => {
expect(
root.getRenderedOutput({props: ['accessibilityState']}).toJSX(),
).toEqual(
<rn-paragraph accessibilityState="{disabled:true,selected:false,checked:None,busy:false,expanded:null}">
<rn-paragraph accessibilityState="{disabled:true,selected:null,checked:None,busy:false,expanded:null}">
{TEST_TEXT}
</rn-paragraph>,
);
@@ -818,7 +818,7 @@ describe('<Text>', () => {
expect(root.getRenderedOutput({props: PRESS_PROPS}).toJSX())
.toMatchInlineSnapshot(`
<rn-paragraph
accessibilityState="{disabled:true,selected:false,checked:None,busy:false,expanded:null}"
accessibilityState="{disabled:true,selected:null,checked:None,busy:false,expanded:null}"
>
the text
</rn-paragraph>
@@ -60,7 +60,7 @@ inline static bool operator==(const AccessibilityAction &lhs, const Accessibilit
struct AccessibilityState {
bool disabled{false};
bool selected{false};
std::optional<bool> selected{std::nullopt};
bool busy{false};
std::optional<bool> expanded{std::nullopt};
enum CheckedState { Unchecked, Checked, Mixed, None };
@@ -29,7 +29,10 @@ static AccessibilityTraits deriveAccessibilityTraits(
}
const auto state = accessibilityState.value_or(AccessibilityState{});
if (state.selected) {
// `selected` is optional: an unset value means the component is not
// selectable at all, which is distinct from an explicit `false`. Neither
// contributes the Selected trait, so both coalesce to `false` here.
if (state.selected.value_or(false)) {
traits = traits | AccessibilityTraits::Selected;
}
if (state.disabled) {
@@ -418,7 +418,13 @@ inline static void updateAccessibilityStateProp(
}
if (!oldState.has_value() || newState->selected != oldState->selected) {
resultState["selected"] = newState->selected;
// Omitting the key when `selected` is unset is what tells the platform the
// component is not selectable. BaseViewManager#setViewState falls back to
// `setSelected(false)` for an absent key, so the rendered result is
// unchanged from when this was a plain `bool`.
if (newState->selected.has_value()) {
resultState["selected"] = newState->selected.value();
}
}
if (!oldState.has_value() || newState->busy != oldState->busy) {
@@ -118,4 +118,71 @@ TEST(AccessibilityPropsTest, inherits_role_traits_when_raw_props_are_absent) {
EXPECT_TRUE(hasTrait(props.accessibilityTraits, AccessibilityTraits::Button));
}
// `selected` is tri-state. A host platform needs to tell "this component is
// selectable and currently unselected" (explicit `false`) apart from "this
// component is not selectable at all" (unset), because the two map to
// different accessibility APIs. Windows, for example, only implements
// ISelectionItemProvider for the former.
// See: github.com/facebook/react-native/issues/46988
TEST(
AccessibilityPropsTest,
keeps_unset_selected_distinct_from_explicit_false) {
auto unset = parse(
folly::dynamic::object("accessibilityState", folly::dynamic::object()));
auto explicitlyFalse = parse(
folly::dynamic::object(
"accessibilityState", folly::dynamic::object("selected", false)));
auto explicitlyTrue = parse(
folly::dynamic::object(
"accessibilityState", folly::dynamic::object("selected", true)));
ASSERT_TRUE(unset.accessibilityState.has_value());
ASSERT_TRUE(explicitlyFalse.accessibilityState.has_value());
ASSERT_TRUE(explicitlyTrue.accessibilityState.has_value());
EXPECT_FALSE(unset.accessibilityState->selected.has_value());
EXPECT_EQ(explicitlyFalse.accessibilityState->selected, std::optional(false));
EXPECT_EQ(explicitlyTrue.accessibilityState->selected, std::optional(true));
}
TEST(AccessibilityPropsTest, omitted_state_leaves_selected_unset) {
auto props = parse(folly::dynamic::object("nativeID", "abc"));
EXPECT_FALSE(props.accessibilityState.has_value());
}
// Props diffing drives mounting, so the two states must not compare equal —
// otherwise toggling between them would never reach the host view.
TEST(AccessibilityPropsTest, unset_and_explicitly_false_selected_differ) {
auto unset = AccessibilityState{};
auto explicitlyFalse = AccessibilityState{.selected = false};
EXPECT_FALSE(unset == explicitlyFalse);
}
// Guards the silent-conversion hazard: `std::optional<bool>` is contextually
// convertible to `bool`, so a bare `if (state.selected)` still compiles but
// tests engagement rather than value. That would apply the Selected trait to
// an explicitly unselected component.
TEST(AccessibilityPropsTest, explicitly_false_selected_omits_selected_trait) {
auto props = parse(
folly::dynamic::object("role", "button")(
"accessibilityState", folly::dynamic::object("selected", false)));
EXPECT_TRUE(hasTrait(props.accessibilityTraits, AccessibilityTraits::Button));
EXPECT_FALSE(
hasTrait(props.accessibilityTraits, AccessibilityTraits::Selected));
}
TEST(AccessibilityPropsTest, unset_selected_omits_selected_trait) {
auto props = parse(
folly::dynamic::object("role", "button")(
"accessibilityState", folly::dynamic::object()));
EXPECT_TRUE(hasTrait(props.accessibilityTraits, AccessibilityTraits::Button));
EXPECT_FALSE(
hasTrait(props.accessibilityTraits, AccessibilityTraits::Selected));
}
} // namespace facebook::react
@@ -6752,9 +6752,9 @@ struct facebook::react::AccessibilityLabelledBy {
struct facebook::react::AccessibilityState {
public bool busy;
public bool disabled;
public bool selected;
public facebook::react::AccessibilityState::CheckedState checked;
public std::optional<bool> expanded;
public std::optional<bool> selected;
}
enum facebook::react::AccessibilityState::CheckedState {
@@ -6562,9 +6562,9 @@ struct facebook::react::AccessibilityLabelledBy {
struct facebook::react::AccessibilityState {
public bool busy;
public bool disabled;
public bool selected;
public facebook::react::AccessibilityState::CheckedState checked;
public std::optional<bool> expanded;
public std::optional<bool> selected;
}
enum facebook::react::AccessibilityState::CheckedState {
@@ -6743,9 +6743,9 @@ struct facebook::react::AccessibilityLabelledBy {
struct facebook::react::AccessibilityState {
public bool busy;
public bool disabled;
public bool selected;
public facebook::react::AccessibilityState::CheckedState checked;
public std::optional<bool> expanded;
public std::optional<bool> selected;
}
enum facebook::react::AccessibilityState::CheckedState {
@@ -8920,9 +8920,9 @@ struct facebook::react::AccessibilityLabelledBy {
struct facebook::react::AccessibilityState {
public bool busy;
public bool disabled;
public bool selected;
public facebook::react::AccessibilityState::CheckedState checked;
public std::optional<bool> expanded;
public std::optional<bool> selected;
}
enum facebook::react::AccessibilityState::CheckedState {
@@ -8762,9 +8762,9 @@ struct facebook::react::AccessibilityLabelledBy {
struct facebook::react::AccessibilityState {
public bool busy;
public bool disabled;
public bool selected;
public facebook::react::AccessibilityState::CheckedState checked;
public std::optional<bool> expanded;
public std::optional<bool> selected;
}
enum facebook::react::AccessibilityState::CheckedState {
@@ -8911,9 +8911,9 @@ struct facebook::react::AccessibilityLabelledBy {
struct facebook::react::AccessibilityState {
public bool busy;
public bool disabled;
public bool selected;
public facebook::react::AccessibilityState::CheckedState checked;
public std::optional<bool> expanded;
public std::optional<bool> selected;
}
enum facebook::react::AccessibilityState::CheckedState {
@@ -5073,9 +5073,9 @@ struct facebook::react::AccessibilityLabelledBy {
struct facebook::react::AccessibilityState {
public bool busy;
public bool disabled;
public bool selected;
public facebook::react::AccessibilityState::CheckedState checked;
public std::optional<bool> expanded;
public std::optional<bool> selected;
}
enum facebook::react::AccessibilityState::CheckedState {
@@ -4923,9 +4923,9 @@ struct facebook::react::AccessibilityLabelledBy {
struct facebook::react::AccessibilityState {
public bool busy;
public bool disabled;
public bool selected;
public facebook::react::AccessibilityState::CheckedState checked;
public std::optional<bool> expanded;
public std::optional<bool> selected;
}
enum facebook::react::AccessibilityState::CheckedState {
@@ -5064,9 +5064,9 @@ struct facebook::react::AccessibilityLabelledBy {
struct facebook::react::AccessibilityState {
public bool busy;
public bool disabled;
public bool selected;
public facebook::react::AccessibilityState::CheckedState checked;
public std::optional<bool> expanded;
public std::optional<bool> selected;
}
enum facebook::react::AccessibilityState::CheckedState {