Skip to content

Commit c012b2f

Browse files
committed
chore: created tickets to replace todos
1 parent 67f853d commit c012b2f

File tree

9 files changed

+29
-26
lines changed

9 files changed

+29
-26
lines changed

android/src/main/java/com/iterable/reactnative/RNIterableAPIModule.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public void initializeWithApiKey(String apiKey, ReadableMap configReadableMap, S
101101

102102
IterableApi.getInstance().getInAppManager().addListener(this);
103103

104-
// TODO: Figure out what the error cases are and handle them appropriately
104+
// MOB-10421: Figure out what the error cases are and handle them appropriately
105105
// This is just here to match the TS types and let the JS thread know when we are done initializing
106106
promise.resolve(true);
107107
}
@@ -592,7 +592,7 @@ public String onAuthTokenRequested() {
592592
@Override
593593
public void onTokenRegistrationSuccessful(String authToken) {
594594
IterableLogger.v(TAG, "authToken successfully set");
595-
//TODO: Pass successhandler to event listener
595+
// MOB-10422: Pass successhandler to event listener
596596
sendEvent(EventName.handleAuthSuccessCalled.name(), null);
597597
}
598598

example/src/hooks/useIterableApp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export const IterableAppProvider: FunctionComponent<
128128
const routeNames = [Route.Commerce, Route.Inbox, Route.User];
129129
for (const route of routeNames) {
130130
if (url.includes(route.toLowerCase())) {
131-
// TODO: Figure out typing for this
131+
// [MOB-10418](https://iterable.atlassian.net/browse/MOB-10418): Figure out typing for this
132132
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
133133
// @ts-ignore
134134
navigation.navigate(route);
@@ -184,7 +184,7 @@ export const IterableAppProvider: FunctionComponent<
184184
.finally(() => {
185185
// For some reason, ios is throwing an error on initialize.
186186
// To temporarily fix this, we're using the finally block to login.
187-
// TODO: Find out why initialize is throwing an error on ios
187+
// MOB-10419: Find out why initialize is throwing an error on ios
188188
setIsInitialized(true);
189189
if (getUserId()) {
190190
login();

src/core/classes/Iterable.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ import { IterableLogger } from './IterableLogger';
2525
const RNIterableAPI = NativeModules.RNIterableAPI;
2626
const RNEventEmitter = new NativeEventEmitter(RNIterableAPI);
2727

28+
/* eslint-disable tsdoc/syntax */
2829
/**
29-
* @hideconstructor
3030
* The main class for the Iterable React Native SDK.
3131
*
3232
* The majority of the high-level functionality can be accomplished through the
@@ -42,6 +42,7 @@ const RNEventEmitter = new NativeEventEmitter(RNIterableAPI);
4242
* // OR
4343
* Iterable.setUserId('myUserId');
4444
*/
45+
/* eslint-enable tsdoc/syntax */
4546
export class Iterable {
4647
/**
4748
* Manager for in app messages
@@ -225,7 +226,7 @@ export class Iterable {
225226
* ## Registering device token:
226227
*
227228
* If `IterableConfig.autoPushRegisteration` is set to `true`, calling
228-
* setUserI`d automatically registers the device for push notifications and
229+
* `setUserId` automatically registers the device for push notifications and
229230
* sends the `deviceId` and token to Iterable.
230231
*
231232
* ## Optional JWT token parameter:
@@ -745,8 +746,8 @@ export class Iterable {
745746
/**
746747
* tsdoc/syntax needs to be disabled as it conflicts with the mermaid syntax.
747748
* unfortunately, disabling it inline does not appear to work.
748-
* eslint-disable tsdoc/syntax
749749
*/
750+
/* eslint-disable tsdoc/syntax */
750751
/**
751752
* Handle a universal link.
752753
*
@@ -819,6 +820,7 @@ export class Iterable {
819820
* }
820821
* ```
821822
*/
823+
/* eslint-enable tsdoc/syntax */
822824
static handleAppLink(link: string): Promise<boolean> {
823825
Iterable.logger.log('handleAppLink');
824826

@@ -941,8 +943,7 @@ export class Iterable {
941943
IterableEventName.handleInAppCalled,
942944
(messageDict) => {
943945
const message = IterableInAppMessage.fromDict(messageDict);
944-
// TODO: Check if we can use chain operator (?.) here instead
945-
946+
// MOB-10423: Check if we can use chain operator (?.) here instead
946947
const result = Iterable.savedConfig.inAppHandler!(message);
947948
RNIterableAPI.setInAppShowResponse(result);
948949
}
@@ -952,7 +953,7 @@ export class Iterable {
952953
if (Iterable.savedConfig.authHandler) {
953954
let authResponseCallback: IterableAuthResponseResult;
954955
RNEventEmitter.addListener(IterableEventName.handleAuthCalled, () => {
955-
// TODO: Check if we can use chain operator (?.) here instead
956+
// MOB-10423: Check if we can use chain operator (?.) here instead
956957

957958
Iterable.savedConfig.authHandler!()
958959
.then((promiseResult) => {
@@ -1008,7 +1009,7 @@ export class Iterable {
10081009
}
10091010

10101011
function callUrlHandler(url: string, context: IterableActionContext) {
1011-
// TODO: Figure out if this is purposeful
1012+
// MOB-10424: Figure out if this is purposeful
10121013
// eslint-disable-next-line eqeqeq
10131014
if (Iterable.savedConfig.urlHandler?.(url, context) == false) {
10141015
Linking.canOpenURL(url)
@@ -1027,7 +1028,7 @@ export class Iterable {
10271028
/**
10281029
* Retrieves the version number from the package.json file.
10291030
*
1030-
* @returns {string} The version number as specified in the package.json file.
1031+
* @returns The version number as specified in the package.json file.
10311032
*
10321033
* @internal
10331034
*/

src/core/hooks/useDeviceOrientation.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export interface IterableDeviceOrientation {
1313
isPortrait: boolean;
1414
}
1515

16+
/* eslint-disable tsdoc/syntax */
1617
/**
1718
* Custom hook to get the current device orientation.
1819
*
@@ -28,14 +29,15 @@ export interface IterableDeviceOrientation {
2829
* The `useEffect` hook only includes `width` in its dependency array. This is because the height and width are typically updated together,
2930
* and including only `width` prevents unnecessary re-renders.
3031
*/
32+
/* eslint-enable tsdoc/syntax */
3133
export function useDeviceOrientation(): IterableDeviceOrientation {
3234
const { height, width } = useWindowDimensions();
3335

3436
const [isPortrait, setIsPortrait] = useState<boolean>(height >= width);
3537

3638
useEffect(() => {
3739
setIsPortrait(height >= width);
38-
// TODO: why is height not included in the dependency array?
40+
// MOB-10425: why is height not included in the dependency array?
3941
// eslint-disable-next-line react-hooks/exhaustive-deps
4042
}, [width]);
4143

src/inApp/classes/IterableInAppMessage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export class IterableInAppMessage {
155155
*/
156156
isSilentInbox(): boolean {
157157
return (
158-
// TODO: Figure out if this is purposeful
158+
// MOB-10424: Figure out if this is purposeful
159159
// eslint-disable-next-line eqeqeq
160160
this.saveToInbox && this.trigger.type == IterableInAppTriggerType.never
161161
);
@@ -199,7 +199,7 @@ export class IterableInAppMessage {
199199
messageId,
200200
campaignId,
201201
trigger,
202-
// TODO: Speak to the team about `IterableInAppMessage` requiring a date
202+
// MOB-10426: Speak to the team about `IterableInAppMessage` requiring a date
203203
// object, but being passed a number in this case
204204
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
205205
// @ts-ignore

src/inbox/classes/IterableInboxDataModel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,13 @@ export class IterableInboxDataModel {
258258
): IterableInAppMessage[] {
259259
let sortedFilteredMessages = messages.slice();
260260

261-
// TODO: Figure out if this is purposeful
261+
// MOB-10424: Figure out if this is purposeful
262262
// eslint-disable-next-line eqeqeq
263263
if (this.filterFn != undefined) {
264264
sortedFilteredMessages = sortedFilteredMessages.filter(this.filterFn);
265265
}
266266

267-
// TODO: Figure out if this is purposeful
267+
// MOB-10424: Figure out if this is purposeful
268268
// eslint-disable-next-line eqeqeq
269269
if (this.comparatorFn != undefined) {
270270
sortedFilteredMessages.sort(this.comparatorFn);

src/inbox/components/IterableInbox.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ export const IterableInbox = ({
273273
removeInboxChangedListener();
274274
inboxDataModel.endSession(visibleMessageImpressions);
275275
};
276-
// TODO: figure out if missing dependency is a bug
276+
// MOB-10427: figure out if missing dependency is a bug
277277
// eslint-disable-next-line react-hooks/exhaustive-deps
278278
}, []);
279279

@@ -290,7 +290,7 @@ export const IterableInbox = ({
290290
inboxDataModel.endSession(visibleMessageImpressions);
291291
}
292292
}
293-
// TODO: figure out if missing dependency is a bug
293+
// MOB-10427: figure out if missing dependency is a bug
294294
// eslint-disable-next-line react-hooks/exhaustive-deps
295295
}, [appState]);
296296

@@ -304,14 +304,14 @@ export const IterableInbox = ({
304304
inboxDataModel.endSession(visibleMessageImpressions);
305305
}
306306
}
307-
// TODO: figure out if missing dependency is a bug
307+
// MOB-10427: figure out if missing dependency is a bug
308308
// eslint-disable-next-line react-hooks/exhaustive-deps
309309
}, [isFocused]);
310310

311311
//updates the visible rows when visible messages changes
312312
useEffect(() => {
313313
inboxDataModel.updateVisibleRows(visibleMessageImpressions);
314-
// TODO: figure out if missing dependency is a bug
314+
// MOB-10427: figure out if missing dependency is a bug
315315
// eslint-disable-next-line react-hooks/exhaustive-deps
316316
}, [visibleMessageImpressions]);
317317

@@ -320,7 +320,7 @@ export const IterableInbox = ({
320320
if (isMessageDisplay) {
321321
returnToInbox();
322322
}
323-
// TODO: figure out if missing dependency is a bug
323+
// MOB-10427: figure out if missing dependency is a bug
324324
// eslint-disable-next-line react-hooks/exhaustive-deps
325325
}, [returnToInboxTrigger]);
326326

@@ -364,7 +364,7 @@ export const IterableInbox = ({
364364
setSelectedRowViewModelIdx(index);
365365

366366
Iterable.trackInAppOpen(
367-
// TODO: Have a safety check for models[index].inAppMessage
367+
// MOB-10428: Have a safety check for models[index].inAppMessage
368368
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
369369
// @ts-ignore
370370
models[index].inAppMessage,
@@ -477,7 +477,7 @@ export const IterableInbox = ({
477477

478478
const inboxAnimatedView = (
479479
<Animated.View
480-
// TODO: Change to use `StyleSheet.create` for styles, per best practices
480+
// MOB-10429: Change to use `StyleSheet.create` for styles, per best practices
481481
// eslint-disable-next-line react-native/no-inline-styles
482482
style={{
483483
transform: [

src/inbox/components/IterableInboxMessageCell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ function defaultMessageListLayout(
152152
>
153153
{thumbnailURL ? (
154154
<Image
155-
// TODO: Use stylesheet according to best practices
155+
// MOB-10429: Use stylesheet according to best practices
156156
// eslint-disable-next-line react-native/no-inline-styles
157157
style={{ height: 80, width: 80 }}
158158
source={{ uri: thumbnailURL }}

src/inbox/components/IterableInboxMessageList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export const IterableInboxMessageList = ({
119119

120120
updateVisibleMessageImpressions(rowInfos);
121121
},
122-
// TODO: Figure out if we need the missing dependencies
122+
// MOB-10427: Figure out if we need the missing dependencies
123123
// eslint-disable-next-line react-hooks/exhaustive-deps
124124
[]
125125
);

0 commit comments

Comments
 (0)