Skip to content

CI: Warning related to use of deprecated <SafeAreaView> React Native component #14835

@personalizedrefrigerator

Description

Current behavior

Currently, several warnings similar to the following are logged while running tests in packages/app-mobile:

    console.warn                                                                                                                              
      SafeAreaView has been deprecated and will be removed in a future release. Please use 'react-native-safe-area-context' instead. See https
://github.com/th3rdwave/react-native-safe-area-context                                                                                        
                                                                                                                                              
      176 |     it('should show the currently selected note', async () => {                                                                   
      177 |             await openNewNote({ title: 'Test note (title)', body: '# Testing...' });                                              
    > 178 |             const { unmount } = render(<WrappedNoteScreen />);                                                                    
          |                                       ^                                                                                           
      179 |                                                                                                                                   
      180 |             const titleInput = await screen.findByDisplayValue('Test note (title)');                                              
      181 |             expect(titleInput).toBeVisible();                                                                                     
                                                                                                                                              
      at warn (node_modules/react-native/Libraries/Utilities/warnOnce.js:27:11)                                                               
      at Object.warnOnce [as SafeAreaView] (node_modules/react-native/index.js:92:5)                                                          
      at MenuProvider.SafeAreaView [as render] (node_modules/react-native-popup-menu/src/MenuProvider.js:228:13)                              
      at Object.render [as react_stack_bottom_frame] (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:13989:29)       
      at callRenderInDEV (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:6554:25)                                    
      at updateClassComponent (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:7488:13)                               
      at callback (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:1574:13)                                           
      at runWithFiberInDEV (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:10980:22)                                 
      at performUnitOfWork (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:10816:41)                                 
      at workLoopSync (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:10797:11)                                      
      at renderRootSync (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:10349:13)                                    
      at performWorkOnRoot (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:2094:7)
      at callback (node_modules/react/cjs/react.development.js:566:34)
      at flushActQueue (node_modules/react/cjs/react.development.js:860:10)
      at actImplementation (node_modules/@testing-library/react-native/src/act.ts:31:25)
      at renderWithAct (node_modules/@testing-library/react-native/src/render-act.ts:13:11)
      at renderInternal (node_modules/@testing-library/react-native/src/render.tsx:69:33)
      at renderInternal (node_modules/@testing-library/react-native/src/render.tsx:44:10)
      at Object.<anonymous> (components/screens/Note/Note.test.tsx:178:29)

Expected behavior

<SafeAreaView>-related warnings should not be logged while running tests.

It should be possible to fix this by upgrading react-native-popup-menu (see instea/react-native-popup-menu@2ec80a8).

  • Note: Joplin currently patches react-native-popup-menu to improve its accessibility. The patch will need to be migrated and the migration will need to be tested with a screen reader.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIt's a bugciRelated to Joplin's automated update/build (continuous integration)mediumMedium priority issuesmobileAll mobile platforms

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions