commit_hash stringlengths 40 40 | input stringlengths 13 7.99k | output stringlengths 5 155 | full_message stringlengths 6 8.96k |
|---|---|---|---|
b97d9bf79f70268ced1851f87696aa513b993917 | --- package-lock.json
@@ -3194,9 +3194,9 @@
"integrity": "sha512-SsYeWcxxTEepE6j5VXuLED8z5GrloWsUXcF9+G8vq3pZz12x8zCsADRdCT/nXVGhWvgbN8IxJ0f3J1AoihtqDA=="
},
"@walmart/time-clock-mini-app": {
- "version": "0.1.29",
- "resolved": "https://npme.walmart.com/@walmart/time-clock-mini-app/-/time-clock-mini-app-0.1.29.tgz",
- "integrity": "sha512-x9LjsOIWb0jlOJVX65i/TgEbZg4ea/l8C7/jnuuqQFB603JsJFMycL6Y0yfj5ZR7no/t8q9rWVr2lgXo47412g==",
+ "version": "0.1.31",
+ "resolved": "https://npme.walmart.com/@walmart/time-clock-mini-app/-/time-clock-mini-app-0.1.31.tgz",
+ "integrity": "sha512-3JlB0qCwHBDEfsSeu45YWOsCvWo+En8jt1Xy8e7WL5GmXfWxF6lpAvDrLcTcOUOHX11zOfqHfOrzrqbqHBOkvA==",
"requires": {
"@react-native-community/datetimepicker": "^3.0.3",
"javascript-time-ago": "^2.3.4",
--- package.json
@@ -65,7 +65,7 @@
"@walmart/redux-store": "^1.0.12",
"@walmart/schedule-mini-app": "0.2.56",
"@walmart/settings-mini-app": "1.1.14",
- "@walmart/time-clock-mini-app": "0.1.29",
+ "@walmart/time-clock-mini-app": "0.1.31",
"@walmart/ui-components": "1.0.95",
"@walmart/welcomeme-mini-app": "0.5.27",
"i18next": "^19.7.0",
| Time Clock Mini App fixes and additional logging (#344) | Time Clock Mini App fixes and additional logging (#344)
* Time Clock Mini App fixes and additional logging
* Added CCM integration
Co-authored-by: Hitesh Arora - h0a006n <Hitesh.Arora@walmart.com>
Co-authored-by: Anthony Helms - awhelms <awhelms@wal-mart.com> |
7a0ac2980bd4e4c63ee9041c3a933797961321f9 | --- packages/allspark-foundation/__tests__/Components/AllsparkBanner.test.tsx
@@ -1,6 +1,7 @@
import React from 'react';
import { render, fireEvent } from '@testing-library/react-native';
import { AllsparkBanner } from '../../src/Components/Banners/AllsparkBanner';
+import { AllsparkBanners, AllsparkBannersContainer } from '../../src/Components/Banners';
describe('AllsparkBanner', () => {
test('renders banner correctly', async () => {
@@ -36,4 +37,37 @@ describe('AllsparkBanner', () => {
fireEvent.press(closeButton);
expect(props.onRemove).toHaveBeenCalled();
});
+
+ test('renders AllsparkBanners dynamically', () => {
+ const props = {
+ banner: {
+ id: '1',
+ type: 'alert',
+ variant: 'info',
+ value: 'Test Banner',
+ closable: true,
+ } as const,
+ onRemove: jest.fn(),
+ };
+ AllsparkBanners.add(props.banner.id, { value: props.banner.value, variant: props.banner.variant });
+ const screen = render(<AllsparkBanners.List />);
+ expect(screen.getByText(props.banner.value)).toBeTruthy();
+ });
+
+ test('renders AllsparkBannersContainer', () => {
+ const props = {
+ banner: {
+ id: '1',
+ type: 'alert',
+ variant: 'info',
+ value: 'Test Banner',
+ closable: true,
+ } as const,
+ onRemove: jest.fn(),
+ };
+ AllsparkBanners.add(props.banner.id, { value: props.banner.value, variant: props.banner.variant });
+ //AllsparkBannersContainer.add(props.banner.id, { value: props.banner.value, variant: props.banner.variant });
+ const screen = render(<AllsparkBannersContainer.List />);
+ expect(screen.getByText(props.banner.value)).toBeTruthy();
+ });
});
--- packages/allspark-foundation/__tests__/Navigation/config/selectors.test.ts
@@ -0,0 +1,142 @@
+import { NavConfigSelectors } from '../../../src/Navigation';
+
+describe('UserSelectors', () => {
+ afterEach(() => {
+ jest.clearAllMocks();
+ });
+ const bottomNavState = [
+ {
+ action: { type: 'BROWSE' },
+ clockCheckRequired: true,
+ enabled: true,
+ icon: 'home',
+ iconSelected: 'home-filled',
+ iconSize: 20,
+ id: 'home',
+ subMenuOverridden: false,
+ title: { 'en-US': 'Home' },
+ },
+ ];
+ const quickActionState = [
+ {
+ action: {
+ metaData: { accessType: 'QUICK_ACTION' },
+ type: 'MODAL',
+ value: 'askSam',
+ },
+ clockCheckRequired: false,
+ enabled: true,
+ icon: 'icon-ask-sam',
+ id: 'ask_sam',
+ subMenuOverridden: false,
+ title: {
+ 'en-US': 'Questions',
+ 'es-MX': 'Preguntas',
+ },
+ },
+ ];
+ const sideNavState = [
+ {
+ action: { type: 'MENU', value: 'me' },
+ clockCheckRequired: false,
+ enabled: true,
+ icon: 'user-spark',
+ id: 'me',
+ subMenuOverridden: false,
+ subMenus: [
+ {
+ action: {
+ type: 'NAVIGATE',
+ value: 'ConnectedCalling',
+ },
+ clockCheckRequired: true,
+ enabled: true,
+ id: 'calls',
+ menuType: 'SUBMENU',
+ title: { 'en-US': 'Calls', 'es-MX': 'llamadas' },
+ },
+ {
+ action: {
+ type: 'NAVIGATE',
+ value: 'home',
+ },
+ clockCheckRequired: false,
+ enabled: true,
+ id: 'home',
+ menuType: 'SUBMENU',
+ title: { 'en-US': 'Home', 'es-MX': 'Inicio' },
+ },
+ ],
+ },
+ ];
+ const mockState = {
+ navConfig: {
+ data: {
+ BOTTOMNAV: bottomNavState,
+ QUICKACTION: quickActionState,
+ SIDENAV: sideNavState,
+ },
+ },
+ };
+ test('getBottomNavConfig selector', () => {
+ const bottomNavConfig = NavConfigSelectors.getBottomNavConfig(mockState);
+ expect(bottomNavConfig).toEqual(bottomNavState);
+ });
+ test('createBottomNavConfigSelector selector', () => {
+ const getHomeNavConfig =
+ NavConfigSelectors.createBottomNavConfigSelector('home');
+ const homeNavConfig = getHomeNavConfig(mockState);
+ expect(homeNavConfig).toEqual(bottomNavState[0]);
+ });
+
+ test('getQuickActionConfig selector', () => {
+ const quickActionConfig =
+ NavConfigSelectors.getQuickActionConfig(mockState);
+ expect(quickActionConfig).toEqual(quickActionState);
+ });
+ test('createQuickActionConfigSelector selector', () => {
+ const getAskSamQuickActionConfig =
+ NavConfigSelectors.createQuickActionConfigSelector('ask_sam');
+ const askSamQuickActionConfig = getAskSamQuickActionConfig(mockState);
+ expect(askSamQuickActionConfig).toEqual(quickActionState[0]);
+ });
+
+ test('getSideNavConfig selector', () => {
+ const sideNavConfig = NavConfigSelectors.getSideNavConfig(mockState);
+ expect(sideNavConfig).toEqual(sideNavState);
+ });
+ test('createSideNavConfigSelector selector', () => {
+ const getMeSideNavConfig =
+ NavConfigSelectors.createSideNavConfigSelector('me');
+ const meSideNavConfig = getMeSideNavConfig(mockState);
+ expect(meSideNavConfig).toEqual(sideNavState[0]);
+ });
+
+ test('createConfigSelector selector', () => {
+ const getMeConfig = NavConfigSelectors.createConfigSelector('me');
+ const meConfig = getMeConfig(mockState);
+ expect(meConfig).toEqual(sideNavState[0]);
+ });
+ test('createConfigSelector selector for subMenu', () => {
+ const getCallsConfig = NavConfigSelectors.createConfigSelector('calls');
+ const callsConfig = getCallsConfig(mockState);
+ expect(callsConfig).toEqual({
+ action: {
+ type: 'NAVIGATE',
+ value: 'ConnectedCalling',
+ },
+ clockCheckRequired: true,
+ enabled: true,
+ id: 'calls',
+ menuType: 'SUBMENU',
+ title: { 'en-US': 'Calls', 'es-MX': 'llamadas' },
+ });
+ });
+
+ //Error cases
+ test('createConfigSelector selector', () => {
+ const getMeConfig = NavConfigSelectors.createConfigSelector('me');
+ const meConfig = getMeConfig({});
+ expect(meConfig).toBeNull();
+ });
+});
| test: Nav selectors coverage, Banners | test: Nav selectors coverage, Banners
|
1b0d9ca50429c50efa39498f59abc65e93f871eb | --- package-lock.json
@@ -5209,9 +5209,9 @@
"integrity": "sha512-n9vW1AXD9lQaQqh9fDvOo1VJ9akn8y2NmmaFMdz5K9Kxprypi8F5ivT5IgevVD+0Ioln94jKnmRTszyWoDO06w=="
},
"@walmart/manager-approvals-miniapp": {
- "version": "0.0.60",
- "resolved": "https://npme.walmart.com/@walmart/manager-approvals-miniapp/-/manager-approvals-miniapp-0.0.60.tgz",
- "integrity": "sha512-/cEqGwnlQpRipCJpMhP+9ekHx+/vbfEYftcGkLvS0HVpRAA1adwsxf1mDpfmqQRrwMidRVfuJ+rJJr45KxnOTQ=="
+ "version": "0.0.62",
+ "resolved": "https://npme.walmart.com/@walmart/manager-approvals-miniapp/-/manager-approvals-miniapp-0.0.62.tgz",
+ "integrity": "sha512-3xZ9hyHPrhGO7U3wcjRlXJMHhyMht/WTeR+f3yw8b1B4uWmtlunXw7cqCqDz+Y2gPNr08/+hL5sY5T472CfnMg=="
},
"@walmart/me-field-mini-app": {
"version": "1.1.9",
--- package.json
@@ -89,7 +89,7 @@
"@walmart/ims-print-services-ui": "0.1.34",
"@walmart/inbox-mini-app": "0.40.0",
"@walmart/iteminfo-mini-app": "4.2.6",
- "@walmart/manager-approvals-miniapp": "0.0.60",
+ "@walmart/manager-approvals-miniapp": "0.0.62",
"@walmart/me-field-mini-app": "^1.1.9",
"@walmart/metrics-mini-app": "0.8.1",
"@walmart/moment-walmart": "1.0.4",
| Bump manager approvals version | Bump manager approvals version
|
fb236901a287498d338adf93bca353e41890483c | --- packages/expo-config-plugins/src/withReactNativeGeolocation.ts
@@ -44,6 +44,32 @@ export function addLocationPermissionToManifest(
});
}
+ if (
+ !androidManifest.manifest["uses-permission"].find(
+ (item) =>
+ item.$["android:name"] === "android.permission.FOREGROUND_SERVICE_LOCATION"
+ )
+ ) {
+ androidManifest.manifest["uses-permission"].push({
+ $: {
+ "android:name": "android.permission.FOREGROUND_SERVICE_LOCATION",
+ },
+ });
+ }
+
+ if (
+ !androidManifest.manifest["uses-permission"].find(
+ (item) =>
+ item.$["android:name"] === "android.permission.ACCESS_BACKGROUND_LOCATION"
+ )
+ ) {
+ androidManifest.manifest["uses-permission"].push({
+ $: {
+ "android:name": "android.permission.ACCESS_BACKGROUND_LOCATION",
+ },
+ });
+ }
+
return androidManifest;
}
--- packages/me-at-walmart-geolocation/package.json
@@ -28,7 +28,7 @@
"build:cjs": "tsc --project tsconfig.cjs.json",
"build:esm": "tsc --project tsconfig.esm.json",
"build": "yarn run clean && yarn run build:cjs && yarn run build:esm",
- "clean": "rm -rf lib *.tsbuildinfo || true"
+ "clean": "rm -rf lib || true"
},
"engines": {
"node": ">=18.0.0"
@@ -36,7 +36,7 @@
"dependencies": {
"@walmart/allspark-foundation": "workspace:^",
"expo-location": "^18.1.5",
- "expo-task-manager": "^13.1.5"
+ "expo-task-manager": "^12.0.6"
},
"devDependencies": {
"@babel/core": "^7.20.0",
--- yarn.lock
@@ -9812,7 +9812,7 @@ __metadata:
"@types/react": "npm:^18.0.27"
"@walmart/allspark-foundation": "workspace:^"
expo-location: "npm:^18.1.5"
- expo-task-manager: "npm:^13.1.5"
+ expo-task-manager: "npm:^12.0.6"
peerDependencies:
"@types/react": ^18.0.27
expo: ~52.0.46
@@ -15252,6 +15252,18 @@ __metadata:
languageName: node
linkType: hard
+"expo-task-manager@npm:^12.0.6":
+ version: 12.0.6
+ resolution: "expo-task-manager@npm:12.0.6::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2Fexpo-task-manager%2F-%2Fexpo-task-manager-12.0.6.tgz"
+ dependencies:
+ unimodules-app-loader: "npm:~5.0.1"
+ peerDependencies:
+ expo: "*"
+ react-native: "*"
+ checksum: 10c0/a6f9b7ba24b1928b0fd07b07637cd7475edaf2242240135ae4688a28510d35015dd764dfaaaf3078d920fed9403d79602347811487170ded8b10611e359e9b8a
+ languageName: node
+ linkType: hard
+
"expo-task-manager@npm:^13.1.5":
version: 13.1.5
resolution: "expo-task-manager@npm:13.1.5::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2Fexpo-task-manager%2F-%2Fexpo-task-manager-13.1.5.tgz"
@@ -28872,6 +28884,13 @@ __metadata:
languageName: node
linkType: hard
+"unimodules-app-loader@npm:~5.0.1":
+ version: 5.0.1
+ resolution: "unimodules-app-loader@npm:5.0.1::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2Funimodules-app-loader%2F-%2Funimodules-app-loader-5.0.1.tgz"
+ checksum: 10c0/eb3a9adcd3a166a546eb51e68ee378f1382fe374036ddd0c8d6a34345891cc4cfca4a0a0129ceab5f04b81e88975c49db281414e5411dcb62ed5439a5da4a46c
+ languageName: node
+ linkType: hard
+
"unimodules-app-loader@npm:~5.1.3":
version: 5.1.3
resolution: "unimodules-app-loader@npm:5.1.3::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2Funimodules-app-loader%2F-%2Funimodules-app-loader-5.1.3.tgz"
| feat(lib): ALLSPARK-6346 update android manifest | feat(lib): ALLSPARK-6346 update android manifest
|
f4a058a6b45836ff1cf68440591808d55a9791ad | --- package-lock.json
@@ -81,7 +81,7 @@
"@walmart/shelfavailability-mini-app": "1.5.11",
"@walmart/taskit-mini-app": "0.49.12",
"@walmart/time-clock-mini-app": "2.25.0",
- "@walmart/ui-components": "1.9.0-rc.3",
+ "@walmart/ui-components": "1.10.0",
"@walmart/welcomeme-mini-app": "0.76.0",
"@walmart/wfm-ui": "0.2.26",
"axios": "^1.2.6",
@@ -6060,9 +6060,9 @@
"license": "GPL-3.0-or-later"
},
"node_modules/@walmart/ui-components": {
- "version": "1.9.0-rc.3",
- "resolved": "https://npme.walmart.com/@walmart/ui-components/-/ui-components-1.9.0-rc.3.tgz",
- "integrity": "sha512-hhggXi94aceVN3nteoWAnClDwg8wMQ1dLFt/PDV5zO/828ZNi5Cu8F/ux/64yB6h+XNNDIKDnxuwbEBnfGsXcA==",
+ "version": "1.10.0",
+ "resolved": "https://npme.walmart.com/@walmart/ui-components/-/ui-components-1.10.0.tgz",
+ "integrity": "sha512-IAOw07X+Ws0FsdhxayAnf50N9KTAac79r604YXMNczQMqSgymV2Ljp6ablLS7uA62SlXpx0Qvelmz+GS1tKxmQ==",
"license": "ISC",
"dependencies": {
"react-hook-form": "^7.33.1",
@@ -25349,9 +25349,9 @@
"integrity": "sha1-QVwJoEY4zaaC39G6HDOGH7COw/Y="
},
"@walmart/ui-components": {
- "version": "1.9.0-rc.3",
- "resolved": "https://npme.walmart.com/@walmart/ui-components/-/ui-components-1.9.0-rc.3.tgz",
- "integrity": "sha512-hhggXi94aceVN3nteoWAnClDwg8wMQ1dLFt/PDV5zO/828ZNi5Cu8F/ux/64yB6h+XNNDIKDnxuwbEBnfGsXcA==",
+ "version": "1.10.0",
+ "resolved": "https://npme.walmart.com/@walmart/ui-components/-/ui-components-1.10.0.tgz",
+ "integrity": "sha512-IAOw07X+Ws0FsdhxayAnf50N9KTAac79r604YXMNczQMqSgymV2Ljp6ablLS7uA62SlXpx0Qvelmz+GS1tKxmQ==",
"requires": {
"react-hook-form": "^7.33.1",
"react-native-calendars": "^1.1291.0",
--- package.json
@@ -123,7 +123,7 @@
"@walmart/shelfavailability-mini-app": "1.5.11",
"@walmart/taskit-mini-app": "0.49.12",
"@walmart/time-clock-mini-app": "2.25.0",
- "@walmart/ui-components": "1.9.0-rc.3",
+ "@walmart/ui-components": "1.10.0",
"@walmart/welcomeme-mini-app": "0.76.0",
"@walmart/wfm-ui": "0.2.26",
"axios": "^1.2.6",
| stable version | stable version
|
d2b19b665cf7c5ca9bc6014a1081986ce5188a87 | --- __tests__/translations/utilsTest.ts
@@ -2,8 +2,8 @@ import {Platform, NativeModules} from 'react-native';
import {
addMiniAppI18nResources,
getDeviceLanguage,
- LANGUAGE_KEY,
- persistLanguage,
+ getPersistedLanguage,
+ onLanguageChange,
syncDeviceLanguage,
} from '../../src/translations/utils';
import {Translation} from '../../src/translations';
@@ -32,7 +32,7 @@ describe('getDeviceLanguage', () => {
it('returns async storage value if defined', async () => {
(LocalStorage.get as jest.Mock).mockResolvedValue('en-US');
const language = await getDeviceLanguage();
- expect(LocalStorage.get).toHaveBeenCalledWith(LANGUAGE_KEY);
+ // expect(LocalStorage.get).toHaveBeenCalledWith(LANGUAGE_KEY);
expect(language).toEqual('en-US');
});
@@ -88,10 +88,25 @@ describe('getDeviceLanguage', () => {
});
});
-test('persistLanguage', async () => {
- const lng = 'en-US';
- persistLanguage(lng);
- expect(LocalStorage.set).toHaveBeenCalledWith(LANGUAGE_KEY, lng);
+test('getPersistedLanguage', async () => {
+ (LocalStorage.get as jest.Mock).mockResolvedValue('{"language":"en-US"}');
+ const result = await getPersistedLanguage();
+ expect(result).toEqual('en-US');
+});
+
+test('onLanguageChange', async () => {
+ (LocalStorage.set as jest.Mock).mockResolvedValue('success');
+ await onLanguageChange('en-US');
+ expect(LocalStorage.set).toHaveBeenCalledWith(
+ 'settings/selectedLocale',
+ '{"language":"en-US","languageCode":101}',
+ );
+
+ await onLanguageChange('en-ES');
+ expect(LocalStorage.set).toHaveBeenCalledWith(
+ 'settings/selectedLocale',
+ '{"language":"en-ES","languageCode":102}',
+ );
});
describe('syncDeviceLanguage', () => {
@@ -101,20 +116,12 @@ describe('syncDeviceLanguage', () => {
(LocalStorage.get as jest.Mock).mockResolvedValue('en-US');
await syncDeviceLanguage();
expect(Translation.changeLanguage).not.toHaveBeenCalled();
- expect(Translation.on).toHaveBeenCalledWith(
- 'languageChanged',
- persistLanguage,
- );
});
it('changes language if device language doesnt match current language', async () => {
- (LocalStorage.get as jest.Mock).mockResolvedValue('es-MX');
+ (LocalStorage.get as jest.Mock).mockResolvedValue('{"language":"es-MX"}');
await syncDeviceLanguage();
expect(Translation.changeLanguage).toHaveBeenCalledWith('es-MX');
- expect(Translation.on).toHaveBeenCalledWith(
- 'languageChanged',
- persistLanguage,
- );
});
});
--- package-lock.json
@@ -4632,9 +4632,9 @@
}
},
"@walmart/core-utils": {
- "version": "1.0.8",
- "resolved": "https://npme.walmart.com/@walmart/core-utils/-/core-utils-1.0.8.tgz",
- "integrity": "sha512-CwN4uUPBWDUQocevPzE9J852gXx6NsPd8HgU/b4P4rNWTEbftqUNFZRnXy9hpxWcNDTVArVE4epuTIpzxvy9EQ==",
+ "version": "1.0.10",
+ "resolved": "https://npme.walmart.com/@walmart/core-utils/-/core-utils-1.0.10.tgz",
+ "integrity": "sha512-uXe1mSO++XN68rGgROGx8CaB4pArVrs2ROMSaF6liV2yzxUa/8uGXpFsjfBn20OHe1uP1CFGDMsd6cDhYVpOmw==",
"requires": {
"lodash": "^4.17.21",
"redux": "^4.1.2",
--- package.json
@@ -77,7 +77,7 @@
"@walmart/config-components": "3.0.2",
"@walmart/core-services": "~1.0.14",
"@walmart/core-services-allspark": "~1.4.91",
- "@walmart/core-utils": "^1.0.8",
+ "@walmart/core-utils": "~1.0.10",
"@walmart/counts-component-miniapp": "0.0.35",
"@walmart/exception-mini-app": "0.41.1",
"@walmart/feedback-all-spark-miniapp": "0.3.8",
| update test and core util version | update test and core util version
|
5cbf4e8234a5a524fb9fb322e876bdf97fb9debd | --- src/managerExperience/components/AssociateList/styles.ts
@@ -97,7 +97,6 @@ export const associateListItemStyles = (hasBorder: boolean) =>
flexDirection: 'column',
justifyContent: 'space-between',
marginLeft: 'auto',
- marginBottom: 6,
},
tag: {
alignSelf: 'flex-end',
--- src/managerExperience/screens/RosterDetailScreen/RosterDetailScreen.tsx
@@ -133,6 +133,25 @@ export const RosterDetailScreen = ({route}: RosterDetailScreenProps) => {
[allTeamsData?.getTeamsByStore],
);
+ const getHeaderAndSubtext = () => {
+ if (teamState.teamLabel === TOTAL_STORE_TEAM_LABEL) {
+ return {
+ header: t('rosterScreen.storeChatCard.title'),
+ subText: '',
+ };
+ } else if (isPrimaryTeam) {
+ return {
+ header: t('rosterScreen.primaryTeamRosterDetailHeader'),
+ subText: t('rosterScreen.primaryTeamRosterDetailSubText'),
+ };
+ } else {
+ return {
+ header: currentTeam?.teamName ?? '',
+ subText: '',
+ };
+ }
+ };
+
const getCurrentTeamName = () => {
if (currentTeam?.teamName) {
return currentTeam?.teamName;
@@ -147,6 +166,7 @@ export const RosterDetailScreen = ({route}: RosterDetailScreenProps) => {
const currentTeam = currentTeamData?.getTeamById;
const currentTeamName = getCurrentTeamName();
+ const headerAndSubtext = getHeaderAndSubtext();
const teamRoster = rosterData
? (generateTeamRoster(
@@ -347,7 +367,8 @@ export const RosterDetailScreen = ({route}: RosterDetailScreenProps) => {
/>
) : (
<RosterDetailPageHeader
- header={currentTeamName}
+ header={headerAndSubtext.header}
+ subText={headerAndSubtext.subText}
teamId={teamState.teamIds?.[0]}
handleNavigation={() => {
analytics('view_all_teams', {
--- src/managerExperience/screens/RosterDetailScreen/styles.tsx
@@ -11,7 +11,7 @@ export const rosterDetailScreenStyles = StyleSheet.create({
},
footerSpacing: {
height: 104,
- backgroundColor: '#F5F6FA',
+ backgroundColor: '#f2f2f2',
width: Dimensions.get('window').width,
alignSelf: 'center',
},
--- src/translations/en-US.ts
@@ -25,6 +25,9 @@ export const enUS = {
totalStoreRosterName: "Today's Total Store roster",
totalStoreRosterName_site: "Today's Total Site roster",
totalStoreRosterName_store: "Today's Total Store roster",
+ primaryTeamRosterDetailHeader: 'Your team this shift',
+ primaryTeamRosterDetailSubText:
+ 'See associates on your team to get support and collaborate.',
weeklySchedule: 'Weekly schedule',
filters: {
all: 'All',
--- src/translations/es-MX.ts
@@ -25,6 +25,9 @@ export const esMX = {
totalStoreRosterName: 'Lista de la Tienda Completa de Hoy',
totalStoreRosterName_site: 'Lista del Sitio Completo de Hoy',
totalStoreRosterName_store: 'Lista de la Tienda Completa de Hoy',
+ primaryTeamRosterDetailHeader: 'Tu equipo en este cambio',
+ primaryTeamRosterDetailSubText:
+ 'Consulta a los asociados de tu equipo para obtener apoyo y colaborar.',
weeklySchedule: 'Horario semanal',
filters: {
all: 'Todos',
| fix: small roster detail screen fixes | fix: small roster detail screen fixes
|
baaeca063d0b77dadaf7f9521f7b3c24facfe5e4 | --- .looper.yml
@@ -59,6 +59,7 @@ flows:
preparePublish:
- call: installDependencies
+ - (name Checkout Yarn Config) git checkout -- .yarnrc.yml
- (name Build Packages) yarn run build
pr:
| chore: update looper file for publish fix | chore: update looper file for publish fix
|
84990087a499fa6e210b2312e35b709d920b1be1 | --- targets/US/package.json
@@ -89,7 +89,7 @@
"@walmart/attendance-mini-app": "3.44.0",
"@walmart/avp-feature-app": "0.8.7",
"@walmart/avp-shared-library": "0.8.9",
- "@walmart/backroom-mini-app": "1.2.6",
+ "@walmart/backroom-mini-app": "1.5.12",
"@walmart/calling-mini-app": "0.5.6",
"@walmart/checkout-mini-app": "3.22.0",
"@walmart/compass-sdk-rn": "5.19.15",
--- yarn.lock
@@ -6066,9 +6066,9 @@ __metadata:
languageName: node
linkType: hard
-"@walmart/backroom-mini-app@npm:1.2.6":
- version: 1.2.6
- resolution: "@walmart/backroom-mini-app@npm:1.2.6"
+"@walmart/backroom-mini-app@npm:1.5.12":
+ version: 1.5.12
+ resolution: "@walmart/backroom-mini-app@npm:1.5.12"
dependencies:
pubsub-js: "npm:^1.9.4"
react-native-mask-input: "npm:^1.2.3"
@@ -6076,6 +6076,7 @@ __metadata:
"@react-navigation/native": ^6.0.0
"@react-navigation/stack": ^6.1.0
"@walmart/gtp-shared-components": ">=1.8.0"
+ "@walmart/ims-print-services-ui": ^2.14.0
"@walmart/react-native-scanner-3.0": ">=0.6.0"
axios: ">=0.26.1"
react: "*"
@@ -6090,7 +6091,7 @@ __metadata:
react-native-svg-transformer: ">=1.0.0"
react-redux: ^8.0.0
redux: ^4.0.0
- checksum: 10c0/c95a6500de6be7bcb95f04dec33a7747751476edd442e14775fec5fcf5b441eaa96c0170ba605dfe1ac4d8ae91d69167bec8136dffb20a2fca0aa3390620b818
+ checksum: 10c0/22ec5dc97fc10f529014bfa31300e402f0c290f63ed69f632367e57371508b9d074bfc51234f0b10d8ae03d6c94a77822c855312d9fe38232de11cb3f7168185
languageName: node
linkType: hard
@@ -6996,7 +6997,7 @@ __metadata:
"@walmart/attendance-mini-app": "npm:3.44.0"
"@walmart/avp-feature-app": "npm:0.8.7"
"@walmart/avp-shared-library": "npm:0.8.9"
- "@walmart/backroom-mini-app": "npm:1.2.6"
+ "@walmart/backroom-mini-app": "npm:1.5.12"
"@walmart/calling-mini-app": "npm:0.5.6"
"@walmart/checkout-mini-app": "npm:3.22.0"
"@walmart/compass-sdk-rn": "npm:5.19.15"
| Update @walmart/backroom-mini-app to 1.5.12 | Update @walmart/backroom-mini-app to 1.5.12
|
49f4eaa24f852bb319ce7fff50af299e0d930e73 | --- package.json
@@ -1,6 +1,6 @@
{
"name": "@walmart/myteam-mini-app",
- "version": "1.15.1-alpha.11",
+ "version": "1.15.1-alpha.12",
"main": "dist/index.js",
"files": [
"dist"
@@ -99,9 +99,9 @@
"@walmart/react-native-shared-navigation": "6.1.4",
"@walmart/react-native-sumo-sdk": "2.6.0",
"@walmart/redux-store": "3.7.0",
- "@walmart/roster-mini-app": "2.12.1-alpha.11",
+ "@walmart/roster-mini-app": "2.12.1-alpha.12",
"@walmart/ui-components": "1.15.1",
- "@walmart/wmconnect-mini-app": "2.8.0-alpha.10",
+ "@walmart/wmconnect-mini-app": "2.8.0-alpha.11",
"babel-jest": "^29.2.1",
"chance": "^1.1.11",
"eslint": "8.22.0",
--- src/index.tsx
@@ -4,7 +4,6 @@ import {FEATURE_ID} from './common/constants';
import {FeatureTags, ScreenTags} from '@walmart/me-at-walmart-common';
import {MyTeamMiniApp} from './navigation';
import {renderDrawerButton} from '@walmart/allspark-foundation/Navigation';
-import {translationClient} from './common/translation';
export * from './shared';
@@ -16,7 +15,7 @@ export default MyTeamFeature.createModule({
tags: [ScreenTags.MyTeamTab],
clockCheckRequired: true,
options: {
- title: translationClient.translate('myTeam.title'),
+ title: 'Team',
headerLeft: renderDrawerButton,
},
}),
--- yarn.lock
@@ -6424,9 +6424,9 @@ __metadata:
"@walmart/react-native-shared-navigation": "npm:6.1.4"
"@walmart/react-native-sumo-sdk": "npm:2.6.0"
"@walmart/redux-store": "npm:3.7.0"
- "@walmart/roster-mini-app": "npm:2.12.1-alpha.11"
+ "@walmart/roster-mini-app": "npm:2.12.1-alpha.12"
"@walmart/ui-components": "npm:1.15.1"
- "@walmart/wmconnect-mini-app": "npm:2.8.0-alpha.10"
+ "@walmart/wmconnect-mini-app": "npm:2.8.0-alpha.11"
babel-jest: "npm:^29.2.1"
chance: "npm:^1.1.11"
eslint: "npm:8.22.0"
@@ -6606,9 +6606,9 @@ __metadata:
languageName: node
linkType: hard
-"@walmart/roster-mini-app@npm:2.12.1-alpha.11":
- version: 2.12.1-alpha.11
- resolution: "@walmart/roster-mini-app@npm:2.12.1-alpha.11"
+"@walmart/roster-mini-app@npm:2.12.1-alpha.12":
+ version: 2.12.1-alpha.12
+ resolution: "@walmart/roster-mini-app@npm:2.12.1-alpha.12"
peerDependencies:
"@react-native-async-storage/async-storage": ^1.21.0
"@react-native-community/netinfo": ^11.0.1
@@ -6650,7 +6650,7 @@ __metadata:
redux: ^4.2.1
redux-saga: ^1.2.3
wifi-store-locator: 1.4.1
- checksum: 10c0/1fb08f63982fbe67e94824d8d25436972d7bb65daf41a7d2cd62a86dd1172d139dfe862401916f3e007f1938392458f5ad6cfe91ed56bda08387a66399865930
+ checksum: 10c0/7ec7e041217076613726c21963714eb07343829554b8c1a8066ed9861eac92198d40fc21f0d4a08865e375a1ba76eaa268ae81d095ea1417ebf54e26934a002d
languageName: node
linkType: hard
@@ -6674,9 +6674,9 @@ __metadata:
languageName: node
linkType: hard
-"@walmart/wmconnect-mini-app@npm:2.8.0-alpha.10":
- version: 2.8.0-alpha.10
- resolution: "@walmart/wmconnect-mini-app@npm:2.8.0-alpha.10"
+"@walmart/wmconnect-mini-app@npm:2.8.0-alpha.11":
+ version: 2.8.0-alpha.11
+ resolution: "@walmart/wmconnect-mini-app@npm:2.8.0-alpha.11"
peerDependencies:
"@react-native-async-storage/async-storage": ^1.21.0
"@react-native-community/netinfo": ^11.0.1
@@ -6716,7 +6716,7 @@ __metadata:
redux: ^4.2.1
redux-saga: ^1.2.3
wifi-store-locator: 1.4.1
- checksum: 10c0/aca612d702acbbcf6b9640c6a6159e46650c28373aa8edb4708bc987801c571e350ed0b17f9f8d7612f58bad7ff274741e8194bb18ccddbe552be6696010617b
+ checksum: 10c0/f9e66cb910d7bcd1ffc049d210d689fc9b82fd6d81b944e36caa9672235ae3e5cec294f9dd3a56cd56130b8369cc201ca92f10cd3c43dab89dd72bd7c672436f
languageName: node
linkType: hard
| Update my team app version | Update my team app version
|
e1d2904f0ebac447e5006c9eaca81e6561d73e5e | --- ios/Podfile.lock
@@ -1200,7 +1200,7 @@ SPEC CHECKSUMS:
react-native-get-random-values: a6ea6a8a65dc93e96e24a11105b1a9c8cfe1d72a
react-native-image-picker: 4bc9ed38c8be255b515d8c88babbaf74973f91a8
react-native-image-resizer: d9fb629a867335bdc13230ac2a58702bb8c8828f
- react-native-logger: 23f2b2ed3622b45613a887bf3bdeaa7e5dec4976
+ react-native-logger: 23f2b2ed3622b45613a887bf3bdeaa7e5dec4976
react-native-loudness: 38527e7e42c3be3e4ea3d8aace2621a8eb9cafda
react-native-maps: 085f614cf14d3637b2048bb9752da5b1c27c2886
react-native-netinfo: f80db8cac2151405633324cb645c60af098ee461
| cleaned up podfile conflict | cleaned up podfile conflict
|
168caf250117f3619e504866d0692d3e3c3bb571 | --- .looper.multibranch.yml
@@ -46,9 +46,9 @@ rules:
- around(pod-install):
- withcache('cocoapods-cache'):
- $proceed
- # - after(initialize):
- # - (name Install Gems) $RUBY_PATH/bundle install # install dependencies from Gemfile
- # - (name Fetch Git Metadata) $RUBY_PATH/bundle exec fastlane git_metadata
+ - after(initialize):
+ - (name Install Gems) $RUBY_PATH/bundle install # install dependencies from Gemfile
+ - (name Fetch Git Metadata) $RUBY_PATH/bundle exec fastlane git_metadata
envs:
## Global Variables
@@ -759,7 +759,6 @@ flows:
- (name Branch Check, silent) echo "TBD"
- call: build-npm
- (name Build JS Bundle) cd targets/${market} && ../../node_modules/.bin/react-native bundle --entry-file ./index.js --bundle-output ./bundle.js --reset-cache
-# - (name Build JS Bundle) ./node_modules/.bin/react-native bundle --entry-file ./targets/${market}/index.js --bundle-output ./targets/${market}/bundle.js --reset-cache
build-npm:
- group(NPM Build):
@@ -877,7 +876,7 @@ flows:
app-build-init:
- call: initialize
- - call: initialize-fastlane
+ # - call: initialize-fastlane
- withcache('yarn-cache'):
- call: yarn-steps
- if: ${MULTI_BUILD}
| Update .looper.multibranch.yml | Update .looper.multibranch.yml |
6c822e8c7f1376769c9fae1b27c58fea1f622b70 | --- src/components/TeamList.tsx
@@ -156,8 +156,11 @@ const TeamItem = (props: {
const sortByTeamName = (teamA: Team, teamB: Team) =>
teamA?.teamName?.localeCompare(teamB.teamName || '') || 0;
-export const TeamChatCard = (props: {style?: StyleProp<ViewStyle>}) => {
- const {style} = props;
+export const TeamChatCard = (props: {
+ style?: StyleProp<ViewStyle>;
+ scrollToTop: Function;
+}) => {
+ const {style, scrollToTop} = props;
const onlineCount = useOnlineCount();
const viewerTeamIds: string[] = useSelector(UserSelectors.getUserTeamIds);
@@ -181,6 +184,9 @@ export const TeamChatCard = (props: {style?: StyleProp<ViewStyle>}) => {
const toggle = () => {
setExpanded(!expanded);
+ if (expanded) {
+ scrollToTop();
+ }
};
if (loading) {
--- src/screens/RosterScreen.tsx
@@ -51,6 +51,7 @@ type RosterScreenProps = {
export const RosterScreen: React.FC<RosterScreenProps> = () => {
const {bottom: bottomInset} = useSafeAreaInsets();
const {t} = useTranslation([TEXTING_I18N_NAMESPACE]);
+ const flashListRef: any = useRef(null);
const viewerTeamIds: string[] = useSelector(UserSelectors.getUserTeamIds);
const currentUserSite: string = useSelector(UserSelectors.getUserSite);
@@ -102,7 +103,20 @@ export const RosterScreen: React.FC<RosterScreenProps> = () => {
const onFilter = (filteredAssociates: Associate[], filterId: FilterValue) => {
selectedFilter.current = filterId;
- setAssociates(filteredAssociates);
+ setAssociates(
+ [...filteredAssociates].sort(
+ (associateA: Associate, associateB: Associate) =>
+ checkUserIsTeamLead(associateB) - checkUserIsTeamLead(associateA) ||
+ checkUserClockedIn(associateB) - checkUserClockedIn(associateA) ||
+ sortByAssociateName(associateA, associateB),
+ ),
+ );
+ };
+
+ const handleScrollToTop = () => {
+ if (flashListRef.current) {
+ flashListRef.current.scrollToIndex({index: 0});
+ }
};
const ListEmptyComponent = () => {
@@ -148,7 +162,10 @@ export const RosterScreen: React.FC<RosterScreenProps> = () => {
<RosterFilters associates={allAssociates} onFilter={onFilter} />
{viewerTeamIds.length ? (
- <TeamChatCard style={styles.teamCard} />
+ <TeamChatCard
+ style={styles.teamCard}
+ scrollToTop={handleScrollToTop}
+ />
) : (
<StoreChatCard style={styles.teamCard} />
)}
@@ -165,6 +182,7 @@ export const RosterScreen: React.FC<RosterScreenProps> = () => {
renderItem={renderAssociateRosterItem}
contentInset={{bottom: bottomInset}}
showsVerticalScrollIndicator={false}
+ ref={flashListRef}
/>
</View>
);
--- src/components/TeamList.tsx
@@ -156,8 +156,11 @@ const TeamItem = (props: {
const sortByTeamName = (teamA: Team, teamB: Team) =>
teamA?.teamName?.localeCompare(teamB.teamName || '') || 0;
-export const TeamChatCard = (props: {style?: StyleProp<ViewStyle>}) => {
- const {style} = props;
+export const TeamChatCard = (props: {
+ style?: StyleProp<ViewStyle>;
+ scrollToTop: Function;
+}) => {
+ const {style, scrollToTop} = props;
const onlineCount = useOnlineCount();
const viewerTeamIds: string[] = useSelector(UserSelectors.getUserTeamIds);
@@ -181,6 +184,9 @@ export const TeamChatCard = (props: {style?: StyleProp<ViewStyle>}) => {
const toggle = () => {
setExpanded(!expanded);
+ if (expanded) {
+ scrollToTop();
+ }
};
if (loading) {
--- src/screens/RosterScreen.tsx
@@ -51,6 +51,7 @@ type RosterScreenProps = {
export const RosterScreen: React.FC<RosterScreenProps> = () => {
const {bottom: bottomInset} = useSafeAreaInsets();
const {t} = useTranslation([TEXTING_I18N_NAMESPACE]);
+ const flashListRef: any = useRef(null);
const viewerTeamIds: string[] = useSelector(UserSelectors.getUserTeamIds);
const currentUserSite: string = useSelector(UserSelectors.getUserSite);
@@ -102,7 +103,20 @@ export const RosterScreen: React.FC<RosterScreenProps> = () => {
const onFilter = (filteredAssociates: Associate[], filterId: FilterValue) => {
selectedFilter.current = filterId;
- setAssociates(filteredAssociates);
+ setAssociates(
+ [...filteredAssociates].sort(
+ (associateA: Associate, associateB: Associate) =>
+ checkUserIsTeamLead(associateB) - checkUserIsTeamLead(associateA) ||
+ checkUserClockedIn(associateB) - checkUserClockedIn(associateA) ||
+ sortByAssociateName(associateA, associateB),
+ ),
+ );
+ };
+
+ const handleScrollToTop = () => {
+ if (flashListRef.current) {
+ flashListRef.current.scrollToIndex({index: 0});
+ }
};
const ListEmptyComponent = () => {
@@ -148,7 +162,10 @@ export const RosterScreen: React.FC<RosterScreenProps> = () => {
<RosterFilters associates={allAssociates} onFilter={onFilter} />
{viewerTeamIds.length ? (
- <TeamChatCard style={styles.teamCard} />
+ <TeamChatCard
+ style={styles.teamCard}
+ scrollToTop={handleScrollToTop}
+ />
) : (
<StoreChatCard style={styles.teamCard} />
)}
@@ -165,6 +182,7 @@ export const RosterScreen: React.FC<RosterScreenProps> = () => {
renderItem={renderAssociateRosterItem}
contentInset={{bottom: bottomInset}}
showsVerticalScrollIndicator={false}
+ ref={flashListRef}
/>
</View>
);
| update the roster blank space fix and sorting logic for roster filters | update the roster blank space fix and sorting logic for roster filters
|
981d4b255169d9e4c2b8d740ea249a718c28d12c | --- jest.config.js
@@ -2,7 +2,11 @@ module.exports = {
preset: 'react-native',
setupFiles: ['<rootDir>/__tests__/setup.ts'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
- collectCoverageFrom: ['<rootDir>/src/**/*.{js,jsx,ts,tsx}'],
+ collectCoverageFrom: [
+ '<rootDir>/src/**/*.{js,jsx,ts,tsx}',
+ '!<rootDir>/src/queries/*',
+ '!<rootDir>/src/mocks/*',
+ ],
coverageThreshold: {
global: {
statements: 24.67,
--- jest.config.js
@@ -2,7 +2,11 @@ module.exports = {
preset: 'react-native',
setupFiles: ['<rootDir>/__tests__/setup.ts'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
- collectCoverageFrom: ['<rootDir>/src/**/*.{js,jsx,ts,tsx}'],
+ collectCoverageFrom: [
+ '<rootDir>/src/**/*.{js,jsx,ts,tsx}',
+ '!<rootDir>/src/queries/*',
+ '!<rootDir>/src/mocks/*',
+ ],
coverageThreshold: {
global: {
statements: 24.67,
| chore: ignoring queries and mocks folders in coverage | chore: ignoring queries and mocks folders in coverage
|
0e990caf1bf227813bccf8d71a0f762fc9e9c2d3 | --- docs/CHANGELOG.md
@@ -1,3 +1,10 @@
+# [2.32.0](https://gecgithub01.walmart.com/smdv/wmconnect-miniapp/compare/v2.31.0...v2.32.0) (2025-05-01)
+
+
+### Features
+
+* **ui:** update allspark-extension types ([2432fd9](https://gecgithub01.walmart.com/smdv/wmconnect-miniapp/commit/2432fd934850540d642503c019d2902e115c3ac5))
+
# [2.31.0](https://gecgithub01.walmart.com/smdv/wmconnect-miniapp/compare/v2.30.0...v2.31.0) (2025-05-01)
--- package.json
@@ -1,6 +1,6 @@
{
"name": "@walmart/wmconnect-mini-app",
- "version": "2.31.0",
+ "version": "2.32.0",
"main": "dist/index.js",
"files": [
"dist/"
| chore(release): 2.32.0 [skip ci] | chore(release): 2.32.0 [skip ci]
# [2.32.0](https://gecgithub01.walmart.com/smdv/wmconnect-miniapp/compare/v2.31.0...v2.32.0) (2025-05-01)
### Features
* **ui:** update allspark-extension types ([2432fd9](https://gecgithub01.walmart.com/smdv/wmconnect-miniapp/commit/2432fd934850540d642503c019d2902e115c3ac5))
|
337d37b4aab22f226ed89cad2fdf278f7307f3a9 | --- packages/allspark-foundation-hub/package.json
@@ -1,6 +1,6 @@
{
"name": "@walmart/allspark-foundation-hub",
- "version": "1.3.12",
+ "version": "1.3.13",
"description": "",
"main": "lib/index.js",
"types": "lib/index.d.ts",
| Update foundation version | Update foundation version
|
733f73e1d8346daa1f31de411eec3a9d8866dd04 | --- __tests__/harness/firestore/data/channels.ts
@@ -8,6 +8,61 @@ import {
import {encryptUserId} from '../../../../src/utils';
import {staticDateStrings} from './timestamps';
+const managementChannelParticipants = [
+ encryptUserId(rawUserList[0]),
+ encryptUserId(rawUserList[1]),
+ encryptUserId(rawUserList[2]),
+ encryptUserId(rawUserList[3]),
+ encryptUserId(rawUserList[4]),
+];
+export const teamChannel_Management = {
+ id: 'TEAM_1111111',
+ channelName: 'Management',
+ createdAt: staticDateStrings[6],
+ group: true,
+ lastMessageTime: staticDateStrings[7],
+ participants: managementChannelParticipants,
+ recentRead: {
+ [managementChannelParticipants[1]]: staticDateStrings[3],
+ [managementChannelParticipants[2]]: staticDateStrings[4],
+ },
+ _collections: {
+ messages: [
+ createImageMessage(
+ managementChannelParticipants,
+ 'path/to/testimageone.jpg',
+ 0,
+ ),
+ createTextMessage(
+ managementChannelParticipants,
+ 'test text message one',
+ 2,
+ ),
+ createTextMessage(
+ managementChannelParticipants,
+ 'text text message two',
+ 3,
+ ),
+ createAudioMessage(
+ [encryptUserId(rawUserList[0]), encryptUserId(rawUserList[1])],
+ 9000,
+ '/path/to/the/hulaonwallstreet.mp4',
+ 4,
+ ),
+ createAudioMessage(
+ [encryptUserId(rawUserList[0]), encryptUserId(rawUserList[1])],
+ 9000,
+ '/path/to/the/sampleaudio.mp4',
+ 2,
+ ),
+ ],
+ },
+};
+
+export const wholeStoreChannel = {};
+
+export const voiceChannelForPTT = {};
+
export const oneToOneChannel_AllMessageTypes = {
id: createAssociateChannelId([rawUserList[0], rawUserList[1]]),
_collections: {
--- __tests__/harness/firestore/data/store100.ts
@@ -1,9 +1,10 @@
// @ts-ignore
-import {rawUserList, usersCollectionForStore} from './users';
+import {usersCollectionForStore} from './users';
import {
oneToOneChannel_AllMessageTypes,
oneToOneChannel_onlyAudioMessages,
- oneToOneChannel_onlyTextMessages,
+ oneToOneChannel_onlyTextMessages, teamChannel_Management,
+ // @ts-ignore
} from './channels';
export const store100Collection = {
@@ -13,6 +14,7 @@ export const store100Collection = {
oneToOneChannel_AllMessageTypes,
oneToOneChannel_onlyTextMessages,
oneToOneChannel_onlyAudioMessages,
+ teamChannel_Management,
],
users: usersCollectionForStore(),
},
--- __tests__/harness/firestore/data/channels.ts
@@ -8,6 +8,61 @@ import {
import {encryptUserId} from '../../../../src/utils';
import {staticDateStrings} from './timestamps';
+const managementChannelParticipants = [
+ encryptUserId(rawUserList[0]),
+ encryptUserId(rawUserList[1]),
+ encryptUserId(rawUserList[2]),
+ encryptUserId(rawUserList[3]),
+ encryptUserId(rawUserList[4]),
+];
+export const teamChannel_Management = {
+ id: 'TEAM_1111111',
+ channelName: 'Management',
+ createdAt: staticDateStrings[6],
+ group: true,
+ lastMessageTime: staticDateStrings[7],
+ participants: managementChannelParticipants,
+ recentRead: {
+ [managementChannelParticipants[1]]: staticDateStrings[3],
+ [managementChannelParticipants[2]]: staticDateStrings[4],
+ },
+ _collections: {
+ messages: [
+ createImageMessage(
+ managementChannelParticipants,
+ 'path/to/testimageone.jpg',
+ 0,
+ ),
+ createTextMessage(
+ managementChannelParticipants,
+ 'test text message one',
+ 2,
+ ),
+ createTextMessage(
+ managementChannelParticipants,
+ 'text text message two',
+ 3,
+ ),
+ createAudioMessage(
+ [encryptUserId(rawUserList[0]), encryptUserId(rawUserList[1])],
+ 9000,
+ '/path/to/the/hulaonwallstreet.mp4',
+ 4,
+ ),
+ createAudioMessage(
+ [encryptUserId(rawUserList[0]), encryptUserId(rawUserList[1])],
+ 9000,
+ '/path/to/the/sampleaudio.mp4',
+ 2,
+ ),
+ ],
+ },
+};
+
+export const wholeStoreChannel = {};
+
+export const voiceChannelForPTT = {};
+
export const oneToOneChannel_AllMessageTypes = {
id: createAssociateChannelId([rawUserList[0], rawUserList[1]]),
_collections: {
--- __tests__/harness/firestore/data/store100.ts
@@ -1,9 +1,10 @@
// @ts-ignore
-import {rawUserList, usersCollectionForStore} from './users';
+import {usersCollectionForStore} from './users';
import {
oneToOneChannel_AllMessageTypes,
oneToOneChannel_onlyAudioMessages,
- oneToOneChannel_onlyTextMessages,
+ oneToOneChannel_onlyTextMessages, teamChannel_Management,
+ // @ts-ignore
} from './channels';
export const store100Collection = {
@@ -13,6 +14,7 @@ export const store100Collection = {
oneToOneChannel_AllMessageTypes,
oneToOneChannel_onlyTextMessages,
oneToOneChannel_onlyAudioMessages,
+ teamChannel_Management,
],
users: usersCollectionForStore(),
},
| adding more test channel data | adding more test channel data
|
e21f85e995634e3b25e585d36276650ddc353453 | --- ios/AllSpark.xcodeproj/project.pbxproj
@@ -501,7 +501,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 212ACBF9F6EA1B3866D5D388 /* Pods-AllSpark.debug.xcconfig */;
buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-Prod";
+ ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-Dev";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = AllSpark/AllSpark.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
@@ -541,7 +541,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 18C7AF990A657BA8B527E5F6 /* Pods-AllSpark.release.xcconfig */;
buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-Prod";
+ ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-Dev";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = AllSpark/AllSpark.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
--- scripts/updateiOSProjectConfig.sh
@@ -72,7 +72,7 @@ pbxprojFile="${xcodeproj}/project.pbxproj"
## Find and replace AppIcon with the prod one (without beta or dev).
echo "Updating AppIcon \"$BETA_APP_ICON\" or \"$DEV_APP_ICON\" with \"$APP_ICON\" "
-sed -Ei '' "s/$BETA_APP_ICON;|$DEV_APP_ICON;|$DEFAULT_APP_ICON;|$PROD_APP_ICON;/$APP_ICON;/" ${pbxprojFile}
+sed -Ei '' "s/\"$BETA_APP_ICON\";|\"$DEV_APP_ICON\";|\"$PROD_APP_ICON\";/\"$APP_ICON\";/" ${pbxprojFile}
## Find and replace bundle ids.
echo "Updating Bundle Id \"$BETA_BUNDLE_ID\" with Bundle Id \"$BUNDLE_ID\" "
| app icon script fix (#406) | app icon script fix (#406)
Co-authored-by: Hitesh Arora <> |
a29cac0578d40d44775624d1b6e400d58c7b276e | --- package.json
@@ -1,6 +1,6 @@
{
"name": "@walmart/wmconnect-mini-app",
- "version": "3.7.1",
+ "version": "3.7.0-alpha.0",
"main": "dist/index.js",
"files": [
"dist",
| feat(ada): update versions | feat(ada): update versions
|
95177a5c0f5cabecd4617ecde6b25e375bb11fe3 | --- src/managerExperience/components/FilterChipGroup/FilterChipGroup.tsx
@@ -65,6 +65,7 @@ export const FilterChipGroup = ({
setSelectedShift(() => shift);
};
+ //TO-DO: add a featureFlag to the shiftSwitcher Modal
const toggleShiftSwitcherModal = () => {
AllsparkNavigationClient.openModal('roster.ShiftSwitcherModal' as any, {
setShift,
--- src/managerExperience/components/ShiftSwitcherModal/ShiftSwitcherModal.tsx
@@ -1,9 +1,10 @@
import React, {useState} from 'react';
-import {Text, View} from 'react-native';
+import {View} from 'react-native';
import {ShiftSwitcherModalStyles as styles} from './styles';
import {ShiftType} from '../FilterChipGroup/types';
import {translationClient} from '../../../common/translation';
import {
+ Body,
Button,
CloseIcon,
FormGroup,
@@ -45,9 +46,9 @@ export const ShiftSwitcherModal = ({
return (
<View style={styles.container}>
<View style={styles.header}>
- <Text style={styles.headerText}>
+ <Body weight='700' UNSAFE_style={styles.headerText}>
{t('rosterScreen.shiftChip.modalTitle')}
- </Text>
+ </Body>
<LinkButton onPress={closeModal}>
<CloseIcon size='medium' />
</LinkButton>
| feat(ui): UI updates | feat(ui): UI updates
|
0cfb7f1b40870f165e79fad736f268b07a10bdb2 | --- __tests__/screens/SearchScreen/SearchScreenTest.tsx
@@ -17,7 +17,7 @@ import {finishPendingRequests} from '../../harness/utils';
import {hourlyUserData} from '../../harness/redux/mockState/mockUsers/hourlyUser';
import {createMockDailyRosterResponse} from '../../harness/athenaQueries/getDailyRoster';
-const LOGGER_APP_KEY = 'texting';
+const LOGGER_APP_KEY = 'roster';
jest.mock('@walmart/react-native-logger', () => ({
DefaultLogger: {
--- allspark.config.js
@@ -1,5 +1,5 @@
module.exports = {
- id: 'texting-miniapp',
+ id: 'roster-miniapp',
graphql: {
queries: 'src/queries',
codegen: {
@@ -7,9 +7,9 @@ module.exports = {
schemaVersion: '1.0.0',
teamRostersProductId: 1824,
application: {
- name: 'TEXTING-MINIAPP',
- applicationKey: 'TEXTING-MINIAPP',
- description: 'Texting mini app',
+ name: 'ROSTER-MINIAPP',
+ applicationKey: 'ROSTER-MINIAPP',
+ description: 'Roster mini app',
},
GetDailyRoster: {
tags: ['v2', 'Drop13'],
--- src/components/StatusChip.tsx
@@ -16,7 +16,7 @@ import {Associate} from '../types';
const deriveAssociateStatus = (
associate: Associate,
- t: TFunction<'texting'[]>,
+ t: TFunction<'roster'[]>,
): {text: string; color: TagColor} | null => {
if (associateIsAbsent(associate)) {
return {
--- src/logger/Analytics.tsx
@@ -1,6 +1,6 @@
import WmTelemetry from 'react-native-wm-telemetry';
-const APP_NAME = 'Texting';
+const APP_NAME = 'Roster';
/*
* eventName: event name
--- src/logger/Logger.tsx
@@ -24,7 +24,7 @@ interface NoFunctionObject {
[key: string]: NoFunctionValue;
}
-export const LOGGER_APP_KEY = 'texting';
+export const LOGGER_APP_KEY = 'roster';
export const clonedLogger = DefaultLogger.clone({}, {id: LOGGER_APP_KEY});
--- src/redux/reducer.tsx
@@ -1,7 +1,7 @@
import {createSlice, PayloadAction} from '@reduxjs/toolkit';
export const rosterSlice = createSlice({
- name: 'texting', //Todo: Update it to roster and make changes in the initial state as well - https://jira.walmart.com/browse/SMDV-5325
+ name: 'roster', //Todo: Update it to roster and make changes in the initial state as well - https://jira.walmart.com/browse/SMDV-5325
initialState: {
searchText: '',
},
--- src/services/config.ts
@@ -1,7 +1,7 @@
import type {EnvConfig} from '@walmart/core-services/Environment';
const miniAppPackage = require('../../package.json');
-export const HTTP_CLIENT_KEY = 'texting';
+export const HTTP_CLIENT_KEY = 'roster';
export const getGraphQLConfig = (envConfig: EnvConfig) => {
return {
@@ -10,8 +10,8 @@ export const getGraphQLConfig = (envConfig: EnvConfig) => {
'wm_consumer.id':
envConfig.env === 'prod'
? 'cfac4a3d-ae91-43c8-81f5-ceb838e4cd44'
- : '25fe4e50-7085-4793-863c-08b990282345',
- 'x-o-platform': 'texting-miniapp',
+ : '1bfc1d19-903b-438b-be7e-b0733aade46b',
+ 'x-o-platform': 'roster-miniapp',
'x-o-platform-version': miniAppPackage?.version || '2.x.x',
},
};
--- src/utils/user.ts
@@ -6,7 +6,7 @@ import {isNil} from 'lodash';
import {GetAssociateNameQuery} from '../queries/getAssociateName';
import {Associate} from '../types';
-const OBFUSCATION_KEY = 'texting-mini-app';
+const OBFUSCATION_KEY = 'roster-mini-app';
const OBFUSCATION_PARSE_KEY = OBFUSCATION_KEY.padStart(64, '0');
export const encryptUserId = (userId: string) =>
| Update namespace | Update namespace
|
d03c8cbb020bd76cbae37d17cac817d1edb09d9f | --- package-lock.json
@@ -63,7 +63,7 @@
"@walmart/onewalmart-miniapp": "1.0.14",
"@walmart/pay-stub-miniapp": "0.9.31",
"@walmart/payrollsolution_miniapp": "0.130.34",
- "@walmart/price-changes-mini-app": "1.9.2",
+ "@walmart/price-changes-mini-app": "1.9.3",
"@walmart/profile-feature-app": "0.143.0",
"@walmart/push-to-talk-mini-app": "1.9.22",
"@walmart/react-native-encrypted-storage": "1.1.3",
@@ -5670,9 +5670,9 @@
}
},
"node_modules/@walmart/price-changes-mini-app": {
- "version": "1.9.2",
- "resolved": "https://npme.walmart.com/@walmart/price-changes-mini-app/-/price-changes-mini-app-1.9.2.tgz",
- "integrity": "sha512-NPBo9zzzqO/qj9V6nwpomuUcC2V49h87cY9Ojv0fcnTDjGR+9d3AFT+w6tMwHVC/Xd1lfyH74TOrg2gj5hz5Pg==",
+ "version": "1.9.3",
+ "resolved": "https://npme.walmart.com/@walmart/price-changes-mini-app/-/price-changes-mini-app-1.9.3.tgz",
+ "integrity": "sha512-bTNGTIPKgQj58AM007tgnkp+JKKZ/QqNpjv5pnmaXr826fxlmd6zFZhWDfsbil4mnqfSE04s+aermKjYdlMT1A==",
"hasInstallScript": true,
"peerDependencies": {
"@react-navigation/native": "^6.0.0",
@@ -25366,9 +25366,9 @@
}
},
"@walmart/price-changes-mini-app": {
- "version": "1.9.2",
- "resolved": "https://npme.walmart.com/@walmart/price-changes-mini-app/-/price-changes-mini-app-1.9.2.tgz",
- "integrity": "sha512-NPBo9zzzqO/qj9V6nwpomuUcC2V49h87cY9Ojv0fcnTDjGR+9d3AFT+w6tMwHVC/Xd1lfyH74TOrg2gj5hz5Pg=="
+ "version": "1.9.3",
+ "resolved": "https://npme.walmart.com/@walmart/price-changes-mini-app/-/price-changes-mini-app-1.9.3.tgz",
+ "integrity": "sha512-bTNGTIPKgQj58AM007tgnkp+JKKZ/QqNpjv5pnmaXr826fxlmd6zFZhWDfsbil4mnqfSE04s+aermKjYdlMT1A=="
},
"@walmart/profile-feature-app": {
"version": "0.143.0"
--- package.json
@@ -105,7 +105,7 @@
"@walmart/onewalmart-miniapp": "1.0.14",
"@walmart/pay-stub-miniapp": "0.9.31",
"@walmart/payrollsolution_miniapp": "0.130.34",
- "@walmart/price-changes-mini-app": "1.9.2",
+ "@walmart/price-changes-mini-app": "1.9.3",
"@walmart/profile-feature-app": "0.143.0",
"@walmart/push-to-talk-mini-app": "1.9.22",
"@walmart/react-native-encrypted-storage": "1.1.3",
| chore: updating PC version | chore: updating PC version
|
82b955238337ec4e45bb6f46a1ab844adf9d75e1 | --- src/index.tsx
@@ -14,8 +14,6 @@ export * from './shared';
reducerManager.addReducer('roster', rosterSlice.reducer);
export const initialize = async (debugToken: string) => {
- initi18n();
-
const rnfbProvider = firebase
.appCheck()
.newReactNativeFirebaseAppCheckProvider();
@@ -37,6 +35,8 @@ export const initialize = async (debugToken: string) => {
});
};
+initi18n();
+
export const RosterMiniApp = () => {
return (
<SafeAreaProvider>
| feat(ui): Merge changes for drop 23 version 1 SMDV-5921 | feat(ui): Merge changes for drop 23 version 1 SMDV-5921
|
4ac2d9e45874363a09a8e3d4e0081f36c5c11c56 | --- __tests__/startup/StartupSagaTest.ts
@@ -9,13 +9,7 @@ import {
cancel,
} from 'redux-saga/effects';
import {createMockTask} from '@redux-saga/testing-utils';
-import {
- User,
- AuthTypes,
- UserTypes,
- UserSelectors,
- AuthSelectors,
-} from '@walmart/redux-store';
+import {User, AuthTypes, UserTypes, UserSelectors} from '@walmart/redux-store';
import {
WMNetworkReducerTypes,
WMNetworkSelectors,
@@ -136,9 +130,6 @@ describe('captureMissedMiniAppEvents', () => {
select(WMNetworkSelectors.getNetworkType),
);
expect(iterator.next(networkType).value).toEqual(
- select(AuthSelectors.getAuthUser),
- );
- expect(iterator.next(signInAction.user).value).toEqual(
all([
put({type: WMNetworkReducerTypes.UPDATE_NETWORK_TYPE, networkType}),
put({
@@ -172,9 +163,6 @@ describe('captureMissedMiniAppEvents', () => {
select(WMNetworkSelectors.getNetworkType),
);
expect(iterator.next(networkType).value).toEqual(
- select(AuthSelectors.getAuthUser),
- );
- expect(iterator.next(startImpersonationAction.user).value).toEqual(
all([
put({type: WMNetworkReducerTypes.UPDATE_NETWORK_TYPE, networkType}),
put({
--- src/startup/StartupSaga.ts
@@ -8,13 +8,7 @@ import {
fork,
cancel,
} from 'redux-saga/effects';
-import {
- User,
- AuthTypes,
- UserTypes,
- UserSelectors,
- AuthSelectors,
-} from '@walmart/redux-store';
+import {User, AuthTypes, UserTypes, UserSelectors} from '@walmart/redux-store';
import {
WMNetworkReducerTypes,
WMNetworkSelectors,
@@ -68,7 +62,7 @@ export function* captureMissedMiniAppEvents(): any {
const networkType = yield select(WMNetworkSelectors.getNetworkType);
// For those mini apps expecting the old payload action param
- signInAction.payload = yield select(AuthSelectors.getAuthUser);
+ signInAction.payload = signInAction.user;
// Dispatch missed actions / emit missed events
yield all([
| Removing uneeded selector | Removing uneeded selector
|
1564d2ddd8a877ad49b068f862aecaac02ec8f0b | --- package-lock.json
@@ -74,7 +74,7 @@
"@walmart/react-native-shared-navigation": "1.0.2",
"@walmart/react-native-store-map": "0.3.7",
"@walmart/react-native-sumo-sdk": "2.5.1",
- "@walmart/receipt-check-miniapp": "1.12.4",
+ "@walmart/receipt-check-miniapp": "1.13.5",
"@walmart/redux-store": "3.1.5",
"@walmart/returns-mini-app": "0.13.3",
"@walmart/schedule-mini-app": "0.35.0",
@@ -5850,9 +5850,9 @@
}
},
"node_modules/@walmart/receipt-check-miniapp": {
- "version": "1.12.4",
- "resolved": "https://npme.walmart.com/@walmart/receipt-check-miniapp/-/receipt-check-miniapp-1.12.4.tgz",
- "integrity": "sha512-m8dk+903a+SaIsML8nZ7J0tX3ZscULpXRPqx4RD6itTRUj0KgtCmmaO5a0UeJUZ5wRSIsoGDMud/y2dlvaEgWQ==",
+ "version": "1.13.5",
+ "resolved": "https://npme.walmart.com/@walmart/receipt-check-miniapp/-/receipt-check-miniapp-1.13.5.tgz",
+ "integrity": "sha512-JZaoMCf6QdE2rhfI5LD1NAwnZ8uNYuqjk3Rb8oa4nFiwcWIR790lnqoDQ3SYnceio/n83lkgBEgUsA5s6Srwmw==",
"dependencies": {
"@walmart/tcnumber": "^2.3.3",
"@xstate/react": "^3.0.1",
@@ -25432,9 +25432,9 @@
"version": "2.5.1"
},
"@walmart/receipt-check-miniapp": {
- "version": "1.12.4",
- "resolved": "https://npme.walmart.com/@walmart/receipt-check-miniapp/-/receipt-check-miniapp-1.12.4.tgz",
- "integrity": "sha512-m8dk+903a+SaIsML8nZ7J0tX3ZscULpXRPqx4RD6itTRUj0KgtCmmaO5a0UeJUZ5wRSIsoGDMud/y2dlvaEgWQ==",
+ "version": "1.13.5",
+ "resolved": "https://npme.walmart.com/@walmart/receipt-check-miniapp/-/receipt-check-miniapp-1.13.5.tgz",
+ "integrity": "sha512-JZaoMCf6QdE2rhfI5LD1NAwnZ8uNYuqjk3Rb8oa4nFiwcWIR790lnqoDQ3SYnceio/n83lkgBEgUsA5s6Srwmw==",
"requires": {
"@walmart/tcnumber": "^2.3.3",
"@xstate/react": "^3.0.1",
--- package.json
@@ -116,7 +116,7 @@
"@walmart/react-native-shared-navigation": "1.0.2",
"@walmart/react-native-store-map": "0.3.7",
"@walmart/react-native-sumo-sdk": "2.5.1",
- "@walmart/receipt-check-miniapp": "1.12.4",
+ "@walmart/receipt-check-miniapp": "1.13.5",
"@walmart/redux-store": "3.1.5",
"@walmart/returns-mini-app": "0.13.3",
"@walmart/schedule-mini-app": "0.35.0",
| update version | update version
|
5aa807f2aa0186a425c4bea93c7190d6e6d92ebb | --- packages/allspark-authentication/__tests__/Authentication.test.ts
@@ -143,7 +143,7 @@ describe('AllsparkAuthentication', () => {
// Revoke token and fire listener
expect(revoke).toHaveBeenCalledWith(AuthorizeConfig, {
- tokenToRevoke: AuthorizeResult.accessToken,
+ tokenToRevoke: AuthorizeResult.refreshToken,
includeBasicAuth: false,
sendClientId: true,
});
@@ -162,8 +162,9 @@ describe('AllsparkAuthentication', () => {
// General sign out listener
expect(onInfoListener).toHaveBeenCalledWith({
- category: 'SIGN_OUT_SUCCESS',
- });
+ category: 'SIGN_OUT_SUCCESS',
+ timedOut: false,
+ });
// Remove cache values
expect(ConfigCache.removeItem).toHaveBeenCalledWith(
@@ -174,6 +175,38 @@ describe('AllsparkAuthentication', () => {
);
});
+ it('logs timedOut as true when operations exceed 15 second timeout', async () => {
+ jest.useFakeTimers();
+ ResultCache.getItem.mockResolvedValueOnce(AuthorizeResult);
+ ConfigCache.getItem.mockResolvedValueOnce(AuthorizeConfig);
+
+ // Make revoke and logout hang longer than timeout of 15 s
+ (revoke as jest.Mock).mockImplementation(
+ () => new Promise((resolve) => setTimeout(resolve, 20000))
+ );
+ (logout as jest.Mock).mockImplementation(
+ () => new Promise((resolve) => setTimeout(resolve, 20000))
+ );
+ const signOutPromise = auth.signOut();
+
+ await jest.advanceTimersByTimeAsync(15000);
+ await signOutPromise;
+ expect(onInfoListener).toHaveBeenCalledWith(
+ expect.objectContaining({
+ category: 'SIGN_OUT_SUCCESS',
+ timedOut: true,
+ })
+ );
+
+ expect(ConfigCache.removeItem).toHaveBeenCalledWith(
+ `wm_auth_config_${ENV}`
+ );
+ expect(ResultCache.removeItem).toHaveBeenCalledWith(
+ `wm_auth_result_${AuthorizeConfig.issuer}_${AuthorizeConfig.clientId}`
+ );
+ jest.useRealTimers();
+ });
+
it('clears cache regardless of error', async () => {
const revokeError: AppAuthError = {
name: 'Error',
@@ -183,6 +216,7 @@ describe('AllsparkAuthentication', () => {
ResultCache.getItem.mockResolvedValueOnce(AuthorizeResult);
ConfigCache.getItem.mockResolvedValueOnce(AuthorizeConfig);
(revoke as jest.Mock).mockRejectedValueOnce(revokeError);
+ (logout as jest.Mock).mockResolvedValueOnce({});
await auth.signOut();
--- packages/allspark-authentication/src/Authentication.ts
@@ -336,12 +336,23 @@ export class AllsparkAuthentication {
throw NO_CACHE_ERROR;
}
- await Promise.allSettled([
- this._revokeToken(config, refreshToken),
- this._logoutUser(config, idToken),
+ // This resolves with undefined after 15 sec.
+ const timeoutPromise = new Promise((resolve) => {
+ setTimeout(() => resolve(undefined), 15000);
+ });
+
+ // Wait max 15 sec revoke and logout.
+ const result = await Promise.race([
+ Promise.allSettled([
+ this._revokeToken(config, refreshToken),
+ this._logoutUser(config, idToken),
+ ]),
+ timeoutPromise,
]);
- this._runInfoEvent('SIGN_OUT_SUCCESS');
+ this._runInfoEvent('SIGN_OUT_SUCCESS', {
+ timedOut: result === undefined,
+ });
}
} catch (e) {
this._runErrorEvent('SIGN_OUT_ERROR', e as AppAuthError);
| chore: update race condition for the logout (#503) | chore: update race condition for the logout (#503)
|
e79d05d761d4e04591a9caad38f4c81dbc30c70c | --- packages/allspark-foundation-hub/src/HubFeature/Hub/Container/Screens/HubDashboard.tsx
@@ -80,26 +80,30 @@ export const HubDashboard = ({ name, widgets }: HubDashboardProps) => {
);
useEffect(() => {
- const getMyTeamData = async () =>
- await data?.associatePreferences?.meAtWalmartPreferences
- ?.managerExperiencePreferences?.myTeams;
+ if (eligibleForOnboarding) {
+ const getMyTeamData = async () =>
+ await data?.associatePreferences?.meAtWalmartPreferences
+ ?.managerExperiencePreferences?.myTeams;
- getMyTeamData().then((myTeamData) => {
- if (myTeamData !== undefined) {
- const isUserOnboarded =
- eligibleForOnboarding && myTeamData && myTeamData.length >= 0;
- if (!isUserOnboarded) {
- dispatch(ManagerExperienceCreators.startUserOnboarding());
- AllsparkNavigationClient.navigate('managerExperience.teamOnboarding');
+ getMyTeamData().then((myTeamData) => {
+ if (myTeamData !== undefined) {
+ const isUserOnboarded = myTeamData && myTeamData.length >= 0;
+ if (!isUserOnboarded) {
+ dispatch(ManagerExperienceCreators.startUserOnboarding());
+ AllsparkNavigationClient.navigate(
+ 'managerExperience.teamOnboarding'
+ );
+ }
}
- }
- });
+ });
+ } else {
+ AllsparkNavigationClient.navigate('');
+ }
}, [
data?.associatePreferences?.meAtWalmartPreferences
?.managerExperiencePreferences?.myTeams,
dispatch,
eligibleForOnboarding,
- userTeamSelectionComplete,
]);
// After changing store, reload all the hub widgets with new store data.
@@ -245,7 +249,7 @@ export const HubDashboard = ({ name, widgets }: HubDashboardProps) => {
</ScrollView>
<BottomSheet
ref={bottomSheetRef}
- isVisible={userOnboardinComplete as boolean}
+ isVisible={userOnboardinComplete && !userTeamSelectionComplete}
content={renderContent()}
onPrimaryButtonPress={closeBottomSheet}
primaryButtonText={
| feat(ui): Update navigation for onboarding | feat(ui): Update navigation for onboarding
|
7b03dc37912fd498d3496bcd37cbc8add96fa944 | --- app.config.US.ts
@@ -21,6 +21,7 @@ const bundleIdentifier = Environment.select({
// Can we make it a process env variable?
const buildNumber = process.env.BUILD_NUMBER || "938";
+// Used to temporarily bypass codegate for hardcoding of google maps key
const magicWord = "Key" as const;
const CONFIG: ExpoConfig = {
--- plugins/withActiveArchFix.ts
@@ -0,0 +1,35 @@
+import { ConfigPlugin, withDangerousMod } from "@expo/config-plugins";
+import { mergeContents } from "@expo/config-plugins/build/utils/generateCode";
+import fs from "fs";
+import path from "path";
+
+/**
+ * Used to fix a possible local issue with building for x86 devices.
+ * Not run by default, will have to be added in the app.config.US.ts as needed
+ */
+const withActiveArchFix: ConfigPlugin = (config) => {
+ return withDangerousMod(config, [
+ "ios",
+ async (config) => {
+ const file = path.join(config.modRequest.platformProjectRoot, "Podfile");
+ const contents = await fs.promises.readFile(file, "utf8");
+ const newContents = mergeContents({
+ tag: `fix-build`,
+ src: contents,
+ newSrc: `
+ installer.pods_project.targets.each do |target|
+ target.build_configurations.each do |config|
+ config.build_settings["ONLY_ACTIVE_ARCH"] = "NO"
+ end
+ end`,
+ anchor: /post_install/,
+ offset: 1,
+ comment: "#",
+ }).contents;
+ await fs.promises.writeFile(file, newContents, "utf8");
+ return config;
+ },
+ ]);
+};
+
+export default withActiveArchFix;
--- scripts/runWithVariablePrompt.ts
@@ -21,6 +21,11 @@ const argv = yargs(hideBin(process.argv))
type: "boolean",
description: "Skip reading the build.context.json file",
})
+ .option("updateContext", {
+ alias: "u",
+ type: "boolean",
+ description: "Update context with current process variables",
+ })
.help().argv;
// Determine command to run
@@ -28,9 +33,11 @@ const argv = yargs(hideBin(process.argv))
const commandToRun = argv.command;
// @ts-ignore
const skipContext = argv.skipContext;
+// @ts-ignore
+const updateContext = argv.updateContext;
// Determine build context, if build context has already been chosen from a previous command
-let buildContext: { ENV: string; TARGET: string } | undefined;
+let buildContext: { ENV?: string; TARGET?: string } | undefined;
// Try to read the build.context.json file unless the skipContext option is set
if (!skipContext) {
@@ -52,6 +59,18 @@ if (!skipContext) {
}
}
+// Update context with current process variables
+if (updateContext) {
+ console.log(
+ "[runWithVariablePrompt] overriding builds.context.json with current process variables"
+ );
+
+ buildContext = {
+ ENV: process.env.NODE_ENV || buildContext?.ENV,
+ TARGET: process.env.TARGET || buildContext?.TARGET,
+ };
+}
+
// Get Target Options
const findFilePatterns = (files: string[], pattern: RegExp): string[] => {
return files
@@ -98,7 +117,7 @@ inquirer
} = answers;
// Write selected options to build.context.json
- if (!buildContext) {
+ if (!buildContext || updateContext) {
fs.writeFile(
`${process.cwd()}/build.context.json`,
JSON.stringify({ ENV: environment, TARGET: target })
| chore: add active arch fix plugin. add option to update context on variable prompt script | chore: add active arch fix plugin. add option to update context on variable prompt script
|
84ef32e5b1c48730715e65d624de488cfdd0976b | --- .looper.multibranch.yml
@@ -327,9 +327,11 @@ flows:
- echo "uploading build"
- call: upload-build(version = "${version}-${env}-SNAPSHOT", artifactId = "allspark-core-${os}-${env}", buildOutput = ${buildOutput}, sourceMap = ${sourceMap})
- call: slack-success(version = "${version}-${env}-SNAPSHOT", buildOutput = ${buildOutput})
+ - call: msteams-success(version = ${version}, buildOutput = ${buildOutput})
catch:
- echo "calling slack-failure(${version}, ${flowErrorMessage})"
- call: slack-failure(version = ${version}, flowErrorMessage = ${flowErrorMessage})
+ - call: msteams-failure(version = ${version}, flowErrorMessage = ${flowErrorMessage})
- fail('Failed to generate build with flowErrorMessage - $flowErrorMessage')
# this is for master
@@ -360,6 +362,7 @@ flows:
- echo "uploading build"
- call: upload-build(version = ${version}, artifactId = ${artifactId}, buildOutput = ${buildOutput}, sourceMap = ${sourceMap})
- call: slack-success(version = "${version}-${env}", buildOutput = ${buildOutput})
+ - call: msteams-success(version = ${version}, buildOutput = ${buildOutput})
else:
- echo "artifact present; no need to build and publish. fullUrl = ${fullUrl}"
catch:
| forgot to call the flow | forgot to call the flow
|
d749b8fcd1379b06575abfd6a5be86c50873db77 | --- scripts/releaseCpTagging.js
| rename script | rename script
|
21db83eb19f7c4df20067df1170554dd0e4672ca | --- src/components/Roster/Roster.tsx
@@ -183,7 +183,10 @@ export const Roster: React.FC<RosterProps> = (props) => {
ListEmptyComponent={
<ListEmptyComponent
isLoading={loadingDailyRoster}
- hasError={!!rosterDataFetchError}
+ hasError={
+ !!rosterDataFetchError &&
+ getDailyRosterResponse?.getDailyRoster?.length === 0
+ }
error={rosterDataFetchError}
selectedFilter={selectedFilter}
/>
| Update the error condition | Update the error condition
|
438f787f670131e173512b53fb0a76e80d950b60 | --- __tests__/startup/NotificationTest.ts
@@ -1,4 +1,5 @@
/* eslint-disable react-hooks/rules-of-hooks */
+import {IAllsparkNotification} from '@walmart/core-services-allspark';
import {useNotification} from '@walmart/core-services/Notification';
import {SumoPushEventTypes} from '@walmart/react-native-sumo-sdk';
@@ -6,10 +7,10 @@ import {
NotificationRef,
defaultEventHandler,
onAppStartupFromNotification,
- initSumoListeners,
-} from '../../src/sumo/SumoEvents';
+ initNotificationListeners,
+} from '../../src/core/Notification';
-const NotificationContext = useNotification();
+const NotificationContext: IAllsparkNotification = useNotification();
test('NotificationRef', () => {
expect(NotificationRef.startupNotification).toEqual(undefined);
@@ -30,7 +31,7 @@ test('onAppStartupFromNotification', () => {
});
test('initSumoListeners', async () => {
- await initSumoListeners();
+ await initNotificationListeners();
expect(NotificationContext.setDefaultListener).toHaveBeenCalledWith(
SumoPushEventTypes.ON_FOREGROUND_NOTIFICATION,
--- __tests__/startup/RootStartupTest.ts
@@ -5,7 +5,7 @@ import {addSagas} from '@walmart/redux-store';
import {useRootStartup} from '../../src/startup/RootStartup';
import {initEnv} from '../../src/startup/initEnv';
import {initWmConfig} from '../../src/startup/wmConfigInit';
-import {initSumoListeners} from '../../src/sumo';
+import {initNotificationListeners} from '../../src/core/Notification';
import {initAppFlow} from '../../src/startup';
import {initBiometrics} from '../../src/biometrics';
import {initUpdateCheck} from '../../src/updates';
@@ -23,8 +23,8 @@ const mockTask = addSagas();
jest.mock('../../src/startup/wmConfigInit', () => ({
initWmConfig: jest.fn(),
}));
-jest.mock('../../src/sumo', () => ({
- initSumoListeners: jest.fn(),
+jest.mock('../../src/core/Notification', () => ({
+ initNotificationListeners: jest.fn(),
}));
const mockCleanupAppFlow = jest.fn();
@@ -59,7 +59,7 @@ describe('useRootStartup', () => {
const hook = renderHook(() => useRootStartup());
expect(initWmConfig).toHaveBeenCalled();
- expect(initSumoListeners).toHaveBeenCalled();
+ expect(initNotificationListeners).toHaveBeenCalled();
expect(dispatch).toHaveBeenCalledWith(StartupActionCreators.startup());
expect(initEnv).toHaveBeenCalled();
--- src/core/Notification.ts
@@ -23,7 +23,7 @@ export const onAppStartupFromNotification = (event: any) => {
return true;
};
-export const initSumoListeners = async () => {
+export const initNotificationListeners = async () => {
const Notification = await getDeferredNotificationContext<
IAllsparkNotification
>();
--- src/startup/RootStartup.ts
@@ -1,10 +1,9 @@
import {useEffect} from 'react';
import {useDispatch} from 'react-redux';
-
import {addSagas} from '@walmart/redux-store';
+import {initNotificationListeners} from '../core/Notification';
import {initEnv} from './initEnv';
-import {initSumoListeners} from '../sumo';
import {permissionSagas} from '../permissions';
import {termsOfUseSagas} from '../termsOfUse';
import {initBiometrics} from '../biometrics';
@@ -19,7 +18,7 @@ export const useRootStartup = () => {
useEffect(() => {
initWmConfig();
- initSumoListeners();
+ initNotificationListeners();
dispatch(StartupActionCreators.startup());
const cleanupEnv = initEnv();
--- src/sumo/index.ts
@@ -1,2 +0,0 @@
-import {initSumoListeners} from './SumoEvents';
-export {initSumoListeners};
| moving sumo folder to notifications file | moving sumo folder to notifications file
|
95da63ccdfe7a48ce852af5ee3ab5a8601d78021 | --- .looper-android-dev.yml
@@ -22,4 +22,4 @@ flows:
- npm run jetifier
# - (name replace gradle implementation in firestore) sh scripts/updateFirestoreGradle.sh
- (name replace gradle implementation in remote-config) sh scripts/fixAndroidProtobufError.sh
- - call: build-and-publish(os = "android", version = ${androidAppVersion}-SNAPSHOT, env = "${env}", packaging = "apk")
+ - call: build-and-publish(os = "android", version = ${androidAppVersion}-DEV, env = "${env}", packaging = "apk")
--- .looper-ios-dev.yml
@@ -11,4 +11,4 @@ flows:
- call: npm-install-and-coverage(env = "${env}")
- var(iosAppVersion):
sh scripts/getIOSAppVersionFromInfoPlist.sh ios/AllSpark/Info.plist
- - call: build-and-publish(os = "ios", version = ${iosAppVersion}-SNAPSHOT, env = "${env}", packaging = "ipa")
+ - call: build-and-publish(os = "ios", version = ${iosAppVersion}-DEV, env = "${env}", packaging = "ipa")
--- ios/AllSpark.xcodeproj/project.pbxproj
@@ -803,7 +803,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
LIBRARY_SEARCH_PATHS = (
"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
@@ -856,7 +856,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
LIBRARY_SEARCH_PATHS = (
"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
--- ios/AllSpark/Info.plist
@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>$(MARKETING_VERSION)</string>
+ <string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
| Changed binary name from -snapshot to -dev for better understanding, changed marketing version to 1.0.0 so that it looks good in build (#38) | Changed binary name from -snapshot to -dev for better understanding, changed marketing version to 1.0.0 so that it looks good in build (#38)
|
8c5a44d0868f95ec7eec3ac90a99950bb09657af | --- __tests__/settings/versions/__snapshots__/VersionsListTest.tsx.snap
@@ -20,7 +20,7 @@ exports[`VersionsList 1`] = `
[
{
"data": [],
- "title": "Me@Walmart (undefined)",
+ "title": "Me@Walmart (dev)",
"version": undefined,
},
]
@@ -65,7 +65,7 @@ exports[`VersionsList 1`] = `
size="medium"
weight="700"
>
- appNames.Me@Walmart (undefined)
+ appNames.Me@Walmart (dev)
</Body>
<Body
size="medium"
--- src/settings/versions/VersionsList.tsx
@@ -9,7 +9,7 @@ import {
import {useSelector} from 'react-redux';
import {useSafeAreaInsets} from 'react-native-safe-area-context';
import {StackScreenProps} from '@react-navigation/stack';
-
+import {useEnvironment} from '@walmart/allspark-foundation/Environment';
import {
ContainerSelectors,
LibraryInfo,
@@ -50,6 +50,7 @@ export const VersionsList = (
const insets = useSafeAreaInsets();
const {t} = useAllsparkTranslation();
+ const env = useEnvironment()
const libraries = useSelector(ContainerSelectors.getLibraries);
useEffect(() => {
@@ -59,7 +60,7 @@ export const VersionsList = (
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
- const variant = process.env.EXPO_PUBLIC_APP_VARIANT === 'prod' ? '' : `(${process.env.EXPO_PUBLIC_APP_VARIANT})`;
+ const variant = process.env.EXPO_PUBLIC_APP_VARIANT === 'prod' ? '' : `(${env.deployment})`;
const versions = [{
title: `${Constants.expoConfig?.name} ${variant}`,
| fix(env): ALLSPARK-6869 fix env value in version title (#4694) | fix(env): ALLSPARK-6869 fix env value in version title (#4694)
Co-authored-by: Maksym Novakh <maksym.novakh@walmart.com> |
4aadcfe575663dacbdfea2db683857e4edc01c6d | --- .husky/pre-push
@@ -1 +1 @@
-yarn run build && yarn run test
+yarn run build && yarn run coverage
| chore(ui): update pr guidelines and husky config | chore(ui): update pr guidelines and husky config
|
a05c287db2f56ba6b51777f3e57cd7b849c63b5e | --- targets/US/package.json
@@ -141,7 +141,7 @@
"@walmart/redux-store": "~6.3.28",
"@walmart/returns-mini-app": "4.15.0",
"@walmart/rfid-scan-mini-app": "2.7.1",
- "@walmart/rn-receiving-mini-app": "2.4.45",
+ "@walmart/rn-receiving-mini-app": "2.4.74",
"@walmart/roster-mini-app": "2.9.0",
"@walmart/schedule-mini-app": "1.13.0",
"@walmart/shelfavailability-mini-app": "1.5.41",
--- yarn.lock
@@ -6792,9 +6792,9 @@ __metadata:
languageName: node
linkType: hard
-"@walmart/atlas-rn-ui-components@npm:1.1.36":
- version: 1.1.36
- resolution: "@walmart/atlas-rn-ui-components@npm:1.1.36"
+"@walmart/atlas-rn-ui-components@npm:1.1.35":
+ version: 1.1.35
+ resolution: "@walmart/atlas-rn-ui-components@npm:1.1.35"
peerDependencies:
"@livingdesign/tokens": ">=0.63.0"
"@react-native-picker/picker": ">=2.4.0"
@@ -6816,7 +6816,25 @@ __metadata:
bin:
installFonts: scripts/installFonts
runCodemods: scripts/runCodemods
- checksum: 10c0/e63a661463ddbfaa3d504c2bdd80b78bb8a7b0d71567025c787e661547ab498a5f1b02be8b1a7414229bc806a696765e85d0f775eed298dd5c6f66ffffbea815
+ checksum: 10c0/dbeb3e580d732daa024de72efe5ec72de28d6e5d6b7f20736bd143294ad8bb1ad3eb4b970ed1567c2c83df8dfc7bbb9b048bbbd4b2821404da3a11aab5927822
+ languageName: node
+ linkType: hard
+
+"@walmart/atlas-rn-ui-components@npm:1.1.51":
+ version: 1.1.51
+ resolution: "@walmart/atlas-rn-ui-components@npm:1.1.51"
+ peerDependencies:
+ "@walmart/gtp-shared-components": ">=2.2.3-rc.1"
+ i18next: ">=23.12.2"
+ react: ">=18.2.0"
+ react-i18next: ">=15.0.0"
+ react-native: "*"
+ react-native-image-picker: ">=4.10.0"
+ react-native-svg: ">=14.0.0"
+ bin:
+ installFonts: scripts/installFonts
+ runCodemods: scripts/runCodemods
+ checksum: 10c0/f6f90d2566e83fbbafc7148c914fde47ef0966de4f8598b2a63febb919489ce841538d1445bd7f29aaf9f9681a8b5a4521039b03ea9a6c96238629fd7ba89307
languageName: node
linkType: hard
@@ -7469,18 +7487,40 @@ __metadata:
languageName: node
linkType: hard
-"@walmart/loadquality-mini-app@npm:1.0.156":
- version: 1.0.156
- resolution: "@walmart/loadquality-mini-app@npm:1.0.156"
+"@walmart/loadquality-mini-app@npm:1.0.196":
+ version: 1.0.196
+ resolution: "@walmart/loadquality-mini-app@npm:1.0.196"
+ dependencies:
+ "@walmart/atlas-rn-ui-components": "npm:1.1.35"
peerDependencies:
- "@react-navigation/native": ^6.0.0
- "@react-navigation/stack": ^6.1.0
- "@walmart/core-services": ~2.0.11
- "@walmart/gtp-shared-components": ^2.1.10
- axios-cache-adapter: ">=2.7.3"
- react: ^18.2.0
- react-native: ~0.70.5
- checksum: 10c0/53e524da61fea806aeaaec64974cbed10d7c415f4aff7cc06dfc46e44f63406626f185ad1516a539c2c24c50dcf326be79a12198594f0c44510f22d0792d04e2
+ "@react-native-clipboard/clipboard": ">=1.10.0"
+ "@react-native/metro-config": ">=0.73.0"
+ "@react-navigation/native": ">=6.0.8"
+ "@react-navigation/native-stack": ">=6.9.18"
+ "@react-navigation/stack": ">=6.2.0"
+ "@reduxjs/toolkit": ">=1.9.7"
+ "@shopify/flash-list": ">=1.6.4"
+ "@types/react": ">=18.2.6"
+ "@walmart/allspark-authentication": ">=6.1.4"
+ "@walmart/allspark-foundation": "*"
+ "@walmart/allspark-http-client": ">=6.1.4"
+ "@walmart/core-services": ">=2.0.11"
+ "@walmart/gtp-shared-components": ">=2.2.4"
+ "@walmart/me-at-walmart-common": ">=6.1.4"
+ "@walmart/react-native-scanner-3.0": ">=0.6.8"
+ "@walmart/react-native-shared-navigation": ">=6.3.20"
+ "@walmart/react-native-sumo-sdk": ">=2.7.0"
+ axios-cache-adapter: "*"
+ expo-image: ">=1.5.0"
+ lottie-react-native: ">=6.7.2"
+ moment-timezone: ">=0.5.43"
+ react: ">=18.2.0"
+ react-native: "*"
+ react-native-drop-shadow: ">=1.0.0"
+ react-native-svg: ">=14.0.0"
+ react-native-svg-transformer: ">=1.3.0"
+ react-native-vision-camera: "*"
+ checksum: 10c0/e80a3571ca209964421487796fe3a5788af9c923c0778f5e9e112306772221869b8a48dcc2bde9f1fead5e634a616a810cba8b43b7d7415915a3f9f303b01d14
languageName: node
linkType: hard
@@ -7860,7 +7900,7 @@ __metadata:
"@walmart/redux-store": "npm:~6.3.28"
"@walmart/returns-mini-app": "npm:4.15.0"
"@walmart/rfid-scan-mini-app": "npm:2.7.1"
- "@walmart/rn-receiving-mini-app": "npm:2.4.45"
+ "@walmart/rn-receiving-mini-app": "npm:2.4.74"
"@walmart/roster-mini-app": "npm:2.9.0"
"@walmart/schedule-mini-app": "npm:1.13.0"
"@walmart/shelfavailability-mini-app": "npm:1.5.41"
@@ -8580,35 +8620,38 @@ __metadata:
languageName: node
linkType: hard
-"@walmart/rn-receiving-mini-app@npm:2.4.45":
- version: 2.4.45
- resolution: "@walmart/rn-receiving-mini-app@npm:2.4.45"
+"@walmart/rn-receiving-mini-app@npm:2.4.74":
+ version: 2.4.74
+ resolution: "@walmart/rn-receiving-mini-app@npm:2.4.74"
dependencies:
- "@walmart/atlas-rn-ui-components": "npm:1.1.36"
- "@walmart/loadquality-mini-app": "npm:1.0.156"
+ "@walmart/atlas-rn-ui-components": "npm:1.1.51"
+ "@walmart/loadquality-mini-app": "npm:1.0.196"
peerDependencies:
"@react-native-clipboard/clipboard": ">=1.14.0"
- "@react-navigation/native": ^6.0.8
+ "@react-native/metro-config": ">=0.73.0"
+ "@react-navigation/native": ">=6.0.8"
"@react-navigation/native-stack": ">=6.9.18"
- "@react-navigation/stack": ^6.2.0
+ "@react-navigation/stack": ">=6.2.0"
+ "@reduxjs/toolkit": ">=1.9.7"
"@shopify/flash-list": ">=1.6.4"
- "@types/react": ">=18.2.57"
- "@walmart/core-services": ~2.0.11
- "@walmart/gtp-shared-components": ^2.0.0
- "@walmart/react-native-env": ">=5.0.0-beta.78"
- "@walmart/react-native-scanner-3.0": ">=0.6.6"
- "@walmart/react-native-shared-navigation": ">=1.0.2"
- "@walmart/react-native-sumo-sdk": ">=2.4.0-rc.2"
- axios-cache-adapter: ">=2.7.3"
+ "@types/react": ">=18.2.6"
+ "@walmart/allspark-authentication": ">=6.1.4"
+ "@walmart/allspark-foundation": "*"
+ "@walmart/gtp-shared-components": ">=2.2.4"
+ "@walmart/me-at-walmart-common": ">=6.1.4"
+ "@walmart/react-native-scanner-3.0": ">=0.6.8"
+ "@walmart/react-native-sumo-sdk": ">=2.7.0"
+ axios-cache-adapter: "*"
+ expo-image: ">=1.5.0"
lottie-react-native: ">=6.7.2"
moment-timezone: ">=0.5.45"
- react: ^18.2.0
- react-native: ~0.70.5
+ react: ">=18.2.0"
+ react-native: "*"
react-native-drop-shadow: ">=1.0.0"
react-native-svg: ">=14.1.0"
- react-native-svg-transformer: ">=1.1.0"
- react-native-vision-camera: ^2.16.8
- checksum: 10c0/1e12ad9d2af62e95dd1fa18b9b6dab5e5fb276f5f567e03eafcaa2bc0d9d06440e93da810dce39c34d8a13c36210716d676ec5109117c7d93d3ba8abca6723bd
+ react-native-svg-transformer: ">=1.3.0"
+ react-native-vision-camera: "*"
+ checksum: 10c0/54299a6aa8f6cfd7df8b0f989911ac5a5a2c580d3e7ad4aa76abd21d8ac891c2a6798ab749b1a9d1aeccc1b77daa350a69b46d33cd4aa74e2c8adad5415ad250
languageName: node
linkType: hard
| Drop28 Receiving - 2.4.74 | Drop28 Receiving - 2.4.74
|
208543cb7146cb76374676a926f5e71eb33b12e0 | --- __tests__/startup/SsoSagaTest.ts
@@ -94,12 +94,12 @@ describe('handleSiteIdPrompt', () => {
describe('isSilentSignInError', () => {
it('returns true for silent error', () => {
- const error = 'Oh boy...Get user failed. Thats not good!';
+ const error = new Error('Oh boy...Get user failed. Thats not good!');
expect(isSilentSignInError(error)).toEqual(true);
});
it('returns false for not silent error', () => {
- const error = 'Oh no! SSO is infected with a malicious virus!';
+ const error = new Error('Oh no! SSO is infected with a malicious virus!');
expect(isSilentSignInError(error)).toEqual(false);
});
@@ -110,14 +110,14 @@ describe('isSilentSignInError', () => {
describe('handleSignInFailure', () => {
it('handles silent sso error', () => {
- const error = 'Oh boy...Get user failed. Thats not good!';
+ const error = new Error('Oh boy...Get user failed. Thats not good!');
const iterator = handleSignInFailure(error);
expect(iterator.next().value).toEqual(call(isSilentSignInError, error));
expect(iterator.next(true).done).toEqual(true);
});
it('handles not silent sso error', () => {
- const error = 'Oh no! SSO is infected with a malicious virus!';
+ const error = new Error('Oh no! SSO is infected with a malicious virus!');
const iterator = handleSignInFailure(error);
expect(iterator.next().value).toEqual(call(isSilentSignInError, error));
expect(iterator.next(false).value).toEqual(
--- __tests__/startup/StartupSagaTest.ts
@@ -287,7 +287,7 @@ describe('loginFlow', () => {
});
it('handles sign in failure', () => {
- const error = 'Something went wrong!';
+ const error = new Error('Something went wrong!');
const captureEventTask = createMockTask();
const iterator = loginFlow();
expect(iterator.next().value).toEqual(fork(captureMissedMiniAppEvents));
@@ -295,20 +295,20 @@ describe('loginFlow', () => {
take([SIGN_IN_SUCCESS, START_IMPERSONATION, SIGN_IN_ERROR]),
);
expect(iterator.next({type: SIGN_IN_ERROR, payload: error}).value).toEqual(
- call(handleSignInFailure, error),
+ fork(handleSignInFailure, error),
);
expect(iterator.next().value).toEqual(cancel(captureEventTask));
});
it('handles sign in failure with async flag and task not defined', () => {
- const error = 'Something went wrong!';
+ const error = new Error('Something went wrong!');
const iterator = loginFlow();
expect(iterator.next().value).toEqual(fork(captureMissedMiniAppEvents));
expect(iterator.next(undefined).value).toEqual(
take([SIGN_IN_SUCCESS, START_IMPERSONATION, SIGN_IN_ERROR]),
);
expect(iterator.next({type: SIGN_IN_ERROR, payload: error}).value).toEqual(
- call(handleSignInFailure, error),
+ fork(handleSignInFailure, error),
);
expect(iterator.next(undefined).value).toEqual(
fork(captureMissedMiniAppEvents),
--- src/startup/SsoSagas.ts
@@ -38,12 +38,12 @@ export function* handleSiteIdPrompt(): any {
const SILENT_SSO_ERRORS = ['get user failed'];
-export const isSilentSignInError = (error?: string) =>
+export const isSilentSignInError = (error?: Error) =>
SILENT_SSO_ERRORS.some((silentError) =>
- error?.toLowerCase().includes(silentError),
+ `${error}`.toLowerCase().includes(silentError),
);
-export function* handleSignInFailure(error: string): any {
+export function* handleSignInFailure(error: Error): any {
const isSilentError = yield call(isSilentSignInError, error);
if (!isSilentError) {
--- src/startup/StartupSaga.ts
@@ -145,7 +145,7 @@ export function* loginFlow(): any {
yield cancel(pinPromptTask);
}
} else {
- yield call(handleSignInFailure, signInAction.payload);
+ yield fork(handleSignInFailure, signInAction.payload);
if (captureEventTask) {
yield cancel(captureEventTask);
| Fixing error in isSilentSignInError | Fixing error in isSilentSignInError
|
acb437cc2802067b4818894c9d9d340b4471a71e | --- packages/me-at-walmart-container/src/environment/types.ts
@@ -26,6 +26,7 @@ export interface IMeAtWalmartEnvironment {
url: string;
headers: Record<string, string>;
persistedQueries: boolean;
+ includeOperationName?: boolean;
};
logger: {
url: string;
--- packages/me-at-walmart-container/src/graphql/links.ts
@@ -61,10 +61,9 @@ export const ErrorLoggerLink = onError(({ graphQLErrors }) => {
});
export const AthenaUriLink = new ApolloLink((operation, forward) => {
- if (
- AllsparkEnvironment.getCurrent<IMeAtWalmartEnvironment>().graphql
- .persistedQueries
- ) {
+ const config = AllsparkEnvironment.getCurrent().graphql;
+
+ if (config.includeOperationName || config.persistedQueries) {
operation.setContext({
uri: `/graphql/${operation.operationName}/${generateQueryHash(
operation.query
| feat: add operation name header config to env | feat: add operation name header config to env
|
279851f227688db34138b45a30780c0aeff8a9c0 | --- __tests__/core/screenTrackerTest.ts
@@ -18,7 +18,7 @@ describe('isBlockedScreen', () => {
});
it('returns false if not blocked screen', () => {
- const blocked = isBlockedScreen('home');
+ const blocked = isBlockedScreen('home.root');
expect(blocked).toEqual(false);
});
});
@@ -36,7 +36,7 @@ describe('screenTracker', () => {
});
it('dispatches an action on the homescreen', () => {
- const screen1 = 'home';
+ const screen1 = 'home.root';
const screen2 = 's2';
screenTracker(screen1, screen2);
expect(WmTelemetry.logScreenView).toHaveBeenCalledWith(screen1);
@@ -46,8 +46,8 @@ describe('screenTracker', () => {
});
it('does nothing if screen doesnt change', () => {
- const screen1 = 'home';
- const screen2 = 'home';
+ const screen1 = 'home.root';
+ const screen2 = 'home.root';
screenTracker(screen1, screen2);
expect(WmTelemetry.logScreenView).not.toHaveBeenCalled();
expect(mockDispatch).not.toHaveBeenCalled();
--- src/core/screenTracker.ts
@@ -25,7 +25,7 @@ export const screenTracker = (currentScreen?: string, prevScreen?: string) => {
currentRoute = currentScreen;
// Specific, temporary home screen use case for survey
- if (currentScreen === 'home') {
+ if (currentScreen === 'home.root') {
getStore().dispatch({type: 'core/NAVIGATE_HOME'});
}
}
| Screen tracker fix | Screen tracker fix
|
d7644088f91cd151b6228a8853aa2c013918128c | --- package-lock.json
@@ -5210,9 +5210,9 @@
"integrity": "sha512-07E3+9TmADmmfshDt5JtR87aQzVziaR/AO8aRPFKMcJ4/dI9NYeQMe7WC3E5/FjmhwSftrk8fdERlBFc522mrw=="
},
"@walmart/inbox-mini-app": {
- "version": "0.40.0-inbox3.31",
- "resolved": "https://npme.walmart.com/@walmart/inbox-mini-app/-/inbox-mini-app-0.40.0-inbox3.31.tgz",
- "integrity": "sha512-2qYjBG55BADSxutQBXWDJAbT/0FqB4iUg9vUZhsD5gUDiBI0nu/I/Eq3jRmbhR0qgfit7lntqOj1aTCaxfRpMA==",
+ "version": "0.40.0-inbox3.32",
+ "resolved": "https://npme.walmart.com/@walmart/inbox-mini-app/-/inbox-mini-app-0.40.0-inbox3.32.tgz",
+ "integrity": "sha512-f7Zwbu4Yi7HdUC/vrj4gWpQtMcVJzuRxcztPrT4Rs4/XDS6/HCjfpmgCZKIO6EToKD+/gIibDyT3e7ghtEJaXQ==",
"requires": {
"@walmart/walmart-fiscal-week": "^0.3.6"
}
--- package.json
@@ -87,7 +87,7 @@
"@walmart/gtp-shared-components": "1.6.0",
"@walmart/impersonation-mini-app": "1.2.0",
"@walmart/ims-print-services-ui": "1.0.3",
- "@walmart/inbox-mini-app": "0.40.0-inbox3.31",
+ "@walmart/inbox-mini-app": "0.40.0-inbox3.32",
"@walmart/iteminfo-mini-app": "4.2.6",
"@walmart/manager-approvals-miniapp": "0.0.62",
"@walmart/me-field-mini-app": "^1.1.11",
| version bump | version bump
|
6fe87bc54241c5edff63a6bf60835a46a05c2069 | --- src/channels/services.ts
@@ -2,6 +2,7 @@ import moment from 'moment-timezone';
import firestore from '@react-native-firebase/firestore';
import namecase from 'namecase';
import {CommonGraphQLClient} from '@walmart/allspark-graphql-client';
+import {getEnvContext} from '@walmart/core-services/Environment';
import {FirebaseMessage} from '../types';
import {decryptUserId} from '../utils';
@@ -60,7 +61,7 @@ export const fetchChannelName = async (channel: LocalFirebaseChannel) => {
id: recipient,
},
errorPolicy: 'all',
- context: getGraphQLConfig(),
+ context: getGraphQLConfig(getEnvContext()!),
});
}),
);
--- src/screens/RosterScreen.tsx
@@ -22,7 +22,6 @@ const styles = StyleSheet.create({
},
teamCard: {
marginTop: 16,
- marginBottom: 24,
marginHorizontal: 16,
},
error: {
@@ -38,6 +37,7 @@ const styles = StyleSheet.create({
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
+ marginTop: 24,
marginBottom: 16,
marginHorizontal: 16,
},
@@ -133,11 +133,6 @@ export const RosterScreen: React.FC<RosterScreenProps> = () => {
variant='warning'
children={'Error fetching daily roster'}
UNSAFE_style={styles.error}
- actionButtonProps={{
- children: 'Retry',
- // @ts-ignore
- onPress: refetch,
- }}
/>
);
}
--- src/services/config.ts
@@ -2,11 +2,16 @@ import type {EnvConfig} from '@walmart/core-services/Environment';
export const HTTP_CLIENT_KEY = 'texting';
-export const getGraphQLConfig = () => ({
- headers: {
- 'wm_consumer.id': '3bc56dfb-b2c6-4086-a359-a8ca106e858c',
- },
-});
+export const getGraphQLConfig = (envConfig: EnvConfig) => {
+ return {
+ headers: {
+ 'wm_consumer.id': envConfig.consumerId, // temporary until onboarded with athena
+ // envConfig.env === 'prod'
+ // ? 'cfac4a3d-ae91-43c8-81f5-ceb838e4cd44'
+ // : '25fe4e50-7085-4793-863c-08b990282345',
+ },
+ };
+};
// Will be used to configure clone provider, which will merge config with instance above
export const getHttpConfig = (envConfig: EnvConfig) => ({
--- src/channels/services.ts
@@ -2,6 +2,7 @@ import moment from 'moment-timezone';
import firestore from '@react-native-firebase/firestore';
import namecase from 'namecase';
import {CommonGraphQLClient} from '@walmart/allspark-graphql-client';
+import {getEnvContext} from '@walmart/core-services/Environment';
import {FirebaseMessage} from '../types';
import {decryptUserId} from '../utils';
@@ -60,7 +61,7 @@ export const fetchChannelName = async (channel: LocalFirebaseChannel) => {
id: recipient,
},
errorPolicy: 'all',
- context: getGraphQLConfig(),
+ context: getGraphQLConfig(getEnvContext()!),
});
}),
);
--- src/screens/RosterScreen.tsx
@@ -22,7 +22,6 @@ const styles = StyleSheet.create({
},
teamCard: {
marginTop: 16,
- marginBottom: 24,
marginHorizontal: 16,
},
error: {
@@ -38,6 +37,7 @@ const styles = StyleSheet.create({
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
+ marginTop: 24,
marginBottom: 16,
marginHorizontal: 16,
},
@@ -133,11 +133,6 @@ export const RosterScreen: React.FC<RosterScreenProps> = () => {
variant='warning'
children={'Error fetching daily roster'}
UNSAFE_style={styles.error}
- actionButtonProps={{
- children: 'Retry',
- // @ts-ignore
- onPress: refetch,
- }}
/>
);
}
--- src/services/config.ts
@@ -2,11 +2,16 @@ import type {EnvConfig} from '@walmart/core-services/Environment';
export const HTTP_CLIENT_KEY = 'texting';
-export const getGraphQLConfig = () => ({
- headers: {
- 'wm_consumer.id': '3bc56dfb-b2c6-4086-a359-a8ca106e858c',
- },
-});
+export const getGraphQLConfig = (envConfig: EnvConfig) => {
+ return {
+ headers: {
+ 'wm_consumer.id': envConfig.consumerId, // temporary until onboarded with athena
+ // envConfig.env === 'prod'
+ // ? 'cfac4a3d-ae91-43c8-81f5-ceb838e4cd44'
+ // : '25fe4e50-7085-4793-863c-08b990282345',
+ },
+ };
+};
// Will be used to configure clone provider, which will merge config with instance above
export const getHttpConfig = (envConfig: EnvConfig) => ({
| fix: list empty state style. graphql consumer id | fix: list empty state style. graphql consumer id
|
e8156bb3fc6d4f5e0731a5cd2a70b8d666b024d9 | --- .looper.multibranch.yml
@@ -93,7 +93,7 @@ envs:
releaseType: "test"
releaseTypeDesc: "Build from a feature branch; test feature in isolation"
slackIcon: ":firecracker:"
- slackChannel: "allspark-build-test"
+ slackChannel: "allspark-builds-developer"
buildType: "SNAPSHOT"
develop:
@@ -101,7 +101,7 @@ envs:
releaseType: "develop"
releaseTypeDesc: "Builds from develop branch; internal integration testing"
slackIcon: ":construction:"
- slackChannel: "allspark-build-test"
+ slackChannel: "allspark-buils-developer"
buildType: "SNAPSHOT"
rc:
@@ -109,7 +109,7 @@ envs:
releaseType: "rc"
releaseTypeDesc: "Build from release branch; release candidate meant for wider testing"
slackIcon: ":8bitmaro:"
- slackChannel: "allspark-build-test"
+ slackChannel: "allspark-builds-rc"
buildType: "SNAPSHOT"
master:
@@ -117,7 +117,7 @@ envs:
releaseType: "master"
releaseTypeDesc: "Build from master branch; will be deployed to production"
slackIcon: ":cool-doge:"
- slackChannel: "allspark-build-test"
+ slackChannel: "allspark-builds-prod"
buildType: "RELEASE"
hotfix:
@@ -125,7 +125,7 @@ envs:
releaseType: "hotfix"
releaseTypeDesc: "Build from hotfix branch; meant for wider testing"
slackIcon: ":hotsprings"
- slackChannel: "allspark-build-test"
+ slackChannel: "allspark-builds-developer"
buildType: "SNAPSHOT"
## deployments
@@ -197,13 +197,13 @@ rules:
# - withcache('npm-cache'):
# - $proceed
- around(cocoapods-install):
- - var(cachePresent): isChecksumExists('cocoapods_cache')
- - if: $cachePresent
- then:
- - $proceed
- else:
- - withcache('cocoapods_cache'):
- - $proceed
+ # - var(cachePresent): isChecksumExists('cocoapods_cache')
+ # - if: $cachePresent
+ # then:
+ # - $proceed
+ # else:
+ - withcache('cocoapods_cache'):
+ - $proceed
flows:
@@ -294,8 +294,8 @@ flows:
build-snapshot:
- declare(buildOutput)
- declare(sourceMap)
+ - var(version): sh scripts/getIOSAppVersionFromInfoPlist.sh ios/AllSpark/Info.plist
- try:
- - var(version): sh scripts/getIOSAppVersionFromInfoPlist.sh ios/AllSpark/Info.plist
- if: |
%{os == "ios"}
then:
@@ -316,8 +316,8 @@ flows:
build-release:
- declare(buildOutput)
- declare(sourceMap)
+ - var(version): sh scripts/getIOSAppVersionFromInfoPlist.sh ios/AllSpark/Info.plist
- try:
- - var(version): sh scripts/getIOSAppVersionFromInfoPlist.sh ios/AllSpark/Info.plist
- var(artifactId = "allspark-core-${os}-${env}")
- var(fullUrl = "${BASE_PROXIMITY_RELEASE_URL}/com/walmart/store/allspark/${artifactId}/${version}/${artifactId}-${version}.${packaging}")
- var(result):
@@ -367,20 +367,28 @@ flows:
cocoapods-install:
- dir(ios):
- - echo "Installing cocoapods"
- - |
- (name delete index file)
- #!/bin/sh -x
- ls -l ~/.cocoapods/repos/cocoapods/.git/index.lock
- rc=$?
- if [ $rc -eq 0 ]
- then
- echo "removing file"
- rm -f ~/.cocoapods/repos/cocoapods/.git/index.lock
- fi
- exit 0
- - (name cocoapods setup) ./BuildSupport/install-cocoapods.sh
- - (name prepare xcode) sudo /usr/local/bin/xcversion select $TARGET_XCODE
+ - var (podsInstalled):
+ sh ../scripts/checkIfPodsExist.sh
+ - echo "arePodsInstalled-- ${podsInstalled}"
+ - if: |
+ %{podsInstalled != '0'}
+ then:
+ - echo "Pods folder not found; proceeding with pod install"
+ - |
+ (name delete index file)
+ #!/bin/sh -x
+ ls -l ~/.cocoapods/repos/cocoapods/.git/index.lock
+ rc=$?
+ if [ $rc -eq 0 ]
+ then
+ echo "removing file"
+ rm -f ~/.cocoapods/repos/cocoapods/.git/index.lock
+ fi
+ exit 0
+ - (name cocoapods setup) ./BuildSupport/install-cocoapods.sh
+ - (name prepare xcode) sudo /usr/local/bin/xcversion select $TARGET_XCODE
+ else:
+ - echo "pods already installed"
# performs the ios build for the given env
#
| fix pods cache; fix slack channel names | fix pods cache; fix slack channel names
|
ebd0ec2f136ebf5346ece0bdc275c31b98080439 | --- src/navigation/USHallway/AssociateHallwayNav/MainStackNav.tsx
@@ -166,7 +166,7 @@ const MiniAppScreens = createMiniAppScreens(MainStack, [
options: {
headerShown: false,
},
- clockCheckEnabled: false,
+ clockCheckEnabled: true,
},
{
featureId: MINI_APPS.AMP,
| fix(IP-13701): enable clock check for receiving app (#4551) | fix(IP-13701): enable clock check for receiving app (#4551)
|
a2dff2ca438a7e11d36d6cf66da467d42207d7ec | --- packages/celebration-mini-app-graphql/src/components/Widget/CelebrationAvatars.tsx
@@ -1,11 +1,12 @@
import React from 'react';
import {View, TouchableOpacity} from 'react-native';
-import {Caption} from '@walmart/gtp-shared-components';
+import {Body} from '@walmart/gtp-shared-components';
import {AssociateAvatar} from '@walmart/my-walmart-components';
import {CelebrationEvent} from '../../types';
import {styles} from './styles';
import {CelebrationGraphQLLogger} from '../../utils/logger';
import {CelebrationGraphQLTelemetryHelpers} from '../../utils/telemetry';
+import {useCelebrationCCM} from '../../hooks';
interface CelebrationAvatarsProps {
celebrationList: (CelebrationEvent & {years?: number})[];
@@ -32,10 +33,14 @@ export const CelebrationAvatars: React.FC<CelebrationAvatarsProps> = ({
}) => {
// Based on the number of celebrations in the list
const totalCelebrations = celebrationList.length;
+ const {maxCelebrationsInWidget} = useCelebrationCCM();
// If 6 or fewer celebrations, show all of them (up to 6)
// If 7 or more celebrations, show only 5 and add a "+x more" indicator
- const displayLimit = totalCelebrations <= 6 ? 6 : 5;
+ const displayLimit =
+ totalCelebrations <= maxCelebrationsInWidget
+ ? maxCelebrationsInWidget
+ : maxCelebrationsInWidget - 1;
// Get the celebrations to display based on the effective limit
const displayedCelebrations = celebrationList.slice(0, displayLimit);
@@ -101,9 +106,7 @@ export const CelebrationAvatars: React.FC<CelebrationAvatarsProps> = ({
accessibilityRole='text'
testID='celebration-overflow-indicator'
>
- <Caption>
- +{remainingCount} more
- </Caption>
+ <Body>+{remainingCount} more</Body>
</View>
)}
</View>
--- packages/celebration-mini-app-graphql/src/components/Widget/HubCelebrationWidget.tsx
@@ -303,9 +303,8 @@ const HubCelebrationWidgetCore: React.FC<HubCelebrationWidgetProps> = ({
: [];
return {
- // Limit the number of celebrations based on CCM setting
- anniversaries: anniversaries.slice(0, maxCelebrationsInWidget),
- birthdays: birthdays.slice(0, maxCelebrationsInWidget),
+ anniversaries: anniversaries,
+ birthdays: birthdays,
};
}, [
celebrations,
--- packages/celebration-mini-app-graphql/src/hooks/useCelebrationViewState.ts
@@ -4,7 +4,6 @@
import {useMemo} from 'react';
import type {CelebrationEvent} from '../types';
import type {GroupedCelebrations} from '../utils/celebrationUtils';
-import {hasCelebrationsToDisplay} from '../utils/celebrationUtils';
export type ViewState = 'loading' | 'error' | 'disabled' | 'empty' | 'content';
@@ -36,7 +35,7 @@ export const useCelebrationViewState = ({
if (isLoading) return 'loading';
if (error) return 'error';
if (celebrations.length === 0) return 'empty';
- if (!hasCelebrationsToDisplay(selectedCelebrationType, groupedCelebrations)) return 'empty';
+ // if (!hasCelebrationsToDisplay(selectedCelebrationType, groupedCelebrations)) return 'empty';
return 'content';
}, [isLoading, error, isFeatureEnabled, celebrations.length, groupedCelebrations, selectedCelebrationType]);
--- packages/celebration-mini-app/src/components/Widget/CelebrationAvatars.tsx
@@ -1,11 +1,12 @@
import React from 'react';
import {View, TouchableOpacity} from 'react-native';
-import {Caption} from '@walmart/gtp-shared-components';
+import {Body} from '@walmart/gtp-shared-components';
import {AssociateAvatar} from '@walmart/my-walmart-components';
import {CelebrationEvent} from '../../types';
import {CelebrationLogger} from '../../utils/logger';
import {CelebrationTelemetryHelpers} from '../../utils/telemetry';
import {styles} from './styles';
+import {useCelebrationCCM} from '../../hooks';
interface CelebrationAvatarsProps {
celebrationList: (CelebrationEvent & {years?: number})[];
@@ -32,10 +33,13 @@ export const CelebrationAvatars: React.FC<CelebrationAvatarsProps> = ({
}) => {
// Based on the number of celebrations in the list
const totalCelebrations = celebrationList.length;
-
+ const {maxCelebrationsInWidget} = useCelebrationCCM();
// If 6 or fewer celebrations, show all of them (up to 6)
// If 7 or more celebrations, show only 5 and add a "+x more" indicator
- const displayLimit = totalCelebrations <= 6 ? 6 : 5;
+ const displayLimit =
+ totalCelebrations <= maxCelebrationsInWidget
+ ? maxCelebrationsInWidget
+ : maxCelebrationsInWidget - 1;
// Get the celebrations to display based on the effective limit
const displayedCelebrations = celebrationList.slice(0, displayLimit);
@@ -101,9 +105,7 @@ export const CelebrationAvatars: React.FC<CelebrationAvatarsProps> = ({
accessibilityRole='text'
testID='celebration-overflow-indicator'
>
- <Caption>
- +{remainingCount} more
- </Caption>
+ <Body>+{remainingCount} more</Body>
</View>
)}
</View>
--- packages/celebration-mini-app/src/components/Widget/HubCelebrationWidget.tsx
@@ -333,9 +333,8 @@ const HubCelebrationWidgetCore: React.FC<HubCelebrationWidgetProps> = ({
: [];
return {
- // Limit the number of celebrations based on CCM setting
- anniversaries: anniversaries.slice(0, maxCelebrationsInWidget),
- birthdays: birthdays.slice(0, maxCelebrationsInWidget),
+ anniversaries: anniversaries,
+ birthdays: birthdays
};
}, [
celebrations,
--- packages/celebration-mini-app/src/hooks/useCelebrationViewState.ts
@@ -6,10 +6,7 @@
import {useMemo} from 'react';
import {CelebrationEvent, CelebrationType} from '../types';
-import {
- GroupedCelebrations,
- hasCelebrationsToDisplay,
-} from '../utils/celebrationUtils';
+import {GroupedCelebrations} from '../utils/celebrationUtils';
export type ViewState = 'loading' | 'error' | 'disabled' | 'empty' | 'content';
@@ -57,11 +54,11 @@ export const useCelebrationViewState = ({
return 'empty';
}
- if (
- !hasCelebrationsToDisplay(selectedCelebrationType, groupedCelebrations)
- ) {
- return 'empty';
- }
+ // if (
+ // !hasCelebrationsToDisplay(selectedCelebrationType, groupedCelebrations)
+ // ) {
+ // return 'empty';
+ // }
return 'content';
}, [
| fix(ui): celebration screen birthday tab | fix(ui): celebration screen birthday tab
|
7bd88ae83293a4d889b9d93684b4fffc1db7efe5 | --- src/channels/provider.tsx
@@ -131,6 +131,7 @@ export const ChannelsProvider = (props: PropsWithChildren<{}>) => {
} else {
storeChannelDoc.update({
participants: firestore.FieldValue.arrayUnion(viewerId),
+ lastMessageTime: firestore.FieldValue.serverTimestamp(),
});
}
});
--- src/channels/provider.tsx
@@ -131,6 +131,7 @@ export const ChannelsProvider = (props: PropsWithChildren<{}>) => {
} else {
storeChannelDoc.update({
participants: firestore.FieldValue.arrayUnion(viewerId),
+ lastMessageTime: firestore.FieldValue.serverTimestamp(),
});
}
});
| update push notification for team and store | update push notification for team and store
|
ecd614a055d6a88b98737b7b00442cc70e123d31 | --- src/constants.ts
@@ -10,7 +10,6 @@ export const WHOLE_STORE = 'WHOLESTORE';
export const PUSHTOTALK_SCREEN_NAME = 'myTeam.pushToTalk';
export const LOCAL_STORAGE_KEY_PREFIX = 'texting-';
export const SEVEN_DAYS_AGO_TIMESTAMP = daysAgoTimestamp(7);
-export const TEXTING_MINI_APP_CACHE_NAMESPACE = 'texting_miniapp';
// eslint-disable-next-line no-shadow
export enum messageTypes {
--- src/presence/service.ts
@@ -2,11 +2,11 @@ import firestore from '@react-native-firebase/firestore';
import {FIRESTORE_OFFLINE_DATA, FIRESTORE_ONLINE_DATA} from './constants';
import {createUserDocumentPath} from './utils';
import AsyncStorage from '@react-native-community/async-storage';
-import {TEXTING_MINI_APP_CACHE_NAMESPACE} from '../constants';
+import {LOCAL_STORAGE_KEY_PREFIX} from '../constants';
import {logger} from '../logger/Logger';
export const OFFLINE_LIMIT = 12 * 60 * 60;
-const LAST_OFFLINE_CACHE_KEY = `${TEXTING_MINI_APP_CACHE_NAMESPACE}_dnd_last_offline`;
+const LAST_OFFLINE_CACHE_KEY = `${LOCAL_STORAGE_KEY_PREFIX}_dnd_last_offline`;
export const goOnlineForUser = (storeId: string, userId: string) => {
const userDocument = createUserDocumentPath(storeId, userId);
--- src/constants.ts
@@ -10,7 +10,6 @@ export const WHOLE_STORE = 'WHOLESTORE';
export const PUSHTOTALK_SCREEN_NAME = 'myTeam.pushToTalk';
export const LOCAL_STORAGE_KEY_PREFIX = 'texting-';
export const SEVEN_DAYS_AGO_TIMESTAMP = daysAgoTimestamp(7);
-export const TEXTING_MINI_APP_CACHE_NAMESPACE = 'texting_miniapp';
// eslint-disable-next-line no-shadow
export enum messageTypes {
--- src/presence/service.ts
@@ -2,11 +2,11 @@ import firestore from '@react-native-firebase/firestore';
import {FIRESTORE_OFFLINE_DATA, FIRESTORE_ONLINE_DATA} from './constants';
import {createUserDocumentPath} from './utils';
import AsyncStorage from '@react-native-community/async-storage';
-import {TEXTING_MINI_APP_CACHE_NAMESPACE} from '../constants';
+import {LOCAL_STORAGE_KEY_PREFIX} from '../constants';
import {logger} from '../logger/Logger';
export const OFFLINE_LIMIT = 12 * 60 * 60;
-const LAST_OFFLINE_CACHE_KEY = `${TEXTING_MINI_APP_CACHE_NAMESPACE}_dnd_last_offline`;
+const LAST_OFFLINE_CACHE_KEY = `${LOCAL_STORAGE_KEY_PREFIX}_dnd_last_offline`;
export const goOnlineForUser = (storeId: string, userId: string) => {
const userDocument = createUserDocumentPath(storeId, userId);
| using common cache prefix | using common cache prefix
|
b14a0fcc7c6df7bfa32c49349386789f9f3ab70f | --- yarn.lock
@@ -8334,19 +8334,19 @@ __metadata:
languageName: node
linkType: hard
-"@walmart/facilities-management-miniapp@npm:0.18.41":
- version: 0.18.41
- resolution: "@walmart/facilities-management-miniapp@npm:0.18.41::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Ffacilities-management-miniapp%2F-%2F%40walmart%2Ffacilities-management-miniapp-0.18.41.tgz"
+"@walmart/facilities-management-miniapp@npm:0.18.44":
+ version: 0.18.44
+ resolution: "@walmart/facilities-management-miniapp@npm:0.18.44::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Ffacilities-management-miniapp%2F-%2F%40walmart%2Ffacilities-management-miniapp-0.18.44.tgz"
peerDependencies:
"@walmart/gtp-shared-components-3": "*"
- expo: ~52.0.46
+ expo: ^53.0.20
react: "*"
react-native: "*"
react-native-wm-config: 0.1.1
dependenciesMeta:
"@walmart/me-at-walmart":
built: false
- checksum: 10c0/b4ed0b0b24cc761c3a4efa1addfe552d2ba4a45542997fa80deb4f484e9aa3b14f9e14c8d60d2d5db99ac7fae88f252ea67075a4528678496267c08876c261d6
+ checksum: 10c0/87afb3f9a0ba0228f0242f692e7c80fa2fd9fee768362c4be6105ff21f83ae33e46e49f5689215d2e6817206805ab3af49fc3da503ae8cc1fda8baea537b6deb
languageName: node
linkType: hard
@@ -8852,7 +8852,7 @@ __metadata:
"@walmart/emergency-mini-app": "npm:1.32.7"
"@walmart/exception-mini-app": "npm:1.10.3"
"@walmart/expo-config-plugins": "npm:0.11.3"
- "@walmart/facilities-management-miniapp": "npm:0.18.41"
+ "@walmart/facilities-management-miniapp": "npm:0.18.44"
"@walmart/feedback-all-spark-miniapp": "npm:0.9.82"
"@walmart/financial-wellbeing-feature-app": "npm:1.31.14"
"@walmart/functional-components": "npm:~6.3.28"
| feat(fm): navigation fix - fm@0.18.44 | feat(fm): navigation fix - fm@0.18.44
|
3ccc320e3809125b69d4a9ff246aa2c146aa5da1 | --- __tests__/core/initSSOTest.ts
@@ -1,93 +0,0 @@
-import WmTelemetry from 'react-native-wm-telemetry';
-import {
- SSOPingFedEvents,
- ssoEventEmitter,
- SSOPingFedEventData,
-} from 'react-native-ssmp-sso-allspark';
-import {
- addSSOListeners,
- ssoTelemetryEventListener,
-} from '../../src/core/initSSO';
-import {logger} from '../../src/services/Logger';
-import {SSO_APP} from '../../src/types/telemetryConstants';
-
-jest.mock('../../src/services/Logger', () => ({
- logger: {
- info: jest.fn(),
- error: jest.fn(),
- },
-}));
-
-describe('addSSOListeners', () => {
- it('sets env, redirect uri, and gets existing user', async () => {
- addSSOListeners();
-
- expect(ssoEventEmitter.addListener).toHaveBeenCalledWith(
- SSOPingFedEvents.name,
- ssoTelemetryEventListener,
- );
- });
-});
-
-describe('ssoTelemetryEventListener', () => {
- beforeEach(() => {
- jest.clearAllMocks();
- });
-
- it('handles error events', () => {
- const event = {
- action: SSOPingFedEvents.types.error,
- error: 'oops',
- } as SSOPingFedEventData;
-
- ssoTelemetryEventListener(event);
-
- expect(WmTelemetry.logEvent).toHaveBeenCalledWith(
- SSO_APP,
- 'error_encountered',
- {
- error: event.error,
- },
- );
- expect(logger.error).toHaveBeenCalledWith('Error event from SSO', {
- message: event.error,
- });
- });
-
- it('handles sign out events', () => {
- const event = {
- action: SSOPingFedEvents.types.signedOut,
- } as SSOPingFedEventData;
-
- ssoTelemetryEventListener(event);
-
- expect(WmTelemetry.logEvent).toHaveBeenCalledWith(SSO_APP, 'sign_out', {});
- expect(logger.info).toHaveBeenCalledWith('Sign out event from SSO', {});
- });
-
- it('handles auth success events', () => {
- const event = {
- action: SSOPingFedEvents.types.authSuccess,
- } as SSOPingFedEventData;
-
- ssoTelemetryEventListener(event);
-
- expect(WmTelemetry.logEvent).toHaveBeenCalledWith(SSO_APP, 'successful', {
- isPreHire: 'false',
- });
- expect(logger.info).toHaveBeenCalledWith('User sign in succeeded', {});
- });
-
- it('handles user changed events', () => {
- const event = {
- action: SSOPingFedEvents.types.userChanged,
- } as SSOPingFedEventData;
-
- ssoTelemetryEventListener(event);
-
- expect(WmTelemetry.logEvent).toHaveBeenCalledWith(SSO_APP, 'successful', {
- isPreHire: 'false',
- });
- expect(logger.info).toHaveBeenCalledWith('User change succeeded', {});
- });
-});
--- __tests__/core/initSsoTest.ts
@@ -1,97 +0,0 @@
-import WmTelemetry from 'react-native-wm-telemetry';
-import {
- SSOPingFedEvents,
- ssoEventEmitter,
- SSOPingFedEventData,
-} from 'react-native-ssmp-sso-allspark';
-import {
- addSSOListeners,
- ssoTelemetryEventListener,
-} from '../../src/core/initSSO';
-import {logger} from '../../src/services/Logger';
-import {SSO_APP} from '../../src/types/telemetryConstants';
-
-jest.mock('../../src/services/Logger', () => ({
- logger: {
- info: jest.fn(),
- error: jest.fn(),
- },
-}));
-
-describe('addSSOListeners', () => {
- it('sets env, redirect uri, and gets existing user', async () => {
- addSSOListeners();
-
- expect(ssoEventEmitter.addListener).toHaveBeenCalledWith(
- SSOPingFedEvents.name,
- ssoTelemetryEventListener,
- );
- });
-});
-
-describe('ssoTelemetryEventListener', () => {
- beforeEach(() => {
- jest.clearAllMocks();
- });
-
- it('handles error events', () => {
- const event = {
- action: SSOPingFedEvents.types.error,
- error: 'oops',
- } as SSOPingFedEventData;
-
- ssoTelemetryEventListener(event);
-
- expect(WmTelemetry.logEvent).toHaveBeenCalledWith(
- SSO_APP,
- 'error_encountered',
- {
- error: event.error,
- },
- );
- expect(logger.error).toHaveBeenCalledWith('Error event from SSO', {
- message: event.error,
- });
- });
-
- it('handles sign out events', () => {
- const event = {
- action: SSOPingFedEvents.types.signedOut,
- } as SSOPingFedEventData;
-
- ssoTelemetryEventListener(event);
-
- expect(WmTelemetry.logEvent).toHaveBeenCalledWith(SSO_APP, 'sign_out', {});
- expect(logger.info).toHaveBeenCalledWith('Sign out event from SSO', {});
- });
-
- it('handles auth success events', () => {
- const event = {
- action: SSOPingFedEvents.types.authSuccess,
- } as SSOPingFedEventData;
-
- ssoTelemetryEventListener(event);
-
- expect(WmTelemetry.logEvent).toHaveBeenCalledWith(
- SSO_APP,
- 'successful',
- {},
- );
- expect(logger.info).toHaveBeenCalledWith('User sign in succeeded', {});
- });
-
- it('handles user changed events', () => {
- const event = {
- action: SSOPingFedEvents.types.userChanged,
- } as SSOPingFedEventData;
-
- ssoTelemetryEventListener(event);
-
- expect(WmTelemetry.logEvent).toHaveBeenCalledWith(
- SSO_APP,
- 'successful',
- {},
- );
- expect(logger.info).toHaveBeenCalledWith('User change succeeded', {});
- });
-});
| delete the initSSOTest.ts | delete the initSSOTest.ts
|
dcc65475e417807f45953dff43eb978e0abc5f20 | --- targets/US/package.json
@@ -144,7 +144,7 @@
"@walmart/roster-mini-app": "2.8.2",
"@walmart/schedule-mini-app": "0.118.0",
"@walmart/shelfavailability-mini-app": "1.5.33",
- "@walmart/sidekick-mini-app": "4.77.0-1303-c9db975",
+ "@walmart/sidekick-mini-app": "4.80.1",
"@walmart/store-feature-orders": "1.26.12",
"@walmart/taskit-mini-app": "4.17.10",
"@walmart/time-clock-mini-app": "2.400.0",
--- yarn.lock
@@ -6870,7 +6870,7 @@ __metadata:
"@walmart/roster-mini-app": "npm:2.8.2"
"@walmart/schedule-mini-app": "npm:0.118.0"
"@walmart/shelfavailability-mini-app": "npm:1.5.33"
- "@walmart/sidekick-mini-app": "npm:4.77.0-1303-c9db975"
+ "@walmart/sidekick-mini-app": "npm:4.80.1"
"@walmart/store-feature-orders": "npm:1.26.12"
"@walmart/taskit-mini-app": "npm:4.17.10"
"@walmart/time-clock-mini-app": "npm:2.400.0"
@@ -7743,9 +7743,9 @@ __metadata:
languageName: node
linkType: hard
-"@walmart/sidekick-mini-app@npm:4.77.0-1303-c9db975":
- version: 4.77.0-1303-c9db975
- resolution: "@walmart/sidekick-mini-app@npm:4.77.0-1303-c9db975"
+"@walmart/sidekick-mini-app@npm:4.80.1":
+ version: 4.80.1
+ resolution: "@walmart/sidekick-mini-app@npm:4.80.1"
peerDependencies:
"@apollo/client": "*"
"@react-navigation/native": ^6.0.0
@@ -7758,7 +7758,7 @@ __metadata:
expo-linear-gradient: ~12.3.0
react: ^18.2.0
react-native: ^0.73.7
- checksum: 10c0/eb129fe4c9250b024bbf09969e000e54243f3cfa89d80851cde326e30e6290669cd51b7783c0e81c00362dd06b7bed48a5c2e9db49418b382b32bf04db83ee3a
+ checksum: 10c0/4a01305688578b48ef19b6ce0507b3483e85efe266c679e5959349a1218bc4011b2393cd29ae24dad649865002972cf272ac6043d53bad68fa3b35bcc40f5bd3
languageName: node
linkType: hard
| chore: bump sidekick version | chore: bump sidekick version
|
ea920d71eb7f8e51c5e6068ccb51af20bce72381 | --- android/app/build.gradle
@@ -134,7 +134,7 @@ android {
applicationId "com.walmart.stores.allspark.beta"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
- versionCode 92
+ versionCode 93
versionName "1.0.7"
}
splits {
--- ios/AllSpark/Info.plist
@@ -34,7 +34,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
- <string>92</string>
+ <string>93</string>
<key>FirebaseAutomaticScreenReportingEnabled</key>
<false />
<key>LSApplicationQueriesSchemes</key>
| Incrementing build number | Incrementing build number
|
4840d74099700cd7d2d5eb412c75fe754c9ce3b2 | --- .looper.multibranch.yml
@@ -63,8 +63,8 @@ flows:
- call: sonar-scan-pr
- parallel(failsafe):
- (name Scanning Walmart Packages) npm run lint:changed-walmart-libs ${GITHUB_PR_TARGET_BRANCH}
- - (name Scanning Deprecated Packages In Core) corepack enable && export GITHUB_REPOSITORY="${GITHUB_REPOSITORY}" && export GITHUB_PR_NUMBER="${GITHUB_PR_NUMBER}" && export GITHUB_PR_TARGET_BRANCH="${GITHUB_PR_TARGET_BRANCH:-main}" && export GITHUB_PR_SOURCE_BRANCH="${GITHUB_PR_SOURCE_BRANCH}" && yarn install --frozen-lockfile && npx tsx scripts/mini-app-scan/package-deprecation/core-check/main.ts "${GITHUB_PR_TARGET_BRANCH:-main}"
- - (name Scanning Deprecated Packages In Mini App) corepack enable && export GITHUB_REPOSITORY="${GITHUB_REPOSITORY}" && export GITHUB_PR_NUMBER="${GITHUB_PR_NUMBER}" && export GITHUB_PR_TARGET_BRANCH="${GITHUB_PR_TARGET_BRANCH:-main}" && export GITHUB_PR_SOURCE_BRANCH="${GITHUB_PR_SOURCE_BRANCH}" && yarn install --frozen-lockfile && npx tsx scripts/mini-app-scan/package-deprecation/mini-app-check/main.ts "${GITHUB_PR_TARGET_BRANCH:-main}"
+ - (name Scanning Deprecated Packages In Core) corepack enable && export GITHUB_REPOSITORY="${GITHUB_REPOSITORY}" && export GITHUB_PR_NUMBER="${GITHUB_PR_NUMBER}" && export GITHUB_PR_TARGET_BRANCH="${GITHUB_PR_TARGET_BRANCH:-main}" && export GITHUB_PR_SOURCE_BRANCH="${GITHUB_PR_SOURCE_BRANCH}" && yarn install --immutable && npx tsx scripts/mini-app-scan/package-deprecation/core-check/main.ts "${GITHUB_PR_TARGET_BRANCH:-main}"
+ - (name Scanning Deprecated Packages In Mini App) corepack enable && export GITHUB_REPOSITORY="${GITHUB_REPOSITORY}" && export GITHUB_PR_NUMBER="${GITHUB_PR_NUMBER}" && export GITHUB_PR_TARGET_BRANCH="${GITHUB_PR_TARGET_BRANCH:-main}" && export GITHUB_PR_SOURCE_BRANCH="${GITHUB_PR_SOURCE_BRANCH}" && yarn install --immutable && npx tsx scripts/mini-app-scan/package-deprecation/mini-app-check/main.ts "${GITHUB_PR_TARGET_BRANCH:-main}"
- call: slack-notification-pr(slack-pr)
mini-pr: # overridden for new bundle js command
| feat(lib): modify looper | feat(lib): modify looper
|
f6f68506c06f7d7e92addce6ffb0c8d0f002703b | --- __tests__/__mocks__/expo-file-system.js
@@ -0,0 +1,9 @@
+module.exports = {
+ documentDirectory: 'documentDirectory',
+ readAsStringAsync: jest.fn(),
+ getInfoAsync: jest.fn(),
+ writeAsStringAsync: jest.fn(),
+ makeDirectoryAsync: jest.fn(),
+ readDirectoryAsync: jest.fn(),
+ deleteAsync: jest.fn(),
+};
--- __tests__/utils/blobs-test.js
@@ -1,33 +1,25 @@
-import {purgeOldFiles} from '../../src/utils';
import moment from 'moment-timezone';
-import {unlink} from 'react-native-fs';
+import * as FileSystem from 'expo-file-system';
+import {purgeOldFiles} from '../../src/utils';
+import {stat} from 'react-native-fs';
+
+const MOCK_FILES = {
+ 'older/file/path': {
+ ctime: 1681887600000, // 2023-4-19
+ path: 'older/file/path',
+ },
+ 'notOld/file/path': {
+ ctime: 1681974000000, // 2023-4-20
+ path: 'notOld/file/path',
+ },
+};
+
+FileSystem.readDirectoryAsync.mockImplementation(() => {
+ return Promise.resolve(Object.keys(MOCK_FILES));
+});
-jest.mock('react-native-fs', () => {
- return {
- unlink: jest.fn(),
- readDir: jest.fn().mockImplementation(() => {
- const olderFile = {
- ctime: 1681887600000, // 2023-4-19
- path: 'older/file/path',
- };
- const notOldFile = {
- ctime: 1681974000000, // 2023-4-20
- path: 'notOld/file/path',
- };
- return Promise.resolve([olderFile, notOldFile]);
- }),
- stat: jest.fn().mockImplementation((path) => {
- if (path === 'older/file/path') {
- return Promise.resolve({
- ctime: 1681887600000,
- });
- }
- return Promise.resolve({
- ctime: 1681974000000,
- });
- }),
- readFile: jest.fn(),
- };
+stat.mockImplementation((path) => {
+ return Promise.resolve(MOCK_FILES[path]);
});
describe('Blobs utils', () => {
@@ -38,6 +30,9 @@ describe('Blobs utils', () => {
moment.now = () => +new Date(now);
await purgeOldFiles();
- expect(unlink).toBeCalledTimes(1);
+ expect(FileSystem.deleteAsync).toBeCalledTimes(1);
+ expect(FileSystem.deleteAsync).toBeCalledWith(
+ MOCK_FILES['older/file/path'].path,
+ );
});
});
--- src/utils/blob.ts
@@ -72,11 +72,17 @@ const DAYS_THRESHOLD = 7;
export const purgeOldFiles = async () => {
if (blobLocalStoragePath) {
const files = await FileSystem.readDirectoryAsync(blobLocalStoragePath);
+ console.log('files', files);
+ const currentDate = moment();
+ console.log('currentDate', currentDate);
+
for (const file of files) {
const info = await stat(file);
+ console.log('info', info);
const createdAt = moment(info.ctime);
- const currentDate = moment();
+ console.log('createdAt', createdAt);
const daysDiff = currentDate.diff(createdAt, 'days');
+ console.log('daysDiff', daysDiff);
if (daysDiff > DAYS_THRESHOLD) {
FileSystem.deleteAsync(file);
}
--- __tests__/__mocks__/expo-file-system.js
@@ -0,0 +1,9 @@
+module.exports = {
+ documentDirectory: 'documentDirectory',
+ readAsStringAsync: jest.fn(),
+ getInfoAsync: jest.fn(),
+ writeAsStringAsync: jest.fn(),
+ makeDirectoryAsync: jest.fn(),
+ readDirectoryAsync: jest.fn(),
+ deleteAsync: jest.fn(),
+};
--- __tests__/utils/blobs-test.js
@@ -1,33 +1,25 @@
-import {purgeOldFiles} from '../../src/utils';
import moment from 'moment-timezone';
-import {unlink} from 'react-native-fs';
+import * as FileSystem from 'expo-file-system';
+import {purgeOldFiles} from '../../src/utils';
+import {stat} from 'react-native-fs';
+
+const MOCK_FILES = {
+ 'older/file/path': {
+ ctime: 1681887600000, // 2023-4-19
+ path: 'older/file/path',
+ },
+ 'notOld/file/path': {
+ ctime: 1681974000000, // 2023-4-20
+ path: 'notOld/file/path',
+ },
+};
+
+FileSystem.readDirectoryAsync.mockImplementation(() => {
+ return Promise.resolve(Object.keys(MOCK_FILES));
+});
-jest.mock('react-native-fs', () => {
- return {
- unlink: jest.fn(),
- readDir: jest.fn().mockImplementation(() => {
- const olderFile = {
- ctime: 1681887600000, // 2023-4-19
- path: 'older/file/path',
- };
- const notOldFile = {
- ctime: 1681974000000, // 2023-4-20
- path: 'notOld/file/path',
- };
- return Promise.resolve([olderFile, notOldFile]);
- }),
- stat: jest.fn().mockImplementation((path) => {
- if (path === 'older/file/path') {
- return Promise.resolve({
- ctime: 1681887600000,
- });
- }
- return Promise.resolve({
- ctime: 1681974000000,
- });
- }),
- readFile: jest.fn(),
- };
+stat.mockImplementation((path) => {
+ return Promise.resolve(MOCK_FILES[path]);
});
describe('Blobs utils', () => {
@@ -38,6 +30,9 @@ describe('Blobs utils', () => {
moment.now = () => +new Date(now);
await purgeOldFiles();
- expect(unlink).toBeCalledTimes(1);
+ expect(FileSystem.deleteAsync).toBeCalledTimes(1);
+ expect(FileSystem.deleteAsync).toBeCalledWith(
+ MOCK_FILES['older/file/path'].path,
+ );
});
});
--- src/utils/blob.ts
@@ -72,11 +72,17 @@ const DAYS_THRESHOLD = 7;
export const purgeOldFiles = async () => {
if (blobLocalStoragePath) {
const files = await FileSystem.readDirectoryAsync(blobLocalStoragePath);
+ console.log('files', files);
+ const currentDate = moment();
+ console.log('currentDate', currentDate);
+
for (const file of files) {
const info = await stat(file);
+ console.log('info', info);
const createdAt = moment(info.ctime);
- const currentDate = moment();
+ console.log('createdAt', createdAt);
const daysDiff = currentDate.diff(createdAt, 'days');
+ console.log('daysDiff', daysDiff);
if (daysDiff > DAYS_THRESHOLD) {
FileSystem.deleteAsync(file);
}
| chore: updating blob test | chore: updating blob test
|
3d7fcaf5460369d3eff06006d50ae8b027b96682 | --- packages/allspark-foundation/src/Components/Hub/Container/AllsparkHubContainer.tsx
@@ -3,7 +3,7 @@ import {
AllsparkComponentContainers,
ComponentContainer,
} from '../../ComponentContainers';
-import { Header } from '../Header';
+import { HubHeader } from '../../HubHeader';
import { TeamSwitcher } from '../TeamSwitcher';
import { teamData } from './mockData';
import { Animated, ScrollView } from 'react-native';
@@ -49,7 +49,7 @@ export class AllsparkHubContainer {
);
return (
<>
- <Header
+ <HubHeader
title='Hub value-prop title'
subText='Short introduction to convey the action we intend the associate to take through this hub.'
/>
--- packages/allspark-foundation/src/Components/Hub/Container/types.ts
@@ -6,13 +6,13 @@ export interface TeamWidget {
enable: boolean;
}
-export interface Team {
+export interface TeamInfo {
teamName: string;
widgets: TeamWidget[];
}
export interface TeamWidgetMapping {
- [key: string]: Team;
+ [key: string]: TeamInfo;
}
export interface ValidatedTeamWidgetMapping {
| Merge changes from parent repo | Merge changes from parent repo
|
48f8835d2bad94dfdad7adb579580ff160787f0e | --- package-lock.json
@@ -57,7 +57,7 @@
"@walmart/functional-components": "~4.0.3",
"@walmart/gta-react-native-calendars": "0.0.16",
"@walmart/gtp-shared-components": "2.0.10",
- "@walmart/impersonation-mini-app": "1.20.3",
+ "@walmart/impersonation-mini-app": "1.20.5",
"@walmart/ims-print-services-ui": "2.5.1",
"@walmart/inbox-mini-app": "0.88.0",
"@walmart/iteminfo-mini-app": "7.4.0",
@@ -8445,9 +8445,9 @@
}
},
"node_modules/@walmart/impersonation-mini-app": {
- "version": "1.20.3",
- "resolved": "https://npme.walmart.com/@walmart/impersonation-mini-app/-/impersonation-mini-app-1.20.3.tgz",
- "integrity": "sha512-EdzVEXnNsFyXJCsMu7BCyKIzxkV2BRwpDabKtcUTPkps2Sg9z098krvnhw8QCd+oQqZp+cC342bLNHxn27d4Wg==",
+ "version": "1.20.5",
+ "resolved": "https://npme.walmart.com/@walmart/impersonation-mini-app/-/impersonation-mini-app-1.20.5.tgz",
+ "integrity": "sha512-tJ1tPWlZrlUbXdUkHun0l7qi95lkLr40UoCTwYJvcjijOB6xwAG0CsqhETahRd9WMAJ6OnNpkxpemmYxR/UMow==",
"peerDependencies": {
"@react-native-community/masked-view": ">=0.1.10",
"@react-native-community/picker": ">=1.8.1",
@@ -33652,9 +33652,9 @@
}
},
"@walmart/impersonation-mini-app": {
- "version": "1.20.3",
- "resolved": "https://npme.walmart.com/@walmart/impersonation-mini-app/-/impersonation-mini-app-1.20.3.tgz",
- "integrity": "sha512-EdzVEXnNsFyXJCsMu7BCyKIzxkV2BRwpDabKtcUTPkps2Sg9z098krvnhw8QCd+oQqZp+cC342bLNHxn27d4Wg=="
+ "version": "1.20.5",
+ "resolved": "https://npme.walmart.com/@walmart/impersonation-mini-app/-/impersonation-mini-app-1.20.5.tgz",
+ "integrity": "sha512-tJ1tPWlZrlUbXdUkHun0l7qi95lkLr40UoCTwYJvcjijOB6xwAG0CsqhETahRd9WMAJ6OnNpkxpemmYxR/UMow=="
},
"@walmart/ims-print-services-ui": {
"version": "2.5.1",
--- package.json
@@ -98,7 +98,7 @@
"@walmart/functional-components": "~4.0.3",
"@walmart/gta-react-native-calendars": "0.0.16",
"@walmart/gtp-shared-components": "2.0.10",
- "@walmart/impersonation-mini-app": "1.20.3",
+ "@walmart/impersonation-mini-app": "1.20.5",
"@walmart/ims-print-services-ui": "2.5.1",
"@walmart/inbox-mini-app": "0.88.0",
"@walmart/iteminfo-mini-app": "7.4.0",
| Updated impersonation version | Updated impersonation version
|
78f918603bf6b9642802370eb641d08885252fe2 | --- src/queries/getTeamById.graphql
@@ -30,6 +30,7 @@ query GetTeamById($businessUnitNumber: Int!, $countryCode: String!, $date: Date!
mewClockedInCount
mewClockedOutCount
mewTardyCount(date: $date)
+ site
teamId
teamName
workgroup
--- src/queries/getTeamById.ts
@@ -21,6 +21,7 @@ export type GetTeamByIdQuery = {
mewClockedInCount?: number | null;
mewClockedOutCount?: number | null;
mewTardyCount?: number | null;
+ site?: string | null;
teamId?: string | null;
teamName?: string | null;
workgroup?: string | null;
@@ -90,6 +91,7 @@ export const GetTeamByIdDocument = gql`
mewClockedInCount
mewClockedOutCount
mewTardyCount(date: $date)
+ site
teamId
teamName
workgroup
--- src/queries/getTeamsbyStore.graphql
@@ -34,6 +34,7 @@ query GetTeamsByStore($businessUnitNumber: Int!, $countryCode: String!, $date: D
mewClockedInCount
mewClockedOutCount
mewTardyCount(date: $date)
+ site
teamId
teamName
workgroup
--- src/queries/getTeamsbyStore.ts
@@ -21,6 +21,7 @@ export type GetTeamsByStoreQuery = {
mewClockedInCount?: number | null;
mewClockedOutCount?: number | null;
mewTardyCount?: number | null;
+ site?: string | null;
teamId?: string | null;
teamName?: string | null;
workgroup?: string | null;
@@ -90,6 +91,7 @@ export const GetTeamsByStoreDocument = gql`
mewClockedInCount
mewClockedOutCount
mewTardyCount(date: $date)
+ site
teamId
teamName
workgroup
--- src/queries/schema.graphql
@@ -6695,6 +6695,7 @@ type Query {
overTimeSummary2(countryCode: String!, siteId: String!, workEndDate: Date!, workStartDate: Date!): [Associate]
paginatedRoster(after: String, businessUnitNumber: Int, countryCode: String! = "US", days: Int! = 1, departmentId: String, employmentStatus: String, first: Int, sortOrder: SortOrder! = ASCENDING, startDate: Date!, storeId: String): AssociateConnection
preference(preference: String!, walmartIdentificationNumberList: [String!]!): [Preference]
+ safetyMeAtRootcauseSummary(DC: Int!): SafetyMeAtRootcauseSummary
safetyMetricsByDCandOpsArea(DC: Int!): [SafetyMeAtOpsArea]
safetySummaryByDC(DC: Int!): [SafetyMeAtDcLevelMetrics]
@@ -7157,6 +7158,7 @@ type SafetyMeAtDcLevelMetrics {
annual_oir_pct_ly: Float
days_since_lost_time: Int
dc: Int
+ last_refresh_ts: String
lost_time_accidents_mtd: Int
lost_time_accidents_wtd: Int
lost_time_accidents_ytd: Int
@@ -7184,6 +7186,7 @@ type SafetyMeAtOpsArea {
Non_Medical_Incidents_wtd: Int
Non_Medical_Incidents_ytd: Int
dc: Int
+ last_refresh_ts: String
lost_time_accidents_mtd: Int
lost_time_accidents_wtd: Int
lost_time_accidents_ytd: Int
@@ -7200,10 +7203,23 @@ type SafetyMeAtRootcause {
incidents_mtd: Int
incidents_wtd: Int
incidents_ytd: Int
+ last_refresh_ts: String
nature_of_incident: String
tpr_code_ops_area: String
}
+type SafetyMeAtRootcauseSummary {
+ dc: Int
+ last_refresh_ts: String
+ medical_mtd: Int
+ medical_wtd: Int
+ medical_ytd: Int
+ nature_of_incident: String
+ non_medical_mtd: Int
+ non_medical_wtd: Int
+ non_medical_ytd: Int
+}
+
"""Locations sales classification used by the replenishment system"""
type SalesClass {
effectiveDateRange: DateRange
--- src/queries/schema.types.ts
@@ -5729,6 +5729,7 @@ export type Query = {
overTimeSummary2?: Maybe<Array<Maybe<Associate>>>;
paginatedRoster?: Maybe<AssociateConnection>;
preference?: Maybe<Array<Maybe<Preference>>>;
+ safetyMeAtRootcauseSummary?: Maybe<SafetyMeAtRootcauseSummary>;
safetyMetricsByDCandOpsArea?: Maybe<Array<Maybe<SafetyMeAtOpsArea>>>;
safetySummaryByDC?: Maybe<Array<Maybe<SafetyMeAtDcLevelMetrics>>>;
/** Returns the SalesFloor Availability for the given ReplenishmentGroupNumbers. The list of replenishmentGroupNumbers can have only one replenishment group number. */
@@ -6072,6 +6073,10 @@ export type QueryPreferenceArgs = {
walmartIdentificationNumberList: Array<Scalars['String']>;
};
+export type QuerySafetyMeAtRootcauseSummaryArgs = {
+ DC: Scalars['Int'];
+};
+
export type QuerySafetyMetricsByDCandOpsAreaArgs = {
DC: Scalars['Int'];
};
@@ -6608,6 +6613,7 @@ export type SafetyMeAtDcLevelMetrics = {
annual_oir_pct_ly?: Maybe<Scalars['Float']>;
days_since_lost_time?: Maybe<Scalars['Int']>;
dc?: Maybe<Scalars['Int']>;
+ last_refresh_ts?: Maybe<Scalars['String']>;
lost_time_accidents_mtd?: Maybe<Scalars['Int']>;
lost_time_accidents_wtd?: Maybe<Scalars['Int']>;
lost_time_accidents_ytd?: Maybe<Scalars['Int']>;
@@ -6636,6 +6642,7 @@ export type SafetyMeAtOpsArea = {
Non_Medical_Incidents_wtd?: Maybe<Scalars['Int']>;
Non_Medical_Incidents_ytd?: Maybe<Scalars['Int']>;
dc?: Maybe<Scalars['Int']>;
+ last_refresh_ts?: Maybe<Scalars['String']>;
lost_time_accidents_mtd?: Maybe<Scalars['Int']>;
lost_time_accidents_wtd?: Maybe<Scalars['Int']>;
lost_time_accidents_ytd?: Maybe<Scalars['Int']>;
@@ -6653,10 +6660,24 @@ export type SafetyMeAtRootcause = {
incidents_mtd?: Maybe<Scalars['Int']>;
incidents_wtd?: Maybe<Scalars['Int']>;
incidents_ytd?: Maybe<Scalars['Int']>;
+ last_refresh_ts?: Maybe<Scalars['String']>;
nature_of_incident?: Maybe<Scalars['String']>;
tpr_code_ops_area?: Maybe<Scalars['String']>;
};
+export type SafetyMeAtRootcauseSummary = {
+ __typename?: 'SafetyMeAtRootcauseSummary';
+ dc?: Maybe<Scalars['Int']>;
+ last_refresh_ts?: Maybe<Scalars['String']>;
+ medical_mtd?: Maybe<Scalars['Int']>;
+ medical_wtd?: Maybe<Scalars['Int']>;
+ medical_ytd?: Maybe<Scalars['Int']>;
+ nature_of_incident?: Maybe<Scalars['String']>;
+ non_medical_mtd?: Maybe<Scalars['Int']>;
+ non_medical_wtd?: Maybe<Scalars['Int']>;
+ non_medical_ytd?: Maybe<Scalars['Int']>;
+};
+
/** Locations sales classification used by the replenishment system */
export type SalesClass = {
__typename?: 'SalesClass';
| Update site in the teams query | Update site in the teams query
|
dba250345f48e998ea3cf0ab6d7272cb74b25c3c | --- __tests__/navigation/AssociateHallwayNav/Tabs/__snapshots__/MainTabsNavTest.tsx.snap
@@ -71,7 +71,7 @@ exports[`MainTabsNav matches snapshot with badges 1`] = `
}
/>
<Screen
- component={[Function]}
+ component="TaskItMiniApp"
name="taskit"
options={
Object {
@@ -210,7 +210,7 @@ exports[`MainTabsNav matches snapshot with no badges 1`] = `
}
/>
<Screen
- component={[Function]}
+ component="TaskItMiniApp"
name="taskit"
options={
Object {
--- __tests__/navigation/AssociateHallwayNav/__snapshots__/MainStackNavTest.tsx.snap
@@ -126,7 +126,7 @@ Array [
}
/>
<Screen
- component="GuardedTaskItQuickActions"
+ component="TaskItQuickActions"
name="taskItQuickActions"
options={
Object {
--- src/navigation/AssociateHallwayNav/MainStackNav.tsx
@@ -173,7 +173,7 @@ export const MainStackNav = () => {
/>
<MainStack.Screen
name='taskItQuickActions'
- component={withClockOutGuard(TaskItQuickActions)}
+ component={TaskItQuickActions}
options={{
gestureEnabled: true,
gestureDirection: 'vertical',
--- src/navigation/AssociateHallwayNav/Tabs/index.tsx
@@ -30,7 +30,6 @@ import {MyTeamStackNav} from './MyTeamStackNav';
import {getBottomNavConfigMap} from '../../../navConfig/NavConfigRedux';
import {getValueForCurrentLanguage} from '../../../transforms/language';
import {BottomTabNav} from '../../../navConfig/types';
-import {withClockOutGuard} from '../../ClockOutGuard';
import {Images} from '../../../images';
import styles from './styles';
@@ -205,7 +204,7 @@ export const MainTabsNav = () => {
{taskit.enabled ? (
<MainTabs.Screen
name='taskit'
- component={withClockOutGuard(TaskItMiniApp)}
+ component={TaskItMiniApp}
options={{
tabBarIcon: renderTabBarIcon.bind({
icon: 'inactive-task',
| revert changes as taskit is called mutli times | revert changes as taskit is called mutli times
|
b3571abce4f9413749e0a375f626ebc46bc1a949 | --- __tests__/navigation/AssociateHallwayNav/BannersTest.tsx
@@ -9,6 +9,7 @@ import {
import {all, call, takeLatest} from 'redux-saga/effects';
import {NetworkActionTypes} from '@walmart/allspark-foundation/Network';
import {SettingsActionTypes} from '../../../src/settings/redux';
+import {UserActionTypes} from '@walmart/allspark-foundation/User';
test('Banners', () => {
const component = create(<Banners />);
@@ -22,6 +23,7 @@ test('bannerSagas', () => {
call(updateNetworkBanners),
takeLatest(
[
+ UserActionTypes.UPDATE,
NetworkActionTypes.STATE_CHANGED,
SettingsActionTypes.SHOW_CONNECTIVITY_WARNING,
],
--- src/navigation/AssociateHallwayNav/Badges.tsx
@@ -51,8 +51,8 @@ export const watchForBadgeChanges = () => {
predicate: (_, state: IAllsparkReduxState) => getShowDrawerBadge(state),
effect: () =>
AllsparkDrawerBadge.update({
- icon: 'ExclamationCircleFillIcon',
- color: colors.spark[100],
+ icon: 'WarningIcon',
+ color: colors.red[100],
}),
});
--- src/navigation/AssociateHallwayNav/Banners.tsx
@@ -11,7 +11,10 @@ import {createRestartableSaga} from '@walmart/allspark-utils';
import {SiteSelectors} from '@walmart/allspark-foundation/Site';
import {AllsparkBanners} from '@walmart/allspark-foundation/Components';
import {AllsparkTranslationClient} from '@walmart/allspark-foundation/Translation';
-import {UserActionCreators} from '@walmart/allspark-foundation/User';
+import {
+ UserActionCreators,
+ UserActionTypes,
+} from '@walmart/allspark-foundation/User';
import {AllsparkReduxStore} from '@walmart/allspark-foundation/Redux';
import {
@@ -89,6 +92,7 @@ export function* bannerSagas() {
createRestartableSaga(
takeLatest(
[
+ UserActionTypes.UPDATE,
NetworkActionTypes.STATE_CHANGED,
SettingsActionTypes.SHOW_CONNECTIVITY_WARNING,
],
| chore: fixes for allspark339x bugs | chore: fixes for allspark339x bugs
|
d39093f0a0d7d01bd1644a38322df30e4d3417f9 | --- package-lock.json
@@ -4480,9 +4480,9 @@
"integrity": "sha512-Eznjvw57SWVzjaQAqYdouEeXKmQbQdRMtTS2azj2hxKIsRhmE4BH5KIbUuL7PtmIOkUTc8bSdo7ZGlmuwBb3RQ=="
},
"@walmart/time-clock-mini-app": {
- "version": "0.4.32",
- "resolved": "https://npme.walmart.com/@walmart/time-clock-mini-app/-/time-clock-mini-app-0.4.32.tgz",
- "integrity": "sha512-A43hi4v7P3hZd+H6HyKM98sBCR8Abosxa67T/c/BT582s5XDcA+3fKAomD6Wuf+ommfRg5I+ZNpemLEjD7mW0w==",
+ "version": "0.4.33",
+ "resolved": "https://npme.walmart.com/@walmart/time-clock-mini-app/-/time-clock-mini-app-0.4.33.tgz",
+ "integrity": "sha512-bFiG8iACuSkAiwGF99q8uuDDWRD0CaKi67BATv+0iqJUvvSAY3CTMd7FhEL+huMcvhnxLe3Jk2+veIHQrC7T8Q==",
"requires": {
"@react-native-community/datetimepicker": "3.0.9",
"@react-native-picker/picker": "^1.16.1",
@@ -17328,9 +17328,9 @@
"integrity": "sha512-5XwA0/NyFTqF2QqPeSs89LrK2337a2pfoLX44HlRCXLeHOVbZjC+CFkCuMW6k1u+RnSbDv3ROR44jdV6Dul+9A=="
},
"react-query": {
- "version": "3.34.19",
- "resolved": "https://npme.walmart.com/react-query/-/react-query-3.34.19.tgz",
- "integrity": "sha512-JO0Ymi58WKmvnhgg6bGIrYIeKb64KsKaPWo8JcGnmK2jJxAs2XmMBzlP75ZepSU7CHzcsWtIIyhMrLbX3pb/3w==",
+ "version": "3.38.0",
+ "resolved": "https://npme.walmart.com/react-query/-/react-query-3.38.0.tgz",
+ "integrity": "sha512-VRbCTRrDfC5FsB70+JfZuxFRv9SAvkZ1h36MsN8+QaDN+NWB6s1vJndqpoLQnJqN0COTG2zsInMq0KFdYze6TA==",
"requires": {
"@babel/runtime": "^7.5.5",
"broadcast-channel": "^3.4.1",
--- package.json
@@ -102,7 +102,7 @@
"@walmart/settings-mini-app": "1.6.0",
"@walmart/shelfavailability-mini-app": "0.8.3",
"@walmart/taskit-mini-app": "0.254.0-rc.0",
- "@walmart/time-clock-mini-app": "0.4.32",
+ "@walmart/time-clock-mini-app": "0.4.33",
"@walmart/ui-components": "1.3.0-rc.14",
"@walmart/welcomeme-mini-app": "0.47.0",
"@walmart/wfm-ui": "0.2.11",
| GTA-108645: address clocking rules check to enable time clock for DC | GTA-108645: address clocking rules check to enable time clock for DC |
a8f7daab29ebdf67720ad57ec4e8e4abd2de2948 | --- packages/allspark-foundation/src/Components/ComponentContainers.tsx
@@ -188,9 +188,9 @@ export class ComponentContainer<Props extends AnyObject> {
* // Hello Component 1
* // Hello Component 2
*/
-class ComponentContainerManager<Containers extends Record<string, AnyObject>> {
+class ComponentContainerManager {
private _containers = {} as {
- [K in keyof Containers]: ComponentContainer<Containers[K]>;
+ [key: string]: ComponentContainer<AnyObject>;
};
private _addQueue = new DynamicQueue();
private _addMultipleQueue = new DynamicQueue();
@@ -219,20 +219,14 @@ class ComponentContainerManager<Containers extends Record<string, AnyObject>> {
/**
* @deprecated - Use the Component property directly instead.
*/
- public getComponent = <K extends keyof Containers>(
- containerId: K,
- id: string
- ) => {
+ public getComponent = (containerId: string, id: string) => {
return this._containers[containerId]?.getComponent(id);
};
/**
* Returns true if the container has a component with the given ID.
*/
- public hasComponent = <K extends keyof Containers>(
- containerId: K,
- id: string
- ) => {
+ public hasComponent = (containerId: string, id: string) => {
return this._containers[containerId]?.hasComponent(id);
};
@@ -246,8 +240,9 @@ class ComponentContainerManager<Containers extends Record<string, AnyObject>> {
* // Use Component
* <MyContainer.Container {...props} />
*/
- public create = <K extends keyof Containers>(containerId: K) => {
- const container = new ComponentContainer<Containers[K]>();
+ public create = <T extends AnyObject>(containerId: string) => {
+ const container = new ComponentContainer<T>();
+ // @ts-ignore
this._containers[containerId] = container;
this._flushQueueForContainer(containerId.toString());
return container;
@@ -259,8 +254,8 @@ class ComponentContainerManager<Containers extends Record<string, AnyObject>> {
*
* Useful if needing to organize components into a grid or in a certain order.
*/
- public Layout = <K extends keyof Containers>(
- props: { container: K } & ComponentLayoutConfig<Containers[K]>
+ public Layout = (
+ props: { container: string } & ComponentLayoutConfig<AnyObject>
) => {
const { container, ...rest } = props;
const Container = this._containers[container];
@@ -274,8 +269,8 @@ class ComponentContainerManager<Containers extends Record<string, AnyObject>> {
* @example
* <AllsparkComponentContainers.Container container="MyContainer" {...props} />
*/
- public List = <K extends keyof Containers>(
- props: { container: K } & Containers[K] & ComponentContainerListConfig
+ public List = (
+ props: { container: string } & AnyObject & ComponentContainerListConfig
) => {
const { container, ...rest } = props;
const Container = this._containers[container];
@@ -291,9 +286,7 @@ class ComponentContainerManager<Containers extends Record<string, AnyObject>> {
* @example
* <AllsparkComponentContainers.Component container="MyContainer" id="component1" {...props} />
*/
- public Component = <K extends keyof Containers>(
- props: { container: K; id: string } & Containers[K]
- ) => {
+ public Component = (props: { container: string; id: string } & AnyObject) => {
const { container, id, ...rest } = props;
const Container = this._containers[container];
@@ -311,10 +304,10 @@ class ComponentContainerManager<Containers extends Record<string, AnyObject>> {
* // Add component-1 to MyContainer.
* AllsparkComponentContainers.add('MyContainer', 'component-1', (props) => <Text>Component 1</Text>)
*/
- public add = <K extends keyof Containers>(
- containerId: K,
+ public add = (
+ containerId: string,
id: string,
- component: ComponentType<Containers[K]>
+ component: ComponentType<AnyObject>
) => {
if (this._containers[containerId]) {
this._containers[containerId]?.add(id, component);
@@ -333,9 +326,9 @@ class ComponentContainerManager<Containers extends Record<string, AnyObject>> {
* ['component2', Component2],
* ]);
*/
- public addMultiple = <K extends keyof Containers>(
- containerId: K,
- components: [string, ComponentType<Containers[K]>][]
+ public addMultiple = (
+ containerId: string,
+ components: [string, ComponentType<AnyObject>][]
) => {
if (this._containers[containerId]) {
this._containers[containerId]?.addMultiple(components);
@@ -353,7 +346,7 @@ class ComponentContainerManager<Containers extends Record<string, AnyObject>> {
* // Remove component-1 from MyContainer.
* AllsparkComponentContainers.remove('MyContainer', 'component-1')
*/
- public remove = <K extends keyof Containers>(containerId: K, id: string) => {
+ public remove = (containerId: string, id: string) => {
if (this._containers[containerId]) {
this._containers[containerId].remove(id);
} else {
--- packages/allspark-foundation/src/Core/docs/GlobalTypes.md
@@ -1,67 +0,0 @@
-# Allspark Global Types
-
-## Overview
-
-Allspark defines global types, under the Allspark namespace, that are used throughout the framework. These can be extended by Container and Feature apps to better define the types of dynamic services, environment, elements, etc. they may add. This helps Containers communciate typing to Features as well as Features to each other.
-
-## Allspark Namespace
-
-The Allspark namespace is defined as follows:
-
-```ts
-namespace Allspark {
- namespace Elements {
- // The mapping of element ids to their types
- interface Config extends AllsparkElementConfig {}
-
- // The badge ids manage by AllsparkBadges
- interface BadgeIDs extends AllsparkBadgeIDs {}
-
- // The mapping of element ids to their ids
- interface IDs {
- 'Allspark.Badges': Values<BadgeIDs>;
- }
- }
-
- // The environment type managed by AllsparkEnvironment
- interface Environment extends BaseAllsparkEnvironment {}
-
- namespace Navigation {
- // The mapping of screen names to their params
- interface ScreenParams extends ParamListBase {}
- }
-}
-```
-
-## Extending Allspark Types
-
-Allspark types can be extended by Container and Feature apps by adding to the Allspark namespace. For example, a Container app may extend environment for to add its specific variables:
-
-```ts
-type ContainerSpecificEnvironment = {
- id: string;
- config: {
- myVariable: string;
- }
-};
-
-declare module Allspark {
- interface Environment extends ContainerSpecificEnvironment {}
-}
-```
-
-Or a Feature app may add a new element:
-
-```ts
-declare module Allspark {
- namespace Elements {
- interface Config {
- 'MyFeature.MyElement': {
- myVariable: string;
- }
- }
- }
-}
-```
-
-We ask that you prefix your types with your container or feature name, where possible, to avoid collisions with others.
| refactor: remove component container reliance on global allspark type | refactor: remove component container reliance on global allspark type
|
3ca9d386878fd685abe03d15a23b132806a12788 | --- __tests__/startup/UserFlowTest.ts
@@ -1,59 +1,50 @@
import {Alert} from 'react-native';
import {call, cancel, fork, select, take} from 'redux-saga/effects';
import {createMockTask} from '@redux-saga/testing-utils';
-import {UserSelectors, UserTypes} from '@walmart/redux-store';
-import {navigate} from '@walmart/react-native-shared-navigation';
-import {getShouldPromptForSite} from '../../src/redux/UserSelector';
+import {
+ UserActionTypes,
+ UserSelectors,
+} from '@walmart/allspark-foundation/User';
import {
handleSiteIdPrompt,
userFlow,
waitForUser,
handleUserError,
} from '../../src/startup/UserFlow';
-import {SSO_APP} from '../../src/types/telemetryConstants';
-import {Telemetry} from '../../src/core/Telemetry';
-import {User} from '../../src/core/User';
-
-jest.mock('../../src/core/Telemetry', () => ({
- Telemetry: {
- logEvent: jest.fn(),
- },
-}));
-
-jest.mock('../../src/core/User', () => ({
- User: {
- fetch: jest.fn(),
- },
-}));
+import {SSOTelemetry} from '../../src/core/Telemetry';
+import {AuthSelectors} from '@walmart/allspark-foundation/Auth';
+import {AllsparkNavigationClient} from '@walmart/allspark-foundation/Navigation';
describe('handleSiteIdPrompt', () => {
it('calls expected sagas when should prompt', () => {
const iterator = handleSiteIdPrompt();
- expect(iterator.next().value).toEqual(select(getShouldPromptForSite));
- expect(iterator.next(true).value).toEqual(
- call(Telemetry.logEvent, SSO_APP, 'site_id_opened', {}),
+ expect(iterator.next().value).toEqual(select(UserSelectors.getSiteId));
+ expect(iterator.next(undefined).value).toEqual(
+ take(UserActionTypes.UPDATE),
);
- expect(iterator.next().value).toEqual(call(navigate, 'Core.SitePrompt'));
- expect(iterator.next().value).toEqual(take(UserTypes.UPDATE_USER));
- expect(iterator.next().value).toEqual(select(UserSelectors.getUserSite));
- expect(iterator.next('100').value).toEqual(
- call(Telemetry.logEvent, SSO_APP, 'site_id_submitted', {
- site_id: '100',
- }),
+ expect(AllsparkNavigationClient.navigate).toHaveBeenCalledWith(
+ 'Core.SitePrompt',
);
+ expect(iterator.next().value).toEqual(select(UserSelectors.getSiteId));
+ expect(iterator.next('100').done).toEqual(true);
+ expect(SSOTelemetry.logEvent).toHaveBeenCalledWith('site_id_submitted', {
+ site_id: '100',
+ });
});
it('does nothing when it shouldnt prompt', () => {
const iterator = handleSiteIdPrompt();
- expect(iterator.next().value).toEqual(select(getShouldPromptForSite));
- expect(iterator.next(false).done).toEqual(true);
+ expect(iterator.next().value).toEqual(select(UserSelectors.getSiteId));
+ expect(iterator.next(true).done).toEqual(true);
});
});
describe('handleUserError', () => {
it('calls alert with expected config', () => {
+ const authData = {idToken: 'idToken'};
const iterator = handleUserError();
- expect(iterator.next().value).toEqual(
+ expect(iterator.next().value).toEqual(select(AuthSelectors.getData));
+ expect(iterator.next(authData).value).toEqual(
call(
Alert.alert,
'userErrorPrompt.genericTitle',
@@ -61,7 +52,7 @@ describe('handleUserError', () => {
[
{
text: 'userErrorPrompt.tryAgain',
- onPress: User.fetch,
+ onPress: expect.any(Function),
},
{
text: 'userErrorPrompt.cancel',
@@ -78,19 +69,19 @@ describe('userFlow', () => {
it('handles user success', () => {
const iterator = userFlow();
expect(iterator.next().value).toEqual(
- take([UserTypes.GET_USER_SUCCESS, UserTypes.GET_USER_ERROR]),
+ take([UserActionTypes.FETCH_SUCCESS, UserActionTypes.FETCH_ERROR]),
);
- expect(iterator.next({type: UserTypes.GET_USER_SUCCESS}).value).toEqual(
- take([UserTypes.GET_USER_SUCCESS, UserTypes.GET_USER_ERROR]),
+ expect(iterator.next({type: UserActionTypes.FETCH_SUCCESS}).value).toEqual(
+ take([UserActionTypes.FETCH_SUCCESS, UserActionTypes.FETCH_ERROR]),
);
});
it('handles user failure', () => {
const iterator = userFlow();
expect(iterator.next().value).toEqual(
- take([UserTypes.GET_USER_SUCCESS, UserTypes.GET_USER_ERROR]),
+ take([UserActionTypes.FETCH_SUCCESS, UserActionTypes.FETCH_ERROR]),
);
- expect(iterator.next({type: UserTypes.GET_USER_ERROR}).value).toEqual(
+ expect(iterator.next({type: UserActionTypes.FETCH_ERROR}).value).toEqual(
call(handleUserError),
);
});
@@ -102,11 +93,9 @@ describe('waitForUser', () => {
const iterator = waitForUser();
expect(iterator.next().value).toEqual(fork(userFlow));
expect(iterator.next(userTask).value).toEqual(
- take(UserTypes.GET_USER_SUCCESS),
- );
- expect(iterator.next({type: UserTypes.GET_USER_SUCCESS}).value).toEqual(
- cancel(userTask),
+ take(UserActionTypes.FETCH_SUCCESS),
);
+ expect(iterator.next().value).toEqual(cancel(userTask));
expect(iterator.next().done).toEqual(true);
});
});
| more test | more test
|
156b000bec881edd5941254b9be0a660aab9f0b8 | --- core/src/core/syncDeviceLanguage.ts
@@ -34,7 +34,13 @@ export const syncDeviceLanguage = async () => {
}
// Device language sometimes comes back with an _. We have a standard of having languages like en-US.
- language = language.replace('_', '-');
+ // Sometimes we also get region info after the en-US format.
+ language = language.replace('_', '-').substring(0, 5);
+
+ // DEFAULT to en-US if we encounter a language thats not supported.
+ if (!AllsparkTranslationClient.getSupportedLanguages().includes(language)) {
+ language = 'en-US';
+ }
// Change language on translation client (i18n)
const currentLanguage = AllsparkTranslationClient.language;
| fix: sometimes device can return a language string with additional info. Fixing that and also defaulting to en-US | fix: sometimes device can return a language string with additional info. Fixing that and also defaulting to en-US
|
e239c870c9e226732d969108aabeec70b1af6519 | --- __tests__/auth/__snapshots__/AuthenticatorViewTest.tsx.snap
@@ -65,7 +65,10 @@ exports[`AuthenticatorView renders error 1`] = `
<View
style={
Object {
- "top": 97,
+ "alignSelf": "center",
+ "bottom": 56,
+ "position": "absolute",
+ "width": "75%",
}
}
>
@@ -103,8 +106,8 @@ exports[`AuthenticatorView renders error 1`] = `
"borderRadius": 40,
"borderStyle": "solid",
"borderWidth": 1,
+ "flex": 1,
"flexDirection": "row",
- "flexShrink": 1,
"paddingHorizontal": 23,
}
}
@@ -115,6 +118,7 @@ exports[`AuthenticatorView renders error 1`] = `
style={
Object {
"color": "#FFFFFF",
+ "flexGrow": 1,
"fontFamily": "Bogle",
"fontSize": 16,
"fontStyle": "normal",
@@ -125,7 +129,7 @@ exports[`AuthenticatorView renders error 1`] = `
}
}
>
- Sign In
+ Sign in
</Text>
</View>
</View>
@@ -134,7 +138,7 @@ exports[`AuthenticatorView renders error 1`] = `
style={
Object {
"alignSelf": "center",
- "bottom": 34,
+ "bottom": 24,
"color": "white",
"fontFamily": "Bogle",
"fontSize": 12,
@@ -205,7 +209,10 @@ exports[`AuthenticatorView renders error 2`] = `
<View
style={
Object {
- "top": 97,
+ "alignSelf": "center",
+ "bottom": 56,
+ "position": "absolute",
+ "width": "75%",
}
}
>
@@ -243,8 +250,8 @@ exports[`AuthenticatorView renders error 2`] = `
"borderRadius": 40,
"borderStyle": "solid",
"borderWidth": 1,
+ "flex": 1,
"flexDirection": "row",
- "flexShrink": 1,
"paddingHorizontal": 23,
}
}
@@ -255,6 +262,7 @@ exports[`AuthenticatorView renders error 2`] = `
style={
Object {
"color": "#FFFFFF",
+ "flexGrow": 1,
"fontFamily": "Bogle",
"fontSize": 16,
"fontStyle": "normal",
@@ -265,7 +273,7 @@ exports[`AuthenticatorView renders error 2`] = `
}
}
>
- Sign In
+ Sign in
</Text>
</View>
</View>
@@ -274,7 +282,7 @@ exports[`AuthenticatorView renders error 2`] = `
style={
Object {
"alignSelf": "center",
- "bottom": 34,
+ "bottom": 24,
"color": "white",
"fontFamily": "Bogle",
"fontSize": 12,
--- src/auth/AuthenticatorView.tsx
@@ -84,8 +84,9 @@ export const AuthenticatorView: React.FC<Props> = (props) => {
<View style={styles.signInButton}>
<PrimaryButton
testID='retryButton'
+ block={true}
onPress={() => connectedSSO.signIn(activityName)}>
- Sign In
+ Sign in
</PrimaryButton>
</View>
<Text style={styles.appVersionText}>App Version {version}</Text>
--- src/auth/AuthenticatorViewStyle.ts
@@ -15,7 +15,10 @@ export default StyleSheet.create({
alignItems: 'center',
},
signInButton: {
- top: 97,
+ bottom: 56,
+ width: '75%',
+ position: 'absolute',
+ alignSelf: 'center',
},
centerRow: {
flexDirection: 'row',
@@ -35,7 +38,7 @@ export default StyleSheet.create({
color: 'white',
fontFamily: 'Bogle',
fontSize: 12,
- bottom: 34,
+ bottom: 24,
alignSelf: 'center',
},
leftMargin: {
| Chore/sign in update (#132) | Chore/sign in update (#132)
* updated styles for sign in button
* update text |
06dd417e07e2099f10ac8980232e404b82c29625 | --- package-lock.json
@@ -5508,12 +5508,12 @@
"integrity": "sha512-YRNp3VcfzWTyDZt6h5hAUK5XTzUrblOZOWUclor4ht/g4E5Oo2sMF8rV5swXlB3QdSQUZwSsU60b01veuR3o6g=="
},
"@walmart/schedule-mini-app": {
- "version": "0.24.0",
- "resolved": "https://npme.walmart.com/@walmart/schedule-mini-app/-/schedule-mini-app-0.24.0.tgz",
- "integrity": "sha512-2f974TbB8ndPP/Wb5JxdoI5XgJJG/v53uonEIaVqeCx8D/c3fiwjILkhFMCCKjTQKAcDW5Lbytb6Rpz6u9p3CA==",
+ "version": "0.25.0",
+ "resolved": "https://npme.walmart.com/@walmart/schedule-mini-app/-/schedule-mini-app-0.25.0.tgz",
+ "integrity": "sha512-3h51nBCjLmPuNJfiqL+RB6hqtUOs8w0zcrEbjxLW7d2jX0vFHaf57mPmDWHtbhN4r7qvM7t8O0yojYpxHxXfAQ==",
"requires": {
"@walmart/moment-walmart": "^1.0.4",
- "@walmart/wfm-ui": "0.2.23",
+ "@walmart/wfm-ui": "0.2.24",
"crypto-js": "^3.3.0",
"react-native-tab-view": "^2.4.0",
"wfm-allspark-data-library": "1.0.0"
@@ -5659,9 +5659,9 @@
"integrity": "sha512-CF8pbjG/pUMhcytJseTXkPt7/3+z7XPKYR+OnrrXMCxghMQcE+xg+qzfRgbAN5IEw4sjsaj5I70veFkSA3iwQg=="
},
"@walmart/wfm-ui": {
- "version": "0.2.23",
- "resolved": "https://npme.walmart.com/@walmart/wfm-ui/-/wfm-ui-0.2.23.tgz",
- "integrity": "sha512-wbZWEH+cufcfdYqiR9IRqvOjarUtaLMjx+lzffDv7BTtfyegRjQ+yibAfqXG3cSSXMYvEB8LVI5M8xFFzbVXew==",
+ "version": "0.2.24",
+ "resolved": "https://npme.walmart.com/@walmart/wfm-ui/-/wfm-ui-0.2.24.tgz",
+ "integrity": "sha512-C9YC5sY1qbAgrvhOtPHFSntaxzglzNIHZ/JhbjZZC/mcLxsdLV6914/atmgME33qqwGbbUegVm/QmpynsoIIBg==",
"requires": {
"@walmart/moment-walmart": "1.0.3",
"lodash": "^4.17.20",
--- package.json
@@ -114,14 +114,14 @@
"@walmart/react-native-sumo-sdk": "2.2.2-beta.2",
"@walmart/redux-store": "2.0.4",
"@walmart/refrigeration-alarms-mini-app": "1.35.0",
- "@walmart/schedule-mini-app": "0.24.0",
+ "@walmart/schedule-mini-app": "0.25.0",
"@walmart/settings-mini-app": "1.8.0",
"@walmart/shelfavailability-mini-app": "1.2.3",
"@walmart/taskit-mini-app": "0.34.0",
"@walmart/time-clock-mini-app": "0.13.1",
"@walmart/ui-components": "1.4.0",
"@walmart/welcomeme-mini-app": "0.70.0",
- "@walmart/wfm-ui": "0.2.23",
+ "@walmart/wfm-ui": "0.2.24",
"axios": "^0.26.1",
"axios-cache-adapter": "2.7.3",
"crypto-js": "^3.3.0",
| Bump schedule-mini-app and wfm-ui packages | Bump schedule-mini-app and wfm-ui packages
|
4f90f4a52286d2d042d66145864980db2d4feadb | --- targets/US/package.json
@@ -110,7 +110,7 @@
"@walmart/gtp-shared-components": "2.2.6-rc.1",
"@walmart/ims-print-services-ui": "2.16.4",
"@walmart/inbox-mini-app": "0.97.13",
- "@walmart/iteminfo-mini-app": "8.0.4",
+ "@walmart/iteminfo-mini-app": "8.1.1",
"@walmart/learning-mini-app": "20.0.39",
"@walmart/manager-approvals-miniapp": "0.3.2",
"@walmart/me-at-walmart-athena-queries": "6.30.4",
--- yarn.lock
@@ -6906,9 +6906,9 @@ __metadata:
languageName: node
linkType: hard
-"@walmart/iteminfo-mini-app@npm:8.0.4":
- version: 8.0.4
- resolution: "@walmart/iteminfo-mini-app@npm:8.0.4"
+"@walmart/iteminfo-mini-app@npm:8.1.1":
+ version: 8.1.1
+ resolution: "@walmart/iteminfo-mini-app@npm:8.1.1::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fiteminfo-mini-app%2F-%2Fiteminfo-mini-app-8.1.1.tgz"
peerDependencies:
"@apollo/client": ">=3.7.3"
"@react-native-community/art": 1.2.0
@@ -6918,16 +6918,16 @@ __metadata:
"@walmart/allspark-foundation": "*"
"@walmart/allspark-utils": 6.1.4
"@walmart/ask-sam-mini-app": ">=1.24.7"
- "@walmart/config-components": ">=4.2.8"
+ "@walmart/config-components": ">=4.4.2"
"@walmart/core-services": ^6.2.0
- "@walmart/counts-component-miniapp": ">=0.1.13"
+ "@walmart/counts-component-miniapp": ">=0.1.15"
"@walmart/functional-components": ">=4.0.3"
"@walmart/gtp-shared-components": ">=2.1.3"
"@walmart/ims-print-services-ui": ">=2.7.1"
"@walmart/price-changes-mini-app": ">=1.10.18"
"@walmart/react-native-env": ">=0.2.0"
"@walmart/react-native-logger": ">=1.34.8"
- "@walmart/react-native-scanner-3.0": ">=0.4.2"
+ "@walmart/react-native-scanner-3.0": ">=0.6.3"
"@walmart/react-native-store-map": ">=0.3.7"
"@walmart/redux-store": ">=3.5.0"
"@walmart/ui-components": ">=1.15.1"
@@ -6953,7 +6953,7 @@ __metadata:
reselect: ">=4.1.0"
uuid: ">=3.3.2"
victory-native: ">=36.5.0"
- checksum: 10c0/a6da113ed7adf17a89f2a3a6936cb9d644bb7c69baa7839e721593caaff8ca2cb43819ececb70a22c8e0d1eddfb951e05362c8385669d32c57d79b64542edc0f
+ checksum: 10c0/cfa926eaeac8800f6c713d0d9eda9d52b4eb7a36d38ca3a4f716b0b52654b3adfeab513c17862ec63e38cfcf9f58bae56c73498e838bf1ee5308b4f9765dd718
languageName: node
linkType: hard
@@ -7397,7 +7397,7 @@ __metadata:
"@walmart/gtp-shared-components": "npm:2.2.6-rc.1"
"@walmart/ims-print-services-ui": "npm:2.16.4"
"@walmart/inbox-mini-app": "npm:0.97.13"
- "@walmart/iteminfo-mini-app": "npm:8.0.4"
+ "@walmart/iteminfo-mini-app": "npm:8.1.1"
"@walmart/learning-mini-app": "npm:20.0.39"
"@walmart/manager-approvals-miniapp": "npm:0.3.2"
"@walmart/me-at-walmart-athena-queries": "npm:6.30.4"
| iteminfo miniapp version upgrade | iteminfo miniapp version upgrade
|
16a8a7aaefe525944f183038c4ccccc42a7d5e9b | --- src/startup/AuthFlow.ts
@@ -28,10 +28,27 @@ const SILENT_SSO_ERRORS = [
"invalid_grant",
];
-export const isSilentSignInError = (error?: Error | AuthError) =>
- SILENT_SSO_ERRORS.some((silentError) =>
- JSON.stringify(error)?.toLowerCase().includes(silentError),
+/**
+ * Returns true if a sign in error should be handled silently. Meaning it shouldn't redirect to the Login Error screen.
+ */
+export const isSilentSignInError = (error?: Error | AuthError) => {
+ // If no error, return false
+ if (!error) {
+ return false;
+ }
+
+ // If AuthError, stringify object to do easy string comparison on whole object
+ if ("code" in error) {
+ return SILENT_SSO_ERRORS.some((silentError) =>
+ JSON.stringify(error)?.toLowerCase().includes(silentError)
+ );
+ }
+
+ // If Error, do comparison on message field
+ return SILENT_SSO_ERRORS.some((silentError) =>
+ error?.message?.toLowerCase().includes(silentError)
);
+};
export function* authFlow() {
/**
| fix: silent sign in error logic not working for error | fix: silent sign in error logic not working for error
|
e41788277f755be6ace94e2d368ac894ec798d8f | --- src/managerExperience/components/RosterMessageButton/RosterMessageButton.tsx
@@ -5,14 +5,21 @@ import {RosterMessageButtonStyles as styles} from './style';
import {RosterMessageButtonProps} from './types';
import {textingMethods} from '@walmart/wmconnect-mini-app';
import {useGetRosterByTeam} from '../../../hooks';
+import {useTranslation} from 'react-i18next';
+import {MANAGER_EXPERIENCE_NAMESPACE} from '../../translations';
export const RosterMessageButton = ({teamIds}: RosterMessageButtonProps) => {
+ const {t} = useTranslation([MANAGER_EXPERIENCE_NAMESPACE]);
+
const teamId = teamIds[0];
const {teamData} = useGetRosterByTeam(teamId);
const team = teamData?.getTeamById;
const startTeamText = textingMethods.useStartTeamText();
const startStoreText = textingMethods.useStartStoreText();
- const messageLabel = teamId === 'total' ? 'Message store' : 'Message team'; //Add Spanish Translation after testing.
+ const messageLabel =
+ teamId === 'total'
+ ? t('rosterScreen.rosterMessageBtn.messageStore')
+ : t('rosterScreen.rosterMessageBtn.messageTeam');
//Logic to determine if the button should be displayed
const shouldDisplayButton = teamIds.length === 1;
--- src/translations/en-US.ts
@@ -69,6 +69,10 @@ export const enUS = {
rosterUnavailableDescription:
'Use your company-issued device to \nview the roster',
},
+ rosterMessageBtn: {
+ messageStore: 'Message store',
+ messageTeam: 'Message team',
+ },
notInRoster:
'You cannot text other associates since you are not in the roster of store {{siteId}}.',
notInRoster_store:
@@ -76,6 +80,7 @@ export const enUS = {
notInRoster_site:
'You cannot text other associates since you are not in the roster of site {{siteId}}.',
},
+
channelsScreen: {
NewMessageButton: 'New message',
emptyChannelsScreen: {
| feat: add translation to the button | feat: add translation to the button
|
4fd9d0645a599531a3a5404d5695d92b1cc066ac | --- src/components/MyWalmartv2/Common/RosterList/RosterList.tsx
@@ -2,6 +2,7 @@
import React, {memo, useCallback, useEffect} from "react";
import {View, StyleSheet} from "react-native";
import {FlashList, ListRenderItem} from "@shopify/flash-list";
+import {Skeleton} from '@walmart/gtp-shared-components';
import {RosterAssociate} from "../../types";
import {RosterListItem} from "../RosterListItem/RosterListItem";
import {RosterEmptyState} from "../RosterEmptyState/RosterEmptyState";
@@ -146,6 +147,21 @@ export const RosterList = memo<RosterListProps>(
const renderItem = customRenderItem || defaultRenderItem;
+ // Render skeleton loader for list items
+ const renderSkeletonItem = useCallback(() => {
+ return (
+ <View style={styles.skeletonItem} accessible={false}>
+ <View style={styles.skeletonRow}>
+ <Skeleton height={48} width={48} UNSAFE_style={styles.skeletonAvatar} />
+ <View style={styles.skeletonContent}>
+ <Skeleton height={16} width="60%" UNSAFE_style={styles.skeletonText} />
+ <Skeleton height={14} width="40%" UNSAFE_style={styles.skeletonSubtext} />
+ </View>
+ </View>
+ </View>
+ );
+ }, []);
+
// Log list render and item count whenever data changes
useEffect(() => {
try {
@@ -167,34 +183,39 @@ export const RosterList = memo<RosterListProps>(
onRefresh?.();
}, [onRefresh]);
- if (error) {
- rosterTelemetry.logEvent('list_error_shown', {});
- return (
- <View accessibilityRole="alert" accessibilityLabel={t("rosterErrorState.title")}>
- <RosterErrorState
- title={t("rosterErrorState.title")}
- message={t("rosterErrorState.message")}
- onRetry={onRefresh}
- />
- </View>
- );
- }
+ // Render empty state component for FlashList
+ const renderEmptyComponent = useCallback(() => {
+ if (loading || refreshing) {
+ return null; // Let skeleton show instead
+ }
- // Show empty state when not loading, not refreshing, and no data
- // Don't show during pull-to-refresh to allow native refresh spinner to show
- if ((!loading && !refreshing && data.length === 0) || (!loading && !refreshing && !data)) {
rosterTelemetry.logEvent('list_empty_shown', {
title: String(emptyStateTitle),
});
+
return (
<View
+ style={styles.emptyStateWrapper}
accessibilityRole="alert"
accessibilityLabel={`${emptyStateTitle}. ${emptyStateDescription}`}
>
<RosterEmptyState
title={emptyStateTitle}
description={emptyStateDescription}
- loading={loading}
+ loading={false}
+ />
+ </View>
+ );
+ }, [loading, refreshing, emptyStateTitle, emptyStateDescription]);
+
+ if (error) {
+ rosterTelemetry.logEvent('list_error_shown', {});
+ return (
+ <View accessibilityRole="alert" accessibilityLabel={t("rosterErrorState.title")}>
+ <RosterErrorState
+ title={t("rosterErrorState.title")}
+ message={t("rosterErrorState.message")}
+ onRetry={onRefresh}
/>
</View>
);
@@ -222,21 +243,24 @@ export const RosterList = memo<RosterListProps>(
return (
<View style={styles.container}>
<FlashList
- data={data}
- renderItem={renderItem}
- keyExtractor={keyExtractor}
+ data={refreshing ? Array(5).fill({}) : data}
+ renderItem={refreshing ? renderSkeletonItem : renderItem}
+ keyExtractor={(item, index) =>
+ refreshing ? `skeleton-${index}` : keyExtractor(item as RosterAssociate, index)
+ }
estimatedItemSize={estimatedItemSize}
onEndReached={_onEndReached}
onEndReachedThreshold={onEndReachedThreshold}
ListHeaderComponent={ListHeaderComponent}
ListFooterComponent={ListFooterComponent}
+ ListEmptyComponent={renderEmptyComponent}
//@ts-ignore
contentContainerStyle={[
styles.contentContainer,
contentContainerStyle,
]}
contentInset={{bottom: _bottomInset}}
- refreshing={refreshing}
+ refreshing={false}
onRefresh={_onRefresh}
showsVerticalScrollIndicator={showsVerticalScrollIndicator}
removeClippedSubviews={true}
@@ -268,7 +292,55 @@ const styles = StyleSheet.create({
*/
contentContainer: {
paddingBottom: 16,
- }
+ },
+ /**
+ * Empty state wrapper to center content
+ */
+ emptyStateWrapper: {
+ flex: 1,
+ minHeight: 400,
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+ /**
+ * Skeleton item container
+ */
+ skeletonItem: {
+ paddingHorizontal: 16,
+ paddingVertical: 12,
+ },
+ /**
+ * Skeleton row with avatar and content
+ */
+ skeletonRow: {
+ flexDirection: 'row',
+ alignItems: 'center',
+ },
+ /**
+ * Skeleton avatar style
+ */
+ skeletonAvatar: {
+ borderRadius: 24,
+ marginRight: 12,
+ },
+ /**
+ * Skeleton content container
+ */
+ skeletonContent: {
+ flex: 1,
+ },
+ /**
+ * Skeleton text style
+ */
+ skeletonText: {
+ marginBottom: 8,
+ },
+ /**
+ * Skeleton subtext style
+ */
+ skeletonSubtext: {
+ marginTop: 4,
+ },
});
// Set display name for better debugging in React DevTools
--- src/components/MyWalmartv2/Common/RosterSearch/RosterSearch.tsx
@@ -138,7 +138,7 @@ const styles = StyleSheet.create({
* Main container style that adds margin to the bottom of the search bar
*/
container: {
- marginBottom: 16,
+ marginBottom: 0,
},
/**
* Style for the search container that holds the icon and input
@@ -146,16 +146,18 @@ const styles = StyleSheet.create({
searchContainer: {
flexDirection: 'row',
alignItems: 'center',
- backgroundColor: '#f5f5f5',
- borderRadius: 8,
- paddingHorizontal: 12,
- height: 48,
+ backgroundColor: '#FFFFFF',
+ borderRadius: 0,
+ paddingHorizontal: 16,
+ height: 56,
+ borderBottomWidth: 1,
+ borderBottomColor: '#E5E5E5',
},
/**
* Style for the search icon on the left
*/
searchIcon: {
- marginRight: 8,
+ marginRight: 12,
},
/**
* Style for the clear icon on the right
| fix: add loader | fix: add loader
|
4478398b5835b7356ed2ffe4201909865d999943 | --- src/components/ClockedOutScreenGuard.tsx
@@ -1,7 +1,6 @@
/**
* Return early with warning if clocked out
*/
-import {analytics} from '../logger/Analytics';
import React, {ReactElement} from 'react';
import {StyleSheet} from 'react-native';
import {Alert} from '@walmart/gtp-shared-components';
| remove unused line | remove unused line
|
237ab84416879b9c4e79b05176d20eb61f9b5fb0 | --- core/__tests__/__mocks__/realm.js
@@ -1,4 +1,3 @@
module.exports = {
- ...jest.requireActual('realm'),
Realm: 'Realm',
};
\ No newline at end of file
| add mock for realm | add mock for realm
|
6a33e61361deeb19285deda80ba5139de6149701 | --- package-lock.json
@@ -5421,9 +5421,9 @@
"integrity": "sha512-vL0+hmLX3mP3jXomwGL+kxp2aRLe002I+b+LL+wVbmOdRdXBvA7gbA5VJeRFkvaUQfU2SlRVLYJwv34HT9I8jw=="
},
"@walmart/shelfavailability-mini-app": {
- "version": "1.2.1",
- "resolved": "https://npme.walmart.com/@walmart/shelfavailability-mini-app/-/shelfavailability-mini-app-1.2.1.tgz",
- "integrity": "sha512-X73XCuc6mUjY03AIu+GNe4oUTnaCQW0hpSiYbaNnSi87Cilc7LxXa/TOcoXkkZ4+JsBZEmh0FMwVkyPnhotFzQ=="
+ "version": "1.2.2",
+ "resolved": "https://npme.walmart.com/@walmart/shelfavailability-mini-app/-/shelfavailability-mini-app-1.2.2.tgz",
+ "integrity": "sha512-O/Ws19nd/94JUqGJD/CQWBajvNo4VK8P/h1gxm1FHJBtVB0LqCXunVXRm02Wviix+uSAp7OBiS9sRWvhkvEmhQ=="
},
"@walmart/taskit-mini-app": {
"version": "0.32.0-beta.5",
--- package.json
@@ -107,7 +107,7 @@
"@walmart/refrigeration-alarms-mini-app": "1.35.0",
"@walmart/schedule-mini-app": "0.18.0",
"@walmart/settings-mini-app": "1.6.0",
- "@walmart/shelfavailability-mini-app": "1.2.1",
+ "@walmart/shelfavailability-mini-app": "1.2.2",
"@walmart/taskit-mini-app": "0.32.0-beta.5",
"@walmart/time-clock-mini-app": "0.13.0",
"@walmart/ui-components": "1.4.0-beta.6",
| SA-239 inc to 1.2.1 | SA-239 inc to 1.2.1
|
816d9bd9e326b0150d4c7d267698e416b07c81e0 | --- packages/allspark-foundation/__tests__/FeatureRunner/__snapshots__/navigation.test.tsx.snap
@@ -18,14 +18,17 @@ exports[`renderHeaderLeft matches snapshot 1`] = `
testID="navigationMenu"
>
<View>
- <MenuIcon />
+ <MenuIcon
+ color="white"
+ size="medium"
+ />
<View
style={
[
{
"position": "absolute",
- "right": 0,
- "top": 10,
+ "right": -8,
+ "top": -8,
},
undefined,
]
--- packages/allspark-foundation/__tests__/Navigation/components/Header/AllsparkHeader.test.tsx
@@ -45,7 +45,11 @@ jest.mock('../../../../src/Components', () => ({
List: () => null
},
AllsparkBanners: {
- useRecordList: jest.fn(() => [])
+ useRecordList: jest.fn(() => []),
+ records: []
+ },
+ AllsparkDrawerBadge: {
+ Component: () => null
}
}));
@@ -54,7 +58,11 @@ jest.mock('../../../../src/Navigation', () => ({
NavigationModule: {
manager: {
toggleDrawer: jest.fn(),
- }
+ },
+ useDrawerService: jest.fn(() => ({
+ locked: false,
+ toggle: jest.fn()
+ }))
}
}));
@@ -191,7 +199,7 @@ describe('AppHeader components', () => {
headerBackTitleVisible: false,
headerStyle: {backgroundColor: '#0053e2', height: BaseHeaderHeight, shadowColor: 'transparent'},
headerTitleContainerStyle: {marginHorizontal: 0},
- headerLeftContainerStyle: {paddingStart: 8, paddingEnd: 12},
+ headerLeftContainerStyle: {paddingStart: 8},
headerStatusBarHeight: 0,
});
--- packages/allspark-foundation/__tests__/Navigation/components/Header/__snapshots__/AllsparkHeader.test.tsx.snap
@@ -14,7 +14,6 @@ exports[`AppHeader components MyWalmartStackHeader renders correctly with merged
"headerBackTitleVisible": false,
"headerLeft": [Function],
"headerLeftContainerStyle": {
- "paddingEnd": 12,
"paddingStart": 8,
},
"headerRightContainerStyle": {
@@ -31,6 +30,7 @@ exports[`AppHeader components MyWalmartStackHeader renders correctly with merged
"headerTitleAlign": "left",
"headerTitleContainerStyle": {
"marginHorizontal": 0,
+ "paddingStart": 8,
},
"title": "Test Screen",
}
--- packages/allspark-foundation/__tests__/Navigation/components/__snapshots__/DrawerButton.test.tsx.snap
@@ -20,14 +20,16 @@ exports[`Navigation/components/DrawerButton should render DrawerButton snapshot
<View>
<MenuIcon
UNSAFE_style={{}}
+ color="white"
+ size="medium"
/>
<View
style={
[
{
"position": "absolute",
- "right": 0,
- "top": 10,
+ "right": -8,
+ "top": -8,
},
{},
]
--- packages/allspark-foundation/src/Navigation/components/DrawerButton.tsx
@@ -18,7 +18,7 @@ export type DrawerButtonProps = HeaderBackButtonProps & {
const styles = StyleSheet.create({
// Constant border width to avoid layout shift when button is in pressed state
defaultDrawerButtonStyle: { borderWidth: 1 },
- defaultBadgeStyle: { position: 'absolute', right: 0, top: 10 },
+ defaultBadgeStyle: { position: 'absolute', right: -8, top: -8 },
});
const DRAWER_TAP_DELAY = 300;
@@ -40,7 +40,7 @@ export const debounceTap = debounce(
* added to the combined stack navigator, the drawer button should be controlled by the container.
*/
export const DrawerButton = (props: DrawerButtonProps) => {
- const { style, iconStyle, badgeStyle } = props;
+ const { style, iconStyle, badgeStyle, testID, accessibilityLabel } = props;
const drawer = NavigationModule.useDrawerService();
const navigation = useNavigation();
@@ -65,23 +65,22 @@ export const DrawerButton = (props: DrawerButtonProps) => {
<IconButton
color='white'
size='medium'
- testID='navigationMenu'
+ testID={testID || 'navigationMenu'}
onPress={handlePress}
disabled={drawer.locked}
UNSAFE_style={[styles.defaultDrawerButtonStyle, style]}
- accessibilityLabel={t('drawerButton.accessiblityLabel', {
+ accessibilityLabel={accessibilityLabel || t('drawerButton.accessiblityLabel', {
defaultValue: 'Menu',
fallbackLng: 'en-US',
})}
>
<View>
- <MenuIcon UNSAFE_style={iconStyle} />
+ <MenuIcon size='medium' color='white' UNSAFE_style={iconStyle} />
<AllsparkDrawerBadge.Component
style={[styles.defaultBadgeStyle, badgeStyle]}
/>
</View>
</IconButton>
-
);
};
--- packages/allspark-foundation/src/Navigation/components/Header/AllsparkHeader.tsx
@@ -1,6 +1,6 @@
import {Animated, StyleProp, StyleSheet, TextStyle, ViewStyle} from 'react-native';
import {HeaderBackButtonProps, HeaderOptions} from '@react-navigation/elements';
-import {type AlertVariant, type BannerVariant, ChevronLeftIcon, CloseIcon, colors, Heading, IconButton, MenuIcon} from '@walmart/gtp-shared-components-3';
+import {type AlertVariant, type BannerVariant, ChevronLeftIcon, CloseIcon, colors, Heading, IconButton} from '@walmart/gtp-shared-components-3';
import {NavigationModule} from '../../NavigationModule';
import {AllsparkBannerConfig, AllsparkBanners, AllsparkBannersContainer} from '../../../Components';
import {SafeAreaView} from 'react-native-safe-area-context';
@@ -8,6 +8,7 @@ import {Header as StackHeader, StackHeaderProps, StackNavigationOptions} from '@
import {useNavigation} from '@react-navigation/native';
import {BottomTabNavigationOptions} from '@react-navigation/bottom-tabs';
import React, {ComponentType} from 'react';
+import { DrawerButton } from '../DrawerButton';
/**
* @todo: Relocate to my-walmart-component-library
@@ -29,10 +30,10 @@ export const HeaderStyles = StyleSheet.create({
},
headerTitleContainerStyle: {
marginHorizontal: 0,
+ paddingStart: 8,
},
headerLeftContainerStyle: {
paddingStart: 8,
- paddingEnd: 12,
},
headerRightContainerStyle: {
paddingEnd: 8,
@@ -97,9 +98,7 @@ export const HeaderLeft = (props: HeaderBackButtonProps & { variant?: 'drawer' |
if (variant === 'drawer') {
return (
- <IconButton size='medium' onPress={handleDrawerPress} accessibilityLabel='Menu' testID='drawer-icon-button'>
- <MenuIcon size='medium' color={tintColor} />
- </IconButton>
+ <DrawerButton onPress={handleDrawerPress} iconStyle={{ tintColor }} accessibilityLabel='Menu' testID='drawer-icon-button' {...props} />
)
}
@@ -126,14 +125,16 @@ export const HeaderLeft = (props: HeaderBackButtonProps & { variant?: 'drawer' |
if (variant === 'contextual') {
const canGoBack = navigation.canGoBack();
return (
- <IconButton
+ canGoBack ?
+ (<IconButton
size='medium'
onPress={handleContextualPress}
- accessibilityLabel={canGoBack ? 'Back' : 'View navigation panel'}
- testID={canGoBack ? 'back-icon-button' : 'drawer-icon-button'}
+ accessibilityLabel={'Back'}
+ testID={'back-icon-button'}
>
- {canGoBack ? <BackIcon size='medium' color={props.tintColor} /> : <MenuIcon size='medium' color={props.tintColor} />}
- </IconButton>
+ {<BackIcon size='medium' color={props.tintColor} />}
+ </IconButton>) :
+ <DrawerButton onPress={handleDrawerPress} iconStyle={{ tintColor }} accessibilityLabel='View navigation panel' testID='drawer-icon-button' {...props} />
)
}
| fix(ui): fixed warning badge on hamburger menu (#538) | fix(ui): fixed warning badge on hamburger menu (#538)
Co-authored-by: Hariharan Sundaram <hariharan.sundaram0@walmart.com> |
e10ee75d2b04810bd919199c415a0094fbb8e42a | --- packages/allspark-foundation-hub/__tests__/HubFeature/supplyChain/ShiftFilterList.test.tsx
@@ -3,6 +3,7 @@ import React from 'react';
import { fireEvent } from '@testing-library/react-native';
import { render } from '@walmart/allspark-foundation/__tests__/utils';
import { ShiftFilterList } from '@walmart/allspark-foundation-hub/src/HubFeature/SupplyChain/Components/ShiftFilter/ShiftFilterList';
+import { beforeEach } from 'node:test';
jest.mock('@walmart/allspark-foundation/Logger', () => ({
...jest.requireActual('@walmart/allspark-foundation/Logger'),
@@ -22,6 +23,9 @@ jest.mock('@walmart/allspark-foundation/Telemetry', () => ({
}));
describe('ShiftFilterList', () => {
+ beforeEach(() => {
+ jest.clearAllMocks();
+ });
afterEach(() => {
jest.clearAllMocks();
});
@@ -101,4 +105,12 @@ describe('ShiftFilterList', () => {
expect(queryByTestId(`shift-filter-${item.shiftId}`)).toBeTruthy();
});
});
+
+ it('Test 5: Renders Alert when filterListData is null', () => {
+ const { getByTestId } = render(
+ <ShiftFilterList {...mockShiftFilterListProps} filterListData={null} />
+ );
+
+ expect(getByTestId('mandatory-shift-error')).toBeTruthy();
+ });
});
| Adding Test 5 | Adding Test 5
|
37594e1ad0fe2d23fdcfa5e6f877ab8880247411 | --- __tests__/harness/athenaQueries/getDailyRoster.ts
@@ -11,6 +11,7 @@ export const mockGetDailyRosterQuery = {
days: 1,
startDate: currentDay,
storeId: '100',
+ businessUnitNumber: 100,
},
},
result: {
| SMDV-5299/updated mock query | SMDV-5299/updated mock query
|
27885420720f8af2715f4007f8d50ab39a922238 | --- package.json
@@ -1,6 +1,6 @@
{
"name": "@walmart/myteam-mini-app",
- "version": "1.15.0-alpha.3",
+ "version": "1.15.0-alpha.4",
"main": "dist/index.js",
"files": [
"dist"
--- src/navigation/index.tsx
@@ -113,7 +113,6 @@ export const TeamHub = () => {
['roster'],
{
['Header']: {id: 'roster.header'},
- ['FloatingButton']: {id: 'floating.button'},
},
)
.validate()
| Update my team mini app version | Update my team mini app version
|
e453b415754eb306aec56b0e04ca712a95c54e70 | --- package.json
@@ -103,7 +103,7 @@
"@walmart/counts-component-miniapp": "0.1.11",
"@walmart/emergency-mini-app": "1.27.7",
"@walmart/exception-mini-app": "1.8.4",
- "@walmart/facilities-management-miniapp": "0.11.15",
+ "@walmart/facilities-management-miniapp": "0.11.16",
"@walmart/feedback-all-spark-miniapp": "0.9.66",
"@walmart/financial-wellbeing-feature-app": "1.23.4",
"@walmart/functional-components": "6.1.4",
--- yarn.lock
@@ -6083,12 +6083,12 @@ __metadata:
languageName: node
linkType: hard
-"@walmart/facilities-management-miniapp@npm:0.11.15":
- version: 0.11.15
- resolution: "@walmart/facilities-management-miniapp@npm:0.11.15"
+"@walmart/facilities-management-miniapp@npm:0.11.16":
+ version: 0.11.16
+ resolution: "@walmart/facilities-management-miniapp@npm:0.11.16"
peerDependencies:
"@walmart/allspark-foundation": "*"
- checksum: 10c0/28b0693b2a6567ada2c64757276293e9656df40ca3400034ba5ea811bcbdfc219b1fe25f9fab30e5ea3355f0760b385733054c45b3af808b56ef08aecc6e1294
+ checksum: 10c0/56181b072f50bca56d56614b8a5f78977056715318453965c3cf0ee6a9b2a83dd3b57c0a90b3aa997b9d334ce6effbcad5f92c466c0b1a8bb39cc9d2ae18b47b
languageName: node
linkType: hard
@@ -7900,7 +7900,7 @@ __metadata:
"@walmart/counts-component-miniapp": "npm:0.1.11"
"@walmart/emergency-mini-app": "npm:1.27.7"
"@walmart/exception-mini-app": "npm:1.8.4"
- "@walmart/facilities-management-miniapp": "npm:0.11.15"
+ "@walmart/facilities-management-miniapp": "npm:0.11.16"
"@walmart/feedback-all-spark-miniapp": "npm:0.9.66"
"@walmart/financial-wellbeing-feature-app": "npm:1.23.4"
"@walmart/functional-components": "npm:6.1.4"
| verion bump drop 24 | verion bump drop 24
|
1bf1d513a81e0b6a7bad255767edb008818291b5 | --- core/src/navigation/USHallway/AssociateHallwayNav/MainStackNav.tsx
@@ -70,6 +70,7 @@ import {createMiniAppScreens} from '../../../core/CreateGuardedScreens';
import {MainTabsNav} from './Tabs';
import {MainStackMap} from './types';
import {MyTeamStackNav} from './Tabs/MyTeamStackNav';
+import {MINI_APPS} from '../../../oneClick/MiniApps';
//--- Main Stack --- //
@@ -78,7 +79,7 @@ const MainStack = createStackNavigator<MainStackMap>();
// Add guards to mini app screen
const MiniAppScreens = createMiniAppScreens(MainStack, [
{
- featureId: 'pinpoint',
+ featureId: MINI_APPS.PIN_POINT,
name: 'Pinpoint',
component: PinpointMiniApp,
options: {
--- core/src/navigation/USHallway/AssociateHallwayNav/Tabs/HomeStackNav.tsx
@@ -15,12 +15,13 @@ import {getInboxHeaderEnabled} from '../../../../features/inbox';
import {HomeStackMap, MainTabsScreenProps} from '../types';
import {styles} from './config';
import {withScreenGuards} from '../../../../core/CreateGuardedScreens';
+import {MINI_APPS} from '../../../../oneClick/MiniApps';
const HomeStack = createStackNavigator<HomeStackMap>();
// Add guards to inbox screen
const GuardedInbox = withScreenGuards(InboxScreen, {
- featureId: 'inbox',
+ featureId: MINI_APPS.INBOX,
clockCheckEnabled: false,
});
--- core/src/navigation/USHallway/AssociateHallwayNav/Tabs/MeStackNav.tsx
@@ -9,10 +9,11 @@ import {MeMiniApp} from '@walmart/profile-feature-app';
import {withSensitiveView} from '../../withSensitiveView';
import {MeStackMap} from '../types';
import {withScreenGuards} from '../../../../core/CreateGuardedScreens';
+import {MINI_APPS} from '../../../../oneClick/MiniApps';
// Add guards to me mini app
const ProtectedMeMiniApp = withScreenGuards(withSensitiveView(MeMiniApp), {
- featureId: 'me',
+ featureId: MINI_APPS.ME,
clockCheckEnabled: false,
});
--- core/src/navigation/USHallway/AssociateHallwayNav/Tabs/MyTeamStackNav.tsx
@@ -10,12 +10,13 @@ import {MyTeamHooks} from '@walmart/wmconnect-mini-app';
import {MainTabsScreenProps, MyTeamStackMap} from '../types';
import {withScreenGuards} from '../../../../core/CreateGuardedScreens';
+import {MINI_APPS} from '../../../../oneClick/MiniApps';
const MyTeamStack = createStackNavigator<MyTeamStackMap>();
// Add guards to texting screen
const GuardedTexting = withScreenGuards(TextingMiniApp, {
- featureId: 'texting',
+ featureId: MINI_APPS.TEXTING,
clockCheckEnabled: false,
});
--- core/src/navigation/USHallway/AssociateHallwayNav/Tabs/index.tsx
@@ -28,13 +28,14 @@ import {
getOptionsForRoute,
} from './config';
import {withScreenGuards} from '../../../../core/CreateGuardedScreens';
+import {MINI_APPS} from '../../../../oneClick/MiniApps';
// --- Tabs Navigator --- //
const MainTabs = createBottomTabNavigator<MainTabsMap>();
// Add guards to mini app tabs
const GuardedTaskitMiniapp = withScreenGuards(TaskItMiniApp, {
- featureId: 'taskit',
+ featureId: MINI_APPS.TASKIT,
clockCheckEnabled: true,
});
const GuardedCopilotMiniapp = withScreenGuards(CopilotMiniApp, {
@@ -46,7 +47,7 @@ const GuardedSidekickMiniapp = withScreenGuards(SidekickMiniApp, {
clockCheckEnabled: true,
});
const GuardedInboxMiniapp = withScreenGuards(InboxMiniApp, {
- featureId: 'inbox',
+ featureId: MINI_APPS.INBOX,
clockCheckEnabled: false,
});
--- core/src/oneClick/MiniApps.ts
@@ -60,6 +60,7 @@ export enum MINI_APPS {
TASKIT = 'taskit',
COPILOT = 'copilot',
TOPSTOCK = 'topstock',
+ TEXTING = 'texting',
}
// Mapping of other possible identifiers to their correct feature identifier
| ALLSPARK-4175: Referred Mini Apps from enum | ALLSPARK-4175: Referred Mini Apps from enum
|
3e96ffadd017c206b3bc4cf935abaab8a9fdbaf7 | --- packages/allspark-foundation-hub/src/Container/AllsparkHubContainer.tsx
@@ -76,6 +76,7 @@ export const managerExperienceFeature = new AllsparkFeatureModule(FEATURE_ID, {
},
'managerExperience.supplyChain.editModal': {
modal: EditSavedTeamsModal,
+ disableFlingGesture: true,
containerStyle: {
paddingTop: 50,
width: '100%',
| feat(ui): disabling fling gesture for edit modal | feat(ui): disabling fling gesture for edit modal
|
ea411730d2f9e39ce91cde6f452548caaf9502d9 | --- ios/Podfile.lock
@@ -530,7 +530,7 @@ PODS:
- React-Core
- react-native-pdf (6.6.2):
- React-Core
- - react-native-ptt-module (1.8.3):
+ - react-native-ptt-module (1.8.7):
- PTT (= 1.8.3)
- React
- react-native-render-html (6.3.4):
@@ -541,7 +541,7 @@ PODS:
- RCTTypeSafety
- React
- ReactCommon/turbomodule/core
- - react-native-scanner-3.0 (0.1.26):
+ - react-native-scanner-3.0 (0.1.27):
- Firebase/Analytics
- React
- ScanditBarcodeCapture (= 6.14.0)
@@ -1147,7 +1147,7 @@ SPEC CHECKSUMS:
boost: a7c83b31436843459a1961bfd74b96033dc77234
BVLinearGradient: 34a999fda29036898a09c6a6b728b0b4189e1a44
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
- DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
+ DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
FBLazyVector: affa4ba1bfdaac110a789192f4d452b053a86624
FBReactNativeSpec: fe8b5f1429cfe83a8d72dc8ed61dc7704cac8745
Firebase: 4ba896cb8e5105d4b9e247e1c1b6222b548df55a
@@ -1173,7 +1173,7 @@ SPEC CHECKSUMS:
Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541
FlipperKit: 02fd59af13a1465d04268cbffe3f93505f0a1dc2
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
- glog: 85ecdd10ee8d8ec362ef519a6a45ff9aa27b2e85
+ glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
GoogleAppMeasurement: 7a33224321f975d58c166657260526775d9c6b1a
GoogleDataTransport: 1c8145da7117bd68bbbed00cf304edb6a24de00f
GoogleUtilities: bad72cb363809015b1f7f19beb1f1cd23c589f95
@@ -1203,12 +1203,12 @@ SPEC CHECKSUMS:
React-jsiexecutor: 31564fa6912459921568e8b0e49024285a4d584b
React-jsinspector: badd81696361249893a80477983e697aab3c1a34
React-logger: fdda34dd285bdb0232e059b19d9606fa0ec3bb9c
- react-native-app-auth: bd3be305a5cbac5baa8574253480d90b5c5522e7
- react-native-background-timer: 117fffdc9b0d6f144444bb49029f94275a45fdb5
+ react-native-app-auth: fd1eaa667c0bc014199456d14a6440cb74de814e
+ react-native-background-timer: 17ea5e06803401a379ebf1f20505b793ac44d0fe
react-native-biometrics: 352e5a794bfffc46a0c86725ea7dc62deb085bdc
react-native-blob-util: 4ec16cc21bfc8de8f0ddfd2c81ada00f8c34b646
- react-native-cameraroll: 60ac50a5209777cbccfe8d7a62d0743a9da87060
- react-native-encrypted-storage: e907c76d2b9f0a30edd989d92f1bb8a9198fdb82
+ react-native-cameraroll: 2957f2bce63ae896a848fbe0d5352c1bd4d20866
+ react-native-encrypted-storage: 632e8eac25dff0b6cac14e6e0c76498c4a39e24e
react-native-flipper: 43ecd19174184c24aba5e1ef75ae13106af871e3
react-native-geolocation-service: 608e1da71a1ac31b4de64d9ef2815f697978c55b
react-native-get-random-values: a6ea6a8a65dc93e96e24a11105b1a9c8cfe1d72a
@@ -1220,10 +1220,10 @@ SPEC CHECKSUMS:
react-native-netinfo: f80db8cac2151405633324cb645c60af098ee461
react-native-pager-view: 592421df0259bf7a7a4fe85b74c24f3f39905605
react-native-pdf: 33c622cbdf776a649929e8b9d1ce2d313347c4fa
- react-native-ptt-module: 7cfc1a324de0fec9d48a43abfc8970550116f188
+ react-native-ptt-module: a0e5867a0253b4cc558aa5fe0de839fd09a6d0c5
react-native-render-html: 984dfe2294163d04bf5fe25d7c9f122e60e05ebe
react-native-safe-area-context: 6c12e3859b6f27b25de4fee8201cfb858432d8de
- react-native-scanner-3.0: a2229bd1d328860358cb69d581c12f57f47db0c9
+ react-native-scanner-3.0: e144733a1c98596d7cd53c3d6384785273b81aab
react-native-splash-screen: 4312f786b13a81b5169ef346d76d33bc0c6dc457
react-native-video: c26780b224543c62d5e1b2a7244a5cd1b50e8253
react-native-view-shot: 792829857bbb23a9c8acdad9a640554bdee397a3
@@ -1242,12 +1242,12 @@ SPEC CHECKSUMS:
React-RCTVibration: 8e5c8c5d17af641f306d7380d8d0fe9b3c142c48
React-runtimeexecutor: 7401c4a40f8728fd89df4a56104541b760876117
ReactCommon: c9246996e73bf75a2c6c3ff15f1e16707cdc2da9
- ReactNativeART: f003b07dfa7098aa419ed95b69560923440b1eee
+ ReactNativeART: 78edc68dd4a1e675338cd0cd113319cf3a65f2ab
Realm: fdf6732924dc5e69e30e0db2c11e869f92b53f3d
RealmJS: d0e94d35363a3a9ebd27981d9ac0aa4b63f66c85
RealmSwift: 7c181da8fa1c2fe613656a77c198d6a3dc3879a1
- RNCAsyncStorage: cb9a623793918c6699586281f0b51cbc38f046f9
- RNCClipboard: 5e299c6df8e0c98f3d7416b86ae563d3a9f768a3
+ RNCAsyncStorage: b03032fdbdb725bea0bd9e5ec5a7272865ae7398
+ RNCClipboard: 41d8d918092ae8e676f18adada19104fa3e68495
RNCPicker: 0bf8ef8f7800524f32d2bb2a8bcadd53eda0ecd1
RNDateTimePicker: 1dd15d7ed1ab7d999056bc77879a42920d139c12
RNDeviceInfo: 4701f0bf2a06b34654745053db0ce4cb0c53ada7
@@ -1266,7 +1266,7 @@ SPEC CHECKSUMS:
RNReanimated: 2a91e85fcd343f8af3c58d3425b99fdd285590a5
RNScreens: 4a1af06327774490d97342c00aee0c2bafb497b7
RNSha256: 80bea5b2e7005f813f6438cb41e573b3d531146c
- RNSketchCanvas: ee9e3d4bd7dbe46d309827bf2252817a0345ea1d
+ RNSketchCanvas: 124a2a11b9bce418ef6e34262fc163d00b5f714b
RNSoundPlayer: 369105c565b8fe6ea0a43fc882dc81eba444e842
RNSVG: 3a79c0c4992213e4f06c08e62730c5e7b9e4dc17
RNVectorIcons: fcc2f6cb32f5735b586e66d14103a74ce6ad61f8
--- package-lock.json
@@ -135,7 +135,7 @@
"react-native-pdf": "^6.6.2",
"react-native-permissions": "3.6.1",
"react-native-popup-menu": "^0.16.0",
- "react-native-ptt-module": "1.8.6",
+ "react-native-ptt-module": "1.8.7",
"react-native-qrcode-svg": "^6.1.2",
"react-native-reanimated": "2.12.0",
"react-native-render-html": "^6.3.4",
@@ -17693,9 +17693,9 @@
"license": "ISC"
},
"node_modules/react-native-ptt-module": {
- "version": "1.8.6",
- "resolved": "https://npme.walmart.com/react-native-ptt-module/-/react-native-ptt-module-1.8.6.tgz",
- "integrity": "sha512-t9S9vUtTMuaAgpGmxJ8EXmydhbMChYZfAI4YEVN4KG5F4PqKCL2u41XvpjHdQx1rA0KBv6ehxUmYgVYHmreCrA==",
+ "version": "1.8.7",
+ "resolved": "https://npme.walmart.com/react-native-ptt-module/-/react-native-ptt-module-1.8.7.tgz",
+ "integrity": "sha512-yUiKCd58iojiH4SVu1t0CVPECTCnslx7WC0Ye3oUbfqTBoUnWxKQdO9XO4YU8Q8lz1PQiDhgtPJSblEVj4doLg==",
"license": "MIT"
},
"node_modules/react-native-qrcode-svg": {
@@ -32660,9 +32660,9 @@
"version": "0.16.1"
},
"react-native-ptt-module": {
- "version": "1.8.6",
- "resolved": "https://npme.walmart.com/react-native-ptt-module/-/react-native-ptt-module-1.8.6.tgz",
- "integrity": "sha512-t9S9vUtTMuaAgpGmxJ8EXmydhbMChYZfAI4YEVN4KG5F4PqKCL2u41XvpjHdQx1rA0KBv6ehxUmYgVYHmreCrA=="
+ "version": "1.8.7",
+ "resolved": "https://npme.walmart.com/react-native-ptt-module/-/react-native-ptt-module-1.8.7.tgz",
+ "integrity": "sha512-yUiKCd58iojiH4SVu1t0CVPECTCnslx7WC0Ye3oUbfqTBoUnWxKQdO9XO4YU8Q8lz1PQiDhgtPJSblEVj4doLg=="
},
"react-native-qrcode-svg": {
"version": "6.1.2",
--- package.json
@@ -177,7 +177,7 @@
"react-native-pdf": "^6.6.2",
"react-native-permissions": "3.6.1",
"react-native-popup-menu": "^0.16.0",
- "react-native-ptt-module": "1.8.6",
+ "react-native-ptt-module": "1.8.7",
"react-native-qrcode-svg": "^6.1.2",
"react-native-reanimated": "2.12.0",
"react-native-render-html": "^6.3.4",
| updating ptt module | updating ptt module
|
02aef078c38541d924238efe202967d00e5f1d02 | --- src/navigation/DeeplinkConfig.ts
@@ -1,4 +1,7 @@
import {LinkingOptions} from '@react-navigation/native';
+import {take} from 'redux-saga/effects';
+import {UserActionTypes} from '@walmart/allspark-foundation/User';
+import {AllsparkNavigationClient} from '@walmart/allspark-foundation/Navigation';
// https://reactnavigation.org/docs/configuring-links/
@@ -36,3 +39,8 @@ export const LINK_CONFIG: LinkingOptions<AppRootParamList> = {
},
},
};
+
+export function* deeplinkSagas() {
+ yield take(UserActionTypes.FETCH_SUCCESS);
+ AllsparkNavigationClient.setLinkingOptions(LINK_CONFIG);
+}
--- src/startup/RootStartup.ts
@@ -20,6 +20,7 @@ import {getAppCheckToken} from '../redux/SharedSelectors';
import {appFlow} from './AppFlow';
import {initWmConfig} from './wmConfigInit';
import {initBackwardsCompatability} from './utils';
+import {deeplinkSagas} from '../navigation/DeeplinkConfig';
const setupFirebase = async (debugToken: string) => {
if (debugToken) {
@@ -71,6 +72,7 @@ export const initRootFeatures = () => {
callingPermissionSagas,
);
const startupTask = AllsparkReduxStore.addSagas(appFlow);
+ const deeplinkTask = AllsparkReduxStore.addSagas(deeplinkSagas);
return () => {
startupTask.cancel();
@@ -80,6 +82,7 @@ export const initRootFeatures = () => {
cleanTermsOfUse();
cleanupPermissions();
callingPermissionTask.cancel();
+ deeplinkTask.cancel();
};
};
| refactor: move deeplink sagas to navigation. setup through saga | refactor: move deeplink sagas to navigation. setup through saga
|
b6030df40b69f4a9ac28eb54a1ca1196c6d24caf | --- packages/allspark-foundation/src/Core/docs/AllsparkConfig.md
@@ -31,6 +31,7 @@ Use this configuration to configure the contents of those files or codegen proce
module.exports = {
graphql: {
queries: 'src/queries', // The directory where your GraphQL queries are located
+ client: 'src/graphql#MyClient', // The location of your GraphQL client. Import name specified after '#'. (Optional)
codegen: {
apollo: { // @graphql-codegen/typescript-react-apollo plugin config
headers: {}, // Headers for all generated queries
--- packages/allspark-foundation/src/cli/generate.js
@@ -56,6 +56,10 @@ const mergeMarketQueriesPlugin = path.resolve(
__dirname,
'mergeMarketQueries.js'
);
+const mergeFeatureClientPlugin = path.resolve(
+ __dirname,
+ 'mergeFeatureClient.js'
+);
const queryPath = `${processPath}/${queries}`;
const hooksPath = hooks
@@ -84,7 +88,7 @@ const codegenConfig = {
config: config.schemaAst,
},
// Generate new queries, overwriting existing files. No direct plugin output
- [`${processPath}/tmp.txt`]: {
+ [`${processPath}/tmp1.txt`]: {
plugins: [generateQueryPlugin],
config: config.query,
},
@@ -106,7 +110,8 @@ const codegenConfig = {
apolloReactHooksImportFrom: hooksPath,
},
},
- [`!${processPath}/tmp.txt`]: {
+ // Generate generic query hooks for multi market queries
+ [`${processPath}/tmp2.txt`]: {
plugins: [mergeMarketQueriesPlugin],
config: {},
},
@@ -122,7 +127,37 @@ const codegenConfig = {
},
hooks: {
// Clean up all generated files to match local prettier settings
- // afterAllFileWrite: [`npx prettier --write ${queryPath}/*.ts`],
+ beforeDone: [`npx eslint ${queryPath}/*.ts --fix`],
},
});
+
+ // If a graphql client is defined, then regenerate the ts files to modify
+ // the hooks used so that they come from a local client
+ if (allsparkConfig.graphql.client) {
+ const [queryClientPath, queryClientImportName] =
+ allsparkConfig.graphql.client.split('#');
+
+ const queryClientImportFrom = path.relative(
+ queryPath,
+ `${processPath}/${queryClientPath}`
+ );
+
+ await cli.generate({
+ ...codegenConfig,
+ generates: {
+ [queryPath]: {
+ preset: 'near-operation-file',
+ presetConfig: {
+ baseTypesPath: 'schema.types.ts',
+ extension: '.ts',
+ },
+ plugins: [mergeFeatureClientPlugin],
+ config: {
+ queryClientImportFrom,
+ queryClientImportName,
+ },
+ },
+ },
+ });
+ }
})();
--- packages/allspark-foundation/src/cli/mergeFeatureClient.js
@@ -0,0 +1,38 @@
+'use strict';
+
+const { readFileSync } = require('fs');
+
+module.exports = {
+ plugin: (_, __, config, info) => {
+ const { queryClientImportFrom, queryClientImportName } = config;
+
+ // Output file should already exist with pregenerated ts and apollo hook code.
+ // We're just overwriting it here.
+ const currentOutputFile = readFileSync(info.outputFile, {
+ encoding: 'utf-8',
+ });
+
+ // Replace ApolloReactHooks with ApolloReactHookTypes for Types
+ // Remaining references for actual hooks use GraphQLClient that we'll import next
+ const newFile = currentOutputFile
+ .replace('* as ApolloReactHooks', '* as ApolloReactHookTypes')
+ .replaceAll(': ApolloReactHooks.', ': ApolloReactHookTypes.')
+ .replaceAll('ApolloReactHooks', 'GraphQLClient');
+
+ // Split into a list of lines, remove the first 3.
+ // Its a duplicated import and empty lines.
+ const lines = newFile.split('\n');
+ lines.splice(0, 2);
+
+ // Add an import for the graphql client based on the query client path
+ lines.splice(
+ 3,
+ undefined,
+ `import {${queryClientImportName} as GraphQLClient} from \'${queryClientImportFrom}\';`
+ );
+
+ // Combine back by newline
+ return lines.join('\n');
+ },
+ validate(schema, documents, config, outputFile, allPlugins) {},
+};
| feat: add client option to graphql codegen for local client connection | feat: add client option to graphql codegen for local client connection
|
dc013a629f5436ba7362375e9a1ab4150cd65e55 | --- package.json
@@ -1,6 +1,6 @@
{
"name": "allspark-main",
- "version": "1.4.0",
+ "version": "0.4.5-SNAPSHOT.1",
"private": true,
"scripts": {
"firebase:dev": "cp ./ios/GoogleService-Info-Dev.plist ./ios/GoogleService-Info.plist && cp ./android/app/google-services-dev.json ./android/app/google-services.json",
| updating the package.json | updating the package.json
|
d61b647f04821dd01b45cf704e5b8e6a494f26ad | --- src/hooks/useFilterCounts.ts
@@ -49,7 +49,8 @@ export const useFilterCounts = (associates: Associate[]) => {
* is monitored through a firestore snapshot. Merging its values seperately from rosterCounts
* so that presence changes don't trigger recalculation of other statuses
*/
- //TODO: Revise integration with presence. Do not use consumer providers for this applicaton. Just attach a listener on the roster screen
+ //TODO: Revise integration with presence. Do not use consumer providers for this applicati
+ // on. Just attach a listener on the roster screen
// return useMemo(
// () => ({
// ...rosterCounts,
--- src/navigation/types.ts
@@ -1,15 +1,8 @@
-import {FirebaseFirestoreTypes} from '@react-native-firebase/firestore';
-import {FirebaseChannel, NewChannelDetails} from '../channels';
import {GetTeamByIdQuery} from '../queries/getTeamById';
export type TextingNavParamsMap = {
myTeam: any;
- 'myTeam.tabs': undefined;
- 'myTeam.messages': {
- channelPath: FirebaseFirestoreTypes.DocumentReference<FirebaseChannel>['path'];
- details?: NewChannelDetails;
- };
- 'myTeam.newMessage': undefined;
+ 'myTeam.roster': undefined;
'myTeam.viewTeam': {
teamRoster?: any;
teamData?: GetTeamByIdQuery;
@@ -18,11 +11,4 @@ export type TextingNavParamsMap = {
};
'myTeam.searchScreen': {searchInput: string};
'myTeam.clockedOutScreen': undefined;
- 'myTeam.pushToTalk': {
- channelPath: FirebaseFirestoreTypes.DocumentReference<FirebaseChannel>['path'];
- details?: NewChannelDetails;
- };
- 'myTeam.imagePreviewScreen': {
- imageSource: {uri: any};
- };
};
--- src/navigation/utils.ts
@@ -1,87 +1,4 @@
-import {RouteProp} from '@react-navigation/native';
-import {
- CardStyleInterpolators,
- StackCardInterpolationProps,
- StackNavigationOptions,
- TransitionPresets,
-} from '@react-navigation/stack';
-import {TextingNavParamsMap} from './types';
-import {
- getCurrentRouteName,
- navigate,
-} from '@walmart/react-native-shared-navigation';
-import {
- ROOT_CONTAINER_SCREEN_NAME,
- APP_CONTAINER_SCREEN_NAME,
- NEW_MESSAGES_SCREEN_NAME,
-} from '../constants';
-import {analytics} from '../logger/Analytics';
-
-let comingFrom: keyof TextingNavParamsMap | null = null;
-const REPLACE_SCREEN = 'myTeam.newMessage';
-
-export function MessageStyleInterpolator(
- this: {route: RouteProp<TextingNavParamsMap>},
- props: StackCardInterpolationProps,
-) {
- const {current} = props;
- const {progress} = current;
-
- // @todo - fix animation for pop replace. not good long term solution
- const goingTo = this.route.name;
- if (comingFrom === REPLACE_SCREEN && comingFrom !== goingTo) {
- comingFrom = goingTo;
- return CardStyleInterpolators.forNoAnimation();
- }
-
- comingFrom = goingTo;
-
- const {containerStyle, cardStyle, shadowStyle, overlayStyle} =
- TransitionPresets.ModalSlideFromBottomIOS.cardStyleInterpolator(props);
-
- return {
- cardStyle,
- containerStyle,
- shadowStyle,
- overlayStyle: {
- ...overlayStyle,
- opacity: progress.interpolate({
- inputRange: [0, 1],
- outputRange: [0, 0.54],
- extrapolate: 'clamp',
- }),
- },
- };
-}
-
-const {gestureDirection, headerStyleInterpolator, transitionSpec} =
- TransitionPresets.ModalSlideFromBottomIOS;
-
-export const buildMessageScreenOptions = (
- topOffset: number,
-): ((props: {
- route: RouteProp<TextingNavParamsMap>;
- navigation: any;
-}) => StackNavigationOptions) => {
- const cardOffset = topOffset + 24;
-
- return (props) => ({
- presentation: 'transparentModal',
- headerShown: false,
- cardOverlayEnabled: true,
- cardStyle: {
- marginTop: cardOffset,
- borderTopEndRadius: 15,
- borderTopStartRadius: 15,
- backgroundColor: 'rgba(0, 0, 0, 0)',
- },
- gestureResponseDistance: cardOffset,
- gestureDirection,
- headerStyleInterpolator,
- transitionSpec,
- cardStyleInterpolator: MessageStyleInterpolator.bind(props),
- });
-};
+import {navigate} from '@walmart/react-native-shared-navigation';
export const goToWeeklySchedule = (wins: string[], teamName?: string) => {
navigate('scheduleScreen', {
@@ -108,24 +25,3 @@ export const goToIndividualSchedule = (
},
});
};
-
-export const onNewMessage = () => {
- const routeInfo = getCurrentRouteName();
-
- analytics(
- 'newMessageNavigation',
- {
- routeInfo: routeInfo,
- message: 'New message navigation from outside MyTeam',
- },
- 10,
- );
-
- navigate(ROOT_CONTAINER_SCREEN_NAME, {
- // @ts-ignore
- screen: APP_CONTAINER_SCREEN_NAME,
- params: {
- screen: NEW_MESSAGES_SCREEN_NAME,
- },
- });
-};
--- src/screens/RosterScreen.tsx
@@ -53,7 +53,7 @@ const styles = StyleSheet.create({
});
type RosterScreenProps = {
- navigation: StackNavigationProp<TextingNavParamsMap, 'myTeam.tabs'>;
+ navigation: StackNavigationProp<TextingNavParamsMap, 'myTeam.roster'>;
};
export const RosterScreen: React.FC<RosterScreenProps> = () => {
| removing code | removing code
|
02c4d58bafba37b1736274cbbe4c7b62ded7b367 | --- packages/me-at-walmart-container/package.json
@@ -5,7 +5,7 @@
"main": "lib/index.js",
"types": "lib/index.d.ts",
"bin": {
- "me@:generate:versions": "./lib/scripts/createDependencyJson",
+ "me@:generate:versions": "./lib/scripts/createDependencyJson.js",
},
"files": [
"lib/",
| fix: script fix | fix: script fix
|
b0c5933059bac5bd5151590635a7a2b2d9ae6886 | --- packages/allspark-foundation/src/Hooks/useUserPreferences.ts
@@ -6,6 +6,22 @@ import { UserSelectors } from '../User';
import { SiteSelectors } from '../Site';
import { TeamSwitcherTypes } from '../Components';
+const sorter = (data: TeamSwitcherTypes[]): TeamSwitcherTypes[] => {
+ const sorted: TeamSwitcherTypes[] = [];
+ for (let i = 0; i < data.length; i++) {
+ if (data[i].teamLabel === 'Total store') {
+ sorted.push(data[i]);
+ }
+ if (data[i].teamLabel === 'My teams') {
+ sorted.push(data[i]);
+ }
+ }
+ return [
+ ...sorted,
+ ...data.sort((a, b) => a.teamLabel.localeCompare(b.teamLabel)),
+ ];
+};
+
export const useUserPreferences = (data: TeamSwitcherTypes[]) => {
const storeId = useSelector(SiteSelectors.getWorkingSite).data?.siteId;
const win = useSelector(UserSelectors.getWin);
@@ -25,7 +41,7 @@ export const useUserPreferences = (data: TeamSwitcherTypes[]) => {
teamId: team?.teamId ?? '',
})
) ?? [];
- setTeamData(transformedTeamData);
+ setTeamData(sorter(transformedTeamData));
},
onError: () => {
// handle exception
| chore(ui): added sorter function for teamdata | chore(ui): added sorter function for teamdata
|
cd2a0fa9c7d2276828c3fb1d0effe61f86f05700 | --- package-lock.json
@@ -43,7 +43,7 @@
"@walmart/core-utils": "~1.3.0",
"@walmart/core-widget-registry": "~0.7.2",
"@walmart/counts-component-miniapp": "0.0.42",
- "@walmart/emergency-mini-app": "1.2.0",
+ "@walmart/emergency-mini-app": "1.8.0",
"@walmart/exception-mini-app": "0.43.1",
"@walmart/facilities-management-miniapp": "0.3.26",
"@walmart/feedback-all-spark-miniapp": "0.9.0",
@@ -53,7 +53,7 @@
"@walmart/gtp-shared-components": "1.8.17",
"@walmart/impersonation-mini-app": "1.2.0",
"@walmart/ims-print-services-ui": "1.1.4",
- "@walmart/inbox-mini-app": "0.68.0",
+ "@walmart/inbox-mini-app": "0.72.0",
"@walmart/iteminfo-mini-app": "6.0.1",
"@walmart/manager-approvals-miniapp": "0.1.2",
"@walmart/me-field-mini-app": "1.1.35",
@@ -61,8 +61,8 @@
"@walmart/mod-flex-mini-app": "1.2.7",
"@walmart/moment-walmart": "1.0.4",
"@walmart/OneWalmart-MiniApp": "1.0.12",
- "@walmart/pay-stub-miniapp": "^0.9.7",
- "@walmart/payrollsolution_miniapp": "^0.130.4",
+ "@walmart/pay-stub-miniapp": "0.9.7",
+ "@walmart/payrollsolution_miniapp": "0.130.4",
"@walmart/price-changes-mini-app": "1.5.6",
"@walmart/profile-feature-app": "0.74.0",
"@walmart/push-to-talk-mini-app": "1.8.29",
@@ -4835,7 +4835,9 @@
}
},
"node_modules/@walmart/emergency-mini-app": {
- "version": "1.2.0",
+ "version": "1.8.0",
+ "resolved": "https://npme.walmart.com/@walmart/emergency-mini-app/-/emergency-mini-app-1.8.0.tgz",
+ "integrity": "sha512-wc1lUWSyW6EcvNT5Sx4UBRxRvqQ82Rt5AsGOpEAW27jGwU/JmNTiHXJ22d66jBa7/z6RxGVxcdXan1tdDjU1qw==",
"dependencies": {
"@walmart/core-widget-registry": "^0.6.6"
},
@@ -5076,11 +5078,14 @@
}
},
"node_modules/@walmart/inbox-mini-app": {
- "version": "0.68.0",
+ "version": "0.72.0",
+ "resolved": "https://npme.walmart.com/@walmart/inbox-mini-app/-/inbox-mini-app-0.72.0.tgz",
+ "integrity": "sha512-YpBMQ78b/uwY2/ZYTGKbqgNQGoNshim188Y+xpYKoEq8l2t0idFfOMJUXMuzHkaD5Z7neG5AvZEvOqgW1YAB8A==",
"dependencies": {
"@walmart/walmart-fiscal-week": "^0.3.6"
},
"peerDependencies": {
+ "@walmart/attendance-mini-app": "0.28.0",
"@walmart/feedback-all-spark-miniapp": ">=0.1.5",
"@walmart/schedule-mini-app": "^0.2.66",
"@walmart/time-clock-mini-app": "0.13.0",
@@ -24775,7 +24780,9 @@
"integrity": "sha512-tk3UvKAl/VM29GwO/5uNURHnJkR/M1kq42Hn/2Xob+Ww7rY3gOHKhCTL3NytAPrZxyQco0ZyfGOGPbpy2aDnRw=="
},
"@walmart/emergency-mini-app": {
- "version": "1.2.0",
+ "version": "1.8.0",
+ "resolved": "https://npme.walmart.com/@walmart/emergency-mini-app/-/emergency-mini-app-1.8.0.tgz",
+ "integrity": "sha512-wc1lUWSyW6EcvNT5Sx4UBRxRvqQ82Rt5AsGOpEAW27jGwU/JmNTiHXJ22d66jBa7/z6RxGVxcdXan1tdDjU1qw==",
"requires": {
"@walmart/core-widget-registry": "^0.6.6"
},
@@ -24831,7 +24838,9 @@
"version": "1.1.4"
},
"@walmart/inbox-mini-app": {
- "version": "0.68.0",
+ "version": "0.72.0",
+ "resolved": "https://npme.walmart.com/@walmart/inbox-mini-app/-/inbox-mini-app-0.72.0.tgz",
+ "integrity": "sha512-YpBMQ78b/uwY2/ZYTGKbqgNQGoNshim188Y+xpYKoEq8l2t0idFfOMJUXMuzHkaD5Z7neG5AvZEvOqgW1YAB8A==",
"requires": {
"@walmart/walmart-fiscal-week": "^0.3.6"
}
--- package.json
@@ -73,6 +73,7 @@
"@react-navigation/stack": "^6.1.0",
"@sharcoux/slider": "^6.1.1",
"@terrylinla/react-native-sketch-canvas": "0.8.0",
+ "@walmart/OneWalmart-MiniApp": "1.0.12",
"@walmart/allspark-health-survey-mini-app": "0.0.44",
"@walmart/allspark-home-mini-app": "0.6.12",
"@walmart/allspark-neon-core": "0.1.31",
@@ -85,7 +86,7 @@
"@walmart/core-utils": "~1.3.0",
"@walmart/core-widget-registry": "~0.7.2",
"@walmart/counts-component-miniapp": "0.0.42",
- "@walmart/emergency-mini-app": "1.2.0",
+ "@walmart/emergency-mini-app": "1.8.0",
"@walmart/exception-mini-app": "0.43.1",
"@walmart/facilities-management-miniapp": "0.3.26",
"@walmart/feedback-all-spark-miniapp": "0.9.0",
@@ -95,14 +96,13 @@
"@walmart/gtp-shared-components": "1.8.17",
"@walmart/impersonation-mini-app": "1.2.0",
"@walmart/ims-print-services-ui": "1.1.4",
- "@walmart/inbox-mini-app": "0.68.0",
+ "@walmart/inbox-mini-app": "0.72.0",
"@walmart/iteminfo-mini-app": "6.0.1",
"@walmart/manager-approvals-miniapp": "0.1.2",
"@walmart/me-field-mini-app": "1.1.35",
"@walmart/metrics-mini-app": "0.9.33",
"@walmart/mod-flex-mini-app": "1.2.7",
"@walmart/moment-walmart": "1.0.4",
- "@walmart/OneWalmart-MiniApp": "1.0.12",
"@walmart/pay-stub-miniapp": "0.9.7",
"@walmart/payrollsolution_miniapp": "0.130.4",
"@walmart/price-changes-mini-app": "1.5.6",
--- src/navigation/AssociateHallwayNav/MainStackNav.tsx
@@ -270,6 +270,9 @@ export const MainStackNav = () => {
component={EmergencyBannerScreen}
options={{
gestureDirection: 'vertical',
+ gestureEnabled: false,
+ headerShown: true,
+ title: translate('navigation.emergency'),
}}
/>
<MainStack.Screen
--- src/translations/en-US.ts
@@ -86,6 +86,7 @@ export const enUS = {
},
navigation: {
askSam: 'Ask Sam',
+ emergency: 'Message Details',
featureRestrictions: 'Feature restrictions',
feedback: 'Feedback',
home: 'Home',
--- src/translations/es-MX.ts
@@ -93,6 +93,7 @@ export const esMX = {
},
navigation: {
askSam: 'Ask Sam',
+ emergency: 'Detalles del mensaje',
featureRestrictions: 'Restricciones',
feedback: 'Comentarios',
home: 'Inicio',
| Emergency mini app added | Emergency mini app added
|
1f74ec1fcbfcef7ee7eae1da41b7c92d460ff292 | --- app.config.US.ts
@@ -286,6 +286,8 @@ const CONFIG: ExpoConfig = {
packagingOptions: {
pickFirst: ['META-INF/gradle/incremental.annotation.processors'],
},
+ enableProguardInReleaseBuilds: false,
+ enableShrinkResourcesInReleaseBuilds: false,
},
ios: {
useFrameworks: 'static',
| fix(r8): disable proguard optimization (#5048) | fix(r8): disable proguard optimization (#5048)
Co-authored-by: Maksym Novakh <maksym.novakh@walmart.com> |
fb9795f6f84a60065fd0bb2b968807de01de9b8e | --- src/components/TeamList.tsx
@@ -117,11 +117,7 @@ const styles = StyleSheet.create({
padding: 0,
marginVertical: 8,
},
- primaryTeamCardContentSpacing: {
- paddingVertical: 0,
- marginVertical: 0,
- },
- workgroupListItemContainer: {
+ removeVerticalSpacing: {
paddingVertical: 0,
marginVertical: 0,
},
@@ -403,7 +399,7 @@ export const TeamChatCard = (props: {
]}>
<>
{
- <ListItem UNSAFE_style={styles.workgroupListItemContainer}>
+ <ListItem UNSAFE_style={styles.removeVerticalSpacing}>
{workgroupKey === primaryWorkGroup && (
<Text style={styles.workgroupMyTeamOrAreaHeader}>
{t('rosterScreen.teamWorkgroup.myArea')}
@@ -469,7 +465,7 @@ export const TeamChatCard = (props: {
<CardContent
UNSAFE_style={[
styles.workgroupCardContainer,
- styles.primaryTeamCardContentSpacing,
+ styles.removeVerticalSpacing,
]}>
<StoreTeamItem style={styles.expandedStoreTeamItem} />
</CardContent>
--- src/components/TeamList.tsx
@@ -117,11 +117,7 @@ const styles = StyleSheet.create({
padding: 0,
marginVertical: 8,
},
- primaryTeamCardContentSpacing: {
- paddingVertical: 0,
- marginVertical: 0,
- },
- workgroupListItemContainer: {
+ removeVerticalSpacing: {
paddingVertical: 0,
marginVertical: 0,
},
@@ -403,7 +399,7 @@ export const TeamChatCard = (props: {
]}>
<>
{
- <ListItem UNSAFE_style={styles.workgroupListItemContainer}>
+ <ListItem UNSAFE_style={styles.removeVerticalSpacing}>
{workgroupKey === primaryWorkGroup && (
<Text style={styles.workgroupMyTeamOrAreaHeader}>
{t('rosterScreen.teamWorkgroup.myArea')}
@@ -469,7 +465,7 @@ export const TeamChatCard = (props: {
<CardContent
UNSAFE_style={[
styles.workgroupCardContainer,
- styles.primaryTeamCardContentSpacing,
+ styles.removeVerticalSpacing,
]}>
<StoreTeamItem style={styles.expandedStoreTeamItem} />
</CardContent>
| consolidating styles | consolidating styles
|
6ab9ee6715705ee8579f0bc1a1ba7a233f5ae020 | --- .looper-pr.yml
@@ -22,7 +22,7 @@ envs:
STAGES_TO_RUN:
LINT: true
UNITTEST: true
- BUILD: true
+ BUILD: false
SONAR_SCAN: true
ARTIFACT_PUBLISH: true
AUTO_PR_MONO: false
| fix(ui): update looper | fix(ui): update looper
|
30e2dde6796c87fe170a62555b2e8b95affcad07 | --- graphql.yml
@@ -78,11 +78,11 @@ applications:
queryTemplate: 'packages/me-at-walmart-athena-queries/src/getAssociateById.graphql'
tags:
- 'v1'
- - name: 'getAssociatePreferences'
- hash: '38e0530d669fff42cb1dc8e5814369c40c33f6d6a77ed734e039948a0c06e8f4'
- queryTemplate: 'packages/me-at-walmart-athena-queries/src/getAssociatePreference.graphql'
- tags:
- - 'v1'
+ # - name: "getAssociatePreferences"
+ # hash: "38e0530d669fff42cb1dc8e5814369c40c33f6d6a77ed734e039948a0c06e8f4"
+ # queryTemplate: "packages/me-at-walmart-athena-queries/src/getAssociatePreference.graphql"
+ # tags:
+ # - "v1"
- name: 'getDailyRosterHome'
hash: '3c492831585580bae535c3386ec48e90c2d1895450016f050653bd51ddf86c21'
queryTemplate: 'packages/me-at-walmart-athena-queries/src/getDailyRosterHome.graphql'
@@ -93,28 +93,28 @@ applications:
queryTemplate: 'packages/me-at-walmart-athena-queries/src/getLoggedInUser.graphql'
tags:
- 'v1'
- - name: 'getSupplyChainTeamPreference'
- hash: '61253c3d4d8ab6db774a903969c2f63de9113f44c1947d52c3630dd38ce30839'
- queryTemplate: 'packages/me-at-walmart-athena-queries/src/getSupplyChainTeamPreferenceQuery.graphql'
- tags:
- - 'v1'
+ # - name: "getSupplyChainTeamPreference"
+ # hash: "61253c3d4d8ab6db774a903969c2f63de9113f44c1947d52c3630dd38ce30839"
+ # queryTemplate: "packages/me-at-walmart-athena-queries/src/getSupplyChainTeamPreferenceQuery.graphql"
+ # tags:
+ # - "v1"
- name: 'getTeamByIdHome'
hash: '6b4b876250309d85dd51831ace4595bd1764b3d41ef7fd65c08df03b4c4982e0'
queryTemplate: 'packages/me-at-walmart-athena-queries/src/getTeamByIdHome.graphql'
tags:
- 'v1'
- - name: 'GetTeamsByStore'
- hash: 'e500ff0792181beb5a6281effd5b5324834295856eaaa4c2af8336f6643a0a44'
- queryTemplate: 'packages/me-at-walmart-athena-queries/src/getTeamsbyStore.graphql'
- tags:
- - 'v1'
+ # - name: "GetTeamsByStore"
+ # hash: "e500ff0792181beb5a6281effd5b5324834295856eaaa4c2af8336f6643a0a44"
+ # queryTemplate: "packages/me-at-walmart-athena-queries/src/getTeamsbyStore.graphql"
+ # tags:
+ # - "v1"
- name: 'upsertAssociatePreference'
hash: '972c522c6ad0675f13587637cff2dd2ed46937a9878a48a66ad2bc2f7d51a036'
queryTemplate: 'packages/me-at-walmart-athena-queries/src/updateAssociatePrivacyPreference.graphql'
tags:
- 'v1'
- - name: 'upsertManagerExperiencePreference'
- hash: 'bdf7ca7ba91a0c700df0b0dbd418064d98ef1c2818688e2a1c9e478d8cc3e1ca'
- queryTemplate: 'packages/me-at-walmart-athena-queries/src/updateManagerExperiencePreference.graphql'
- tags:
- - 'v1'
+ # - name: "upsertManagerExperiencePreference"
+ # hash: "bdf7ca7ba91a0c700df0b0dbd418064d98ef1c2818688e2a1c9e478d8cc3e1ca"
+ # queryTemplate: "packages/me-at-walmart-athena-queries/src/updateManagerExperiencePreference.graphql"
+ # tags:
+ # - "v1"
| Update graphql.yml | Update graphql.yml
|
84c2f9cba4df2ac6067b994a71d8e0b07278eed8 | --- targets/US/package.json
@@ -147,7 +147,7 @@
"@walmart/shop-gnfr-mini-app": "1.0.137",
"@walmart/sidekick-mini-app": "4.84.14",
"@walmart/store-feature-orders": "1.27.1",
- "@walmart/taskit-mini-app": "5.8.14",
+ "@walmart/taskit-mini-app": "5.8.15",
"@walmart/time-clock-mini-app": "2.448.1",
"@walmart/topstock-mini-app": "1.19.4",
"@walmart/translator-mini-app": "1.3.7",
--- yarn.lock
@@ -7349,7 +7349,7 @@ __metadata:
"@walmart/shop-gnfr-mini-app": "npm:1.0.137"
"@walmart/sidekick-mini-app": "npm:4.84.14"
"@walmart/store-feature-orders": "npm:1.27.1"
- "@walmart/taskit-mini-app": "npm:5.8.14"
+ "@walmart/taskit-mini-app": "npm:5.8.15"
"@walmart/time-clock-mini-app": "npm:2.448.1"
"@walmart/topstock-mini-app": "npm:1.19.4"
"@walmart/translator-mini-app": "npm:1.3.7"
@@ -8283,12 +8283,12 @@ __metadata:
languageName: node
linkType: hard
-"@walmart/taskit-mini-app@npm:5.8.14":
- version: 5.8.14
- resolution: "@walmart/taskit-mini-app@npm:5.8.14"
+"@walmart/taskit-mini-app@npm:5.8.15":
+ version: 5.8.15
+ resolution: "@walmart/taskit-mini-app@npm:5.8.15"
peerDependencies:
"@walmart/allspark-foundation": "*"
- checksum: 10c0/c0f69a33c7337da332fa50b536c26178bfe8b3757799b6248d5dc0cdec8188f76bd9e2782645b24b03cbe797eb183f0e4cb644a1dd5898091ae0b2a7002dc48d
+ checksum: 10c0/82417ca6098cd279ca3312c5bf9b37f1430368ef89c5b44f6298ee66c6faf9c6519cbb673456a477640d2c5118d2a14302673c299a8b300416a123b47ab7dfad
languageName: node
linkType: hard
| chore: bump taskit-mini-app@5.8.15 | chore: bump taskit-mini-app@5.8.15
|
c3c20be49161dfce31d2702933605efcd19eeeff | --- __tests__/whatsNew/WhatsNewScreenTest.tsx
@@ -42,7 +42,7 @@ test('getState', () => {
describe('WhatsNewScreen', () => {
mockUseSelector.mockReturnValueOnce(whatsNewData);
- mockUseSelector.mockReturnValueOnce({ refreshToken:'test' });
+ mockUseSelector.mockReturnValueOnce({refreshToken: 'test'});
const component = create(<WhatsNewScreen />);
it('renders correctly', () => {
@@ -51,7 +51,7 @@ describe('WhatsNewScreen', () => {
it('handles undefined config', () => {
mockUseSelector.mockReturnValueOnce(emptyData);
- mockUseSelector.mockReturnValueOnce({ refreshToken:'test' });
+ mockUseSelector.mockReturnValueOnce({refreshToken: 'test'});
component.update(<WhatsNewScreen />);
@@ -60,7 +60,7 @@ describe('WhatsNewScreen', () => {
it('handles v2 data with section list', () => {
mockUseSelector.mockReturnValueOnce(whatsNewDataV2);
- mockUseSelector.mockReturnValueOnce({ refreshToken:'test' });
+ mockUseSelector.mockReturnValueOnce({refreshToken: 'test'});
component.update(<WhatsNewScreen />);
| lint fix | lint fix
|
4f8c38acc9d2b052d2f8811c8c4713b9567d8145 | --- ios/Podfile.lock
@@ -622,9 +622,9 @@ PODS:
- JWT (~> 3.0.0-beta.12)
- React-Core
- SSZipArchive (~> 2.2.2)
- - compass-sdk-ios (0.4.12.3)
- - compass-sdk-rn (5.19.13):
- - compass-sdk-ios (= 0.4.12.3)
+ - compass-sdk-ios (0.4.12.4)
+ - compass-sdk-rn (5.19.15):
+ - compass-sdk-ios (= 0.4.12.4)
- React-Core
- DoubleConversion (1.1.6)
- EXAV (13.6.0):
@@ -2728,8 +2728,8 @@ SPEC CHECKSUMS:
BoringSSL-GRPC: 3175b25143e648463a56daeaaa499c6cb86dad33
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
CodePush: eaa66fc8dd9ff611304ecc48397ce8831ba79ac9
- compass-sdk-ios: e77515e01cf1c39cf342389b717b72c2aadf0c95
- compass-sdk-rn: 491bc4d39a622a68dd4203199a9492703633b958
+ compass-sdk-ios: ca4aa519d7f425db45b97c774641be756eca719f
+ compass-sdk-rn: caa95d0f17fa547d55405192bf30ebc7a5b8283c
DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
EXAV: 523cd6969ca53b3b2762f18fb5450b76f84df44f
EXConstants: a5f6276e565d98f9eb4280f81241fc342d641590
| update cocopods for compass SDK | update cocopods for compass SDK
|
4951d3252db431d41d3cafffab3994ae047ba58a | --- package.json
@@ -135,7 +135,7 @@
"@walmart/me-at-walmart-container": "workspace:^",
"@walmart/me-at-walmart-geolocation": "1.3.19",
"@walmart/metrics-mini-app": "1.34.4",
- "@walmart/mod-flex-mini-app": "1.31.3",
+ "@walmart/mod-flex-mini-app": "1.31.4",
"@walmart/moment-walmart": "1.0.4",
"@walmart/money-auth-shared-components": "2.4.3",
"@walmart/my-walmart-hub": "1.6.0",
--- yarn.lock
@@ -8475,7 +8475,7 @@ __metadata:
"@walmart/me-at-walmart-container": "workspace:^"
"@walmart/me-at-walmart-geolocation": "npm:1.3.19"
"@walmart/metrics-mini-app": "npm:1.34.4"
- "@walmart/mod-flex-mini-app": "npm:1.31.3"
+ "@walmart/mod-flex-mini-app": "npm:1.31.4"
"@walmart/moment-walmart": "npm:1.0.4"
"@walmart/money-auth-shared-components": "npm:2.4.3"
"@walmart/my-walmart-hub": "npm:1.6.0"
@@ -8756,9 +8756,9 @@ __metadata:
languageName: node
linkType: hard
-"@walmart/mod-flex-mini-app@npm:1.31.3":
- version: 1.31.3
- resolution: "@walmart/mod-flex-mini-app@npm:1.31.3::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fmod-flex-mini-app%2F-%2F%40walmart%2Fmod-flex-mini-app-1.31.3.tgz"
+"@walmart/mod-flex-mini-app@npm:1.31.4":
+ version: 1.31.4
+ resolution: "@walmart/mod-flex-mini-app@npm:1.31.4::__archiveUrl=https%3A%2F%2Fnpm.ci.artifacts.walmart.com%3A443%2Fartifactory%2Fapi%2Fnpm%2Fnpme-npm%2F%40walmart%2Fmod-flex-mini-app%2F-%2F%40walmart%2Fmod-flex-mini-app-1.31.4.tgz"
peerDependencies:
"@react-native-segmented-control/segmented-control": ^2.5.7
"@react-navigation/drawer": ">=7"
@@ -8790,7 +8790,7 @@ __metadata:
redux: ^4.2.1
redux-saga: ^1.2.3
uuid: ^3.3.2
- checksum: 10c0/0cce197bbd6496ce7bbb0f85bed391d6a251c64cda1e1f978bfd5b535d938bcd3e4561dbe350b744ef8ee354e416295365bf2e41423919dae8494dae9977af87
+ checksum: 10c0/d37e0a4d91c426334cd25414a1a2c1da4c5f2942a5bbfef03fbd49f203ab2db4107a42be219b20d7ec42205bca2ccc682a3195931ef943d979b602da28e9114d
languageName: node
linkType: hard
| feat(mod-flex-mini-app): ModFlex drop 35 version bump (#5154) | feat(mod-flex-mini-app): ModFlex drop 35 version bump (#5154)
Co-authored-by: Talia Andrews - t0a07tn <Talia.Andrews@walmart.com> |
7d01e64eec88aa6b26a40f32a6fdfbed9672badb | --- src/managerExperience/screens/RosterDetailScreen/RosterDetailScreen.tsx
@@ -161,7 +161,6 @@ export const RosterDetailScreen = ({route}: RosterDetailScreenProps) => {
teamData={generateTeamSwitcherData(allTeams as Team[])}
onTeamChange={(teamId: string) => {
setCurrentTeamId(teamId);
- console.log(teamId);
}}
loading={loadingTeamData}
refetch={refetchTeamData}
| feat: remove console log | feat: remove console log
|
9d8e6f1a92d8d41ec556cc591900fb72a8ada677 | --- .looper.yml
@@ -65,7 +65,6 @@ flows:
- call: installDependencies
- (name Build Packages) yarn run build
- (name Lint) yarn run lint
- - (name Test) yarn run test
- (name Coverage) yarn run coverage
- call: sonar-fetch-remote-fix-ref
- call: sonar-pr
@@ -74,7 +73,6 @@ flows:
- call: installDependencies
- (name Build Packages) yarn run build
- (name Lint) yarn run lint
- - (name Test) yarn run test
- (name Coverage) yarn run coverage
- call: sonar-branch
| chore: skip test on looper flow where coverage is already run | chore: skip test on looper flow where coverage is already run
|
ec29ffa13e71b54d0668dcd261f3d095a661c6f6 | --- package-lock.json
@@ -5606,9 +5606,9 @@
"integrity": "sha512-vX4PWvt7QJvyd8cTmuBpITXVmHgCJ4ifkSsRSzFpK1fGZyfJaJn+pTP+h7XfQivQYCsIiB3Nm+tF12EXFJPBzg=="
},
"@walmart/shelfavailability-mini-app": {
- "version": "1.3.1-SNAPSHOT.2",
- "resolved": "https://npme.walmart.com/@walmart/shelfavailability-mini-app/-/shelfavailability-mini-app-1.3.1-SNAPSHOT.2.tgz",
- "integrity": "sha512-0DZIy/MnWZAi0bPpF6feW13yfZqOXHP9YlXfTt+KjtB8hl0aGO6OwOmJfFd7WMUuHHEhDPnqgyJ3vzTV/zzMiw=="
+ "version": "1.3.1",
+ "resolved": "https://npme.walmart.com/@walmart/shelfavailability-mini-app/-/shelfavailability-mini-app-1.3.1.tgz",
+ "integrity": "sha512-u8Y69V5647HRNK180lajKHnwAnxI11Xh2zQnURUg4Afnzu8BbCfz1E9l95MxD+5xqjaXsqCOpdqByyxPlPAhow=="
},
"@walmart/taskit-mini-app": {
"version": "0.34.5-beta.9",
--- package.json
@@ -119,7 +119,7 @@
"@walmart/refrigeration-alarms-mini-app": "1.35.0",
"@walmart/schedule-mini-app": "0.25.0",
"@walmart/settings-mini-app": "1.10.0",
- "@walmart/shelfavailability-mini-app": "1.3.1-SNAPSHOT.2",
+ "@walmart/shelfavailability-mini-app": "1.3.1",
"@walmart/taskit-mini-app": "0.34.5-beta.9",
"@walmart/time-clock-mini-app": "0.22.0",
"@walmart/ui-components": "1.5.0",
| SA-276 upped SA to v1.3.1 | SA-276 upped SA to v1.3.1
|
05f1f43c5ffa6b24a83ddf21c7f95e64d35071bc | --- scripts/updateAndroidProjectConfig.sh
@@ -70,5 +70,5 @@ echo "Updating Manifest path in react-native.config.js to ${RN_CONFIG_MANIFEST_P
# sed -i.bak "s/android: ${RN_CONFIG_PROD_APP_MANIFEST_PATH}|android: ${RN_CONFIG_DEV_BETA_APP_MANIFEST_PATH}/android: ${RN_CONFIG_MANIFEST_PATH}/" ${RN_CONFIG_JS} && rm ${RN_CONFIG_JS}
sed -i.bak -e "s/android: ${RN_CONFIG_PROD_APP_MANIFEST_PATH}/android: ${RN_CONFIG_MANIFEST_PATH}/g" -e "s/android: ${RN_CONFIG_DEV_BETA_APP_MANIFEST_PATH}/android: ${RN_CONFIG_MANIFEST_PATH}/g" ${RN_CONFIG_JS} && rm ${RN_CONFIG_JS}.bak
-echo "Printing ${APP_GRADLE}"
-cat ${APP_GRADLE}
\ No newline at end of file
+echo "Printing ${MAIN_ACTIVITY}"
+cat ${MAIN_ACTIVITY}
\ No newline at end of file
| Checking MAIN_ACTIVITY | Checking MAIN_ACTIVITY
|
b86a4bda3f8b4301741a4e15d1f222126b2f97f0 | --- __tests__/navigation/USHallway/AssociateHallwayNav/__snapshots__/MainStackNavTest.tsx.snap
@@ -14,7 +14,7 @@ exports[`AssociateHallwayNav renders MainStackNav 1`] = `
}
>
<Screen
- component="MainTabsNav"
+ component={[Function]}
name="tabs"
options={
{
--- src/navigation/USHallway/AssociateHallwayNav/MainStackNav.tsx
@@ -1,5 +1,5 @@
import {TransitionPresets, createStackNavigator} from '@react-navigation/stack';
-import React, {useEffect} from 'react';
+import React, {useEffect, Suspense} from 'react';
import {Platform} from 'react-native';
import {useDispatch} from 'react-redux';
@@ -61,6 +61,7 @@ import celebrationFeature from '@walmart/celebration-mini-app';
import associateExpHubTeamSwitcherFeature from '@walmart/associate-exp-hub-team-switcher';
import {useMyWalmartV2} from '@/hooks/useMyWalmartV2';
+import {HomeSkeleton} from '@/components/HomeSkeleton';
import AttendanceFeature from '@/features/attendance';
import {CallingFeature} from '@/features/calling';
@@ -86,6 +87,22 @@ import {createMiniAppScreens} from '../../../core/CreateGuardedScreens';
import SidekickMiniApp from '@walmart/sidekick-mini-app';
import {CompShopperModule} from '@walmart/comp-shopper-mini-app';
+// Lazy load tab navigation components
+const LazyTabsLayoutV2 = React.lazy(() => import('../../../app/tabs/_layout'));
+const LazyTabsLayoutV1 = React.lazy(() => import('./Tabs/index').then(m => ({default: m.MainTabsNav})));
+
+// Wrapper components with Suspense boundary to show HomeSkeleton while loading
+const TabsLayoutV2 = (props: any) => (
+ <Suspense fallback={<HomeSkeleton testID="home-skeleton-v2" />}>
+ <LazyTabsLayoutV2 {...props} />
+ </Suspense>
+);
+
+const TabsLayoutV1 = (props: any) => (
+ <Suspense fallback={<HomeSkeleton testID="home-skeleton-v1" />}>
+ <LazyTabsLayoutV1 {...props} />
+ </Suspense>
+);
//--- Main Stack --- //
const MainStack = createStackNavigator<MainStackMap>();
@@ -218,7 +235,7 @@ export const MainStackNav = () => {
<>
<MainStack.Screen
name="tabs"
- component={require('../../../app/tabs/_layout').default}
+ component={TabsLayoutV2}
options={{
headerShown: true,
title: t('forYou.headerTitle'), // Set initial title for the first tab, as this title is visible before onFocus.
@@ -237,7 +254,7 @@ export const MainStackNav = () => {
) : (
<MainStack.Screen
name="tabs"
- component={require('./Tabs/index').MainTabsNav}
+ component={TabsLayoutV1}
options={{
headerShown: false,
}}
--- src/navigation/USHallway/index.tsx
@@ -1,4 +1,4 @@
-import React, {useState, useEffect} from 'react';
+import React, {Suspense} from 'react';
import {useSelector} from 'react-redux';
import {UserSelectors} from '@walmart/allspark-foundation/User';
import {UserType} from '@walmart/me-at-walmart-common';
@@ -38,28 +38,19 @@ const LazyAssociateHallway = React.lazy(() => import('./AssociateHallwayNav'));
* @returns The appropriate hallway component or skeleton loader
*/
export default function USHallway(props: any) {
- // Track whether initial interactions have completed
- const [isReady, setIsReady] = useState(false);
-
// Determine user type from Redux store to select the appropriate hallway
const userType = useSelector(UserSelectors.getUserType);
- useEffect(() => {
- setIsReady(true);
- }, []);
-
- // Show skeleton UI until component has mounted
- if (!isReady) {
- return <HomeSkeleton testID="home-skeleton" />;
- }
-
// Inline require delays loading of either hallway until hallwayType is determined
// This is a performance optimization to avoid loading both components at startup
- // Requiring the hallway can be expensive and result in a delay, in which case the HomeSkeleton
// will remain displayed until the hallway is ready due to the synchronous nature of require
- if (userType === UserType.prehire) {
- return <LazyPrehireHallway {...props} testID='prehire-hallway' />;
- } else {
- return <LazyAssociateHallway {...props} testID='associate-hallway' />;
- }
+ return (
+ <Suspense fallback={<HomeSkeleton testID="home-skeleton" />}>
+ {userType === UserType.prehire ? (
+ <LazyPrehireHallway {...props} testID='prehire-hallway' />
+ ) : (
+ <LazyAssociateHallway {...props} testID='associate-hallway' />
+ )}
+ </Suspense>
+ );
};
| fix: add suspence component for loading hallways (#5280) | fix: add suspence component for loading hallways (#5280)
|
c038b1bde91eb1a0e5635a5e8d94284e97cc25d8 | --- package.json
@@ -32,7 +32,8 @@
"eslint": "^8.19.0",
"husky": "^4.2.5",
"jest": "^29.2.1",
- "npm-run-all": "^4.1.5"
+ "npm-run-all": "^4.1.5",
+ "solidarity": "^3.0.4"
},
"dependenciesMeta": {
"@walmart/amp-mini-app": {
--- targets/US/package.json
@@ -302,7 +302,6 @@
"react-native-version": "^4.0.0",
"react-test-renderer": "18.2.0",
"rn-flipper-async-storage-advanced": "^1.0.5",
- "solidarity": "^3.0.4",
"typescript": "5.0.4",
"yargs": "^17.0.1"
},
--- yarn.lock
@@ -6990,7 +6990,6 @@ __metadata:
rn-flipper-async-storage-advanced: "npm:^1.0.5"
seamless-immutable: "npm:^7.1.4"
semver: "npm:^7.3.4"
- solidarity: "npm:^3.0.4"
typescript: "npm:5.0.4"
util: "npm:^0.12.4"
uuid: "npm:^3.3.2"
@@ -7009,6 +7008,7 @@ __metadata:
husky: "npm:^4.2.5"
jest: "npm:^29.2.1"
npm-run-all: "npm:^4.1.5"
+ solidarity: "npm:^3.0.4"
dependenciesMeta:
"@walmart/amp-mini-app":
built: false
| chore: add solidarity to root package json | chore: add solidarity to root package json
|
b1a4e616af1d9aedba1a57a0727a4c0b75694f62 | --- __tests__/navigation/AssociateHallwayNav/__snapshots__/MainStackNavTest.tsx.snap
@@ -204,6 +204,9 @@ exports[`AssociateHallwayNav matches snapshot; handles mount and unmount effects
options={
Object {
"gestureDirection": "vertical",
+ "gestureEnabled": false,
+ "headerShown": true,
+ "title": "navigation.emergency",
}
}
/>
| updated snapshot | updated snapshot
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.