-
Notifications
You must be signed in to change notification settings - Fork 9
RD-T43 Expo 56, Livekit 2.10 and Gluestack v5 update #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| const AndroidImportance = { | ||
| DEFAULT: 3, | ||
| HIGH: 4, | ||
| LOW: 2, | ||
| MIN: 1, | ||
| NONE: 0, | ||
| }; | ||
|
|
||
| const notifee = { | ||
| registerForegroundService: () => {}, | ||
| createChannel: async () => 'mock-channel-id', | ||
| displayNotification: async () => 'mock-notification-id', | ||
| stopForegroundService: async () => undefined, | ||
| }; | ||
|
|
||
| module.exports = { default: notifee, AndroidImportance }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,84 @@ | ||
| module.exports = require('react-native-gesture-handler/src/mocks.js'); | ||
| // Manual Jest mock for react-native-gesture-handler. | ||
| // RNGH 2.28 no longer ships src/mocks.js (the library mocks moved to | ||
| // src/mocks/mocks), so re-export them and add the named exports the app | ||
| // imports (ScrollView, GestureHandlerRootView, Gesture, GestureDetector). | ||
| /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
| const RN = require('react-native'); | ||
| const libraryMocks = require('react-native-gesture-handler/src/mocks/mocks'); | ||
| const { State } = require('react-native-gesture-handler/src/State'); | ||
| const { Directions } = require('react-native-gesture-handler/src/Directions'); | ||
|
|
||
| // Chainable no-op gesture builder (Gesture.Pan().onStart(...).onEnd(...) etc.) | ||
| const createChainableGesture = (): any => { | ||
| const gesture: any = {}; | ||
| const chainableMethods = [ | ||
| 'onBegin', | ||
| 'onStart', | ||
| 'onUpdate', | ||
| 'onChange', | ||
| 'onEnd', | ||
| 'onFinalize', | ||
| 'onTouchesDown', | ||
| 'onTouchesMove', | ||
| 'onTouchesUp', | ||
| 'onTouchesCancelled', | ||
| 'enabled', | ||
| 'shouldCancelWhenOutside', | ||
| 'hitSlop', | ||
| 'activeOffsetX', | ||
| 'activeOffsetY', | ||
| 'failOffsetX', | ||
| 'failOffsetY', | ||
| 'minDistance', | ||
| 'minPointers', | ||
| 'maxPointers', | ||
| 'minDuration', | ||
| 'maxDuration', | ||
| 'maxDelay', | ||
| 'numberOfTaps', | ||
| 'maxDistance', | ||
| 'runOnJS', | ||
| 'simultaneousWithExternalGesture', | ||
| 'requireExternalGestureToFail', | ||
| 'blocksExternalGesture', | ||
| 'withRef', | ||
| 'withTestId', | ||
| ]; | ||
| chainableMethods.forEach((method) => { | ||
| gesture[method] = () => gesture; | ||
| }); | ||
| return gesture; | ||
| }; | ||
|
|
||
| const Gesture = { | ||
| Pan: createChainableGesture, | ||
| Tap: createChainableGesture, | ||
| Pinch: createChainableGesture, | ||
| Rotation: createChainableGesture, | ||
| Fling: createChainableGesture, | ||
| LongPress: createChainableGesture, | ||
| Native: createChainableGesture, | ||
| Manual: createChainableGesture, | ||
| Hover: createChainableGesture, | ||
| ForceTouch: createChainableGesture, | ||
| Simultaneous: (...gestures: any[]) => gestures[0], | ||
| Exclusive: (...gestures: any[]) => gestures[0], | ||
| Race: (...gestures: any[]) => gestures[0], | ||
| }; | ||
|
|
||
| module.exports = { | ||
| ...libraryMocks.default, | ||
| RawButton: libraryMocks.RawButton, | ||
| BaseButton: libraryMocks.BaseButton, | ||
| RectButton: libraryMocks.RectButton, | ||
| BorderlessButton: libraryMocks.BorderlessButton, | ||
| // Named exports used by the app that the library mocks omit | ||
| GestureHandlerRootView: RN.View, | ||
| ScrollView: RN.ScrollView, | ||
| RefreshControl: RN.RefreshControl, | ||
| Gesture, | ||
| GestureDetector: ({ children }: { children?: any }) => children ?? null, | ||
| gestureHandlerRootHOC: (component: any) => component, | ||
| State, | ||
| Directions, | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,6 +49,29 @@ ipcRenderer.on('notification:push', (_event, payload) => { | |
| } | ||
| }); | ||
|
|
||
| // ── Expose deep-link bridge ──────────────────────────────────────────── | ||
| // Lets the renderer subscribe to deep-link URLs (resgriddispatch://...) | ||
| // forwarded by the main process from second-instance / open-url events. | ||
| contextBridge.exposeInMainWorld('electronDeepLinks', { | ||
| /** | ||
| * Register a callback that fires when the main process forwards a | ||
| * deep-link URL to the renderer. | ||
| * @param {(url: string) => void} callback | ||
| * @returns {() => void} unsubscribe function that removes the listener | ||
| */ | ||
| onDeepLink: (callback) => { | ||
| const handler = (_event, deepLinkUrl) => { | ||
| try { | ||
| callback(deepLinkUrl); | ||
| } catch (err) { | ||
| console.error('Error in deep-link callback:', err); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unstructured error logging detected in the Kody rule violation: Include error context in structured logs Prompt for LLMTalk to Kody by mentioning @kody Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unstructured logging in the catch block bypasses centralized logging and violates Rule [3] by omitting required structured fields. Replace Kody rule violation: Include error context in structured logs Prompt for LLMTalk to Kody by mentioning @kody Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction. |
||
| } | ||
| }; | ||
| ipcRenderer.on('deep-link', handler); | ||
| return () => ipcRenderer.removeListener('deep-link', handler); | ||
| }, | ||
| }); | ||
|
|
||
| // ── Version information (original preload logic) ─────────────────────── | ||
| window.addEventListener('DOMContentLoaded', () => { | ||
| const replaceText = (selector, text) => { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String concatenation operator used to assemble the prefix string. Refactor to use a template literal (e.g.,
${deepLinkScheme.toLowerCase()}://) for improved readability and fewer errors.Kody rule violation: Use Template Literals Instead of String Concatenation
Prompt for LLM
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.