Skip to content

Commit

Permalink
refactor: Reduce server log verbosity (#53268)
Browse files Browse the repository at this point in the history
* refactor: Remove unsupported line height Aztec warning

While arguably educational, this warning increases the amount of noise
within the server log, which can make it difficult to debug errors,
warnings, or intentionally logged values.

* refactor: Remove Hermes engine status log

While informative, this un-filterable log increases the amount of noise
in the server log, which can make it difficult to debug errors,
warnings, or intentionally logged values. Additionally, the Hermes
engine is now globally enabled for both iOS and Android.

* refactor: Remove outdated LogBox configuration for LayoutAnimation

This warning appears to no longer occur, presumably thanks to:

#52563

* refactor: Remove outdated LogBox configuration for gesture handler

This warning appears to no longer occur. The configuration was
originally added in: a1b11c5
  • Loading branch information
dcalhoun authored Aug 3, 2023
1 parent b56fadd commit 1f1bcfb
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 23 deletions.
3 changes: 0 additions & 3 deletions packages/react-native-aztec/src/AztecView.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,6 @@ class AztecView extends Component {

if ( style.hasOwnProperty( 'lineHeight' ) ) {
delete style.lineHeight;
window.console.warn(
"Removing lineHeight style as it's not supported by native AztecView"
);
// Prevents passing line-height within styles to avoid a crash due to values without units
// We now support this but passing line-height as a prop instead.
}
Expand Down
19 changes: 0 additions & 19 deletions packages/react-native-editor/src/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,6 @@ import setupApiFetch from './api-fetch-setup';
const reactNativeSetup = () => {
LogBox.ignoreLogs( [
'Require cycle:', // TODO: Refactor to remove require cycles
'lineHeight', // TODO: Remove lineHeight warning from Aztec
/**
* TODO: Migrate to @gorhom/bottom-sheet or replace usage of
* LayoutAnimation to Animated. KeyboardAvoidingView's usage of
* LayoutAnimation collides with both BottomSheet and NavigationContainer
* usage of LayoutAnimation simultaneously https://github.com/facebook/react-native/issues/12663,
* https://github.com/facebook/react-native/issues/10606
*/
'Overriding previous layout animation',
] );

// "@react-navigation" package uses the old API of gesture handler,
// so the warning will be silenced until it gets updated.
LogBox.ignoreLogs( [
"[react-native-gesture-handler] Seems like you're using an old API with gesture components, check out new Gestures system!",
] );

I18nManager.forceRTL( false ); // Change to `true` to debug RTL layout easily.
Expand All @@ -50,10 +35,6 @@ const gutenbergSetup = () => {

setupApiFetch();

const isHermes = () => global.HermesInternal !== null;
// eslint-disable-next-line no-console
console.log( 'Hermes is: ' + isHermes() );

setupInitHooks();
};

Expand Down
1 change: 0 additions & 1 deletion packages/react-native-editor/src/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ describe( 'Register Gutenberg', () => {
registerCoreBlocksCallOrder
);
expect( callbackCallOrder ).toBeLessThan( onRenderEditorCallOrder );
expect( console ).toHaveLoggedWith( 'Hermes is: true' );

initializeEditorMock.mockRestore();
} );
Expand Down

0 comments on commit 1f1bcfb

Please sign in to comment.