Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: display activity assignment target (M2-7407, M2-7408) #859

Merged
merged 32 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c9f817f
chore: enable prettier validation with eslint
qiushihe Sep 11, 2024
233cf76
chore: remove prettier scripts
qiushihe Sep 16, 2024
a85be04
chore: add type:check script
qiushihe Sep 16, 2024
6e2e523
chore: allow `never` in template expressions
qiushihe Sep 13, 2024
e03acc7
fix: error type casting in template expressions
qiushihe Sep 16, 2024
cd0a0db
fix: couple of dangling promises
qiushihe Sep 16, 2024
5055654
fix: few hook parameter types
qiushihe Sep 16, 2024
3c056a9
fix: some async functions in RefreshService
qiushihe Sep 16, 2024
d03775a
chore: remove unnecessary interface retype types
qiushihe Sep 16, 2024
693e7a6
chore: rename parameter variable name
qiushihe Sep 16, 2024
527fd02
chore: create specific type for api function
qiushihe Sep 16, 2024
9546e8d
feat: display activity assignment target
qiushihe Sep 18, 2024
f728ee7
chore: fix tests
qiushihe Sep 18, 2024
6f6269a
feat: refactor to support target subject ID
Sep 21, 2024
3210cbf
chore: refactor import/export pattern
Sep 25, 2024
d374cf3
fix: collect completions service tests
Sep 25, 2024
d1b9500
fix: react-native-get-random-values import
Sep 26, 2024
2f11741
fix: tests
Sep 27, 2024
03cf372
fix: lint
Sep 30, 2024
08ccb46
chore: clean up jest mocks
Sep 30, 2024
7296728
chore: move all interfaces into own files
Oct 2, 2024
8bcb820
chore: remove husky
Oct 2, 2024
4af9ecb
fix: allow activity with missing record to start
Oct 2, 2024
35946b7
fix: fallback logging for logger send failure
Oct 3, 2024
d1e064f
fix: spelling for a type name
Oct 3, 2024
ac130f7
chore: remove extension from import statements
Oct 3, 2024
f9cf7d5
chore: disable eslint template expression restrictions
Oct 3, 2024
cf75235
fix: mapper tests mock default auto-assign value
Oct 3, 2024
d96ff2d
fix: entities grouping logic
Oct 4, 2024
e3b830f
chore: change reduce to a for-loop
Oct 4, 2024
f034dbe
fix: placement of assignment badge
Oct 6, 2024
09b0a79
fix: entity-event sorting logic
Oct 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 9 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ module.exports = {
'eslint:recommended',
'@react-native-community',
'plugin:react/recommended',
'prettier'
'plugin:prettier/recommended'
],
plugins: ['import', 'react', 'react-hooks', 'unused-imports', 'jest'],
plugins: ['import', 'react', 'react-hooks', 'unused-imports', 'jest', 'prettier'],
rules: {
'react/react-in-jsx-scope': 'off',
'react/no-unstable-nested-components': 'off',
Expand Down Expand Up @@ -47,7 +47,6 @@ module.exports = {
},
],
'react-hooks/rules-of-hooks': 'warn',
'import/no-cycle': 'warn',
'constructor-super': 'warn',
'no-var': 'warn',
'no-caller': 'warn',
Expand Down Expand Up @@ -95,6 +94,12 @@ module.exports = {
'react/no-unsafe': 'warn',
'react/require-render-return': 'warn',
'react/display-name': 'off',

// This option generate warning messages from parsing packages inside
// node_modules, which we technically don't care about. Plus, this option
// also just don't seem to work. So, disable it for now.
// 'import/no-cycle': 'error',
'import/no-cycle': 'off',
},
overrides: [
{
Expand Down Expand Up @@ -127,7 +132,7 @@ module.exports = {
'@typescript-eslint/unbound-method': 'warn',
'@typescript-eslint/restrict-plus-operands': 'warn',
'@typescript-eslint/no-unsafe-return': 'warn',
'@typescript-eslint/restrict-template-expressions': 'warn',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/no-unused-vars': 'off',
},
},
Expand Down
7 changes: 0 additions & 7 deletions .husky/pre-commit

This file was deleted.

4 changes: 4 additions & 0 deletions assets/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -489,5 +489,9 @@
"dialog": {
"body": "Sharing responses publicly implies that information provided by individual users, such as survey responses or feedback, will be openly available for others to view."
}
},
"assignment": {
"badge": "About {{name}}",
"banner": "Please ensure all your responses are about <strong>{{name}}</strong>"
}
}
4 changes: 4 additions & 0 deletions assets/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -598,5 +598,9 @@
"dialog": {
"body": "Le partage public des réponses implique que les informations fournies par les utilisateurs individuels, telles que les réponses au sondage ou les commentaires, seront librement accessibles à d'autres personnes."
}
},
"assignment": {
"badge": "À propos de {{name}}",
"banner": "Veuillez vous assurer que toutes vos réponses concernent <strong>{{name}}</strong>"
}
}
2 changes: 1 addition & 1 deletion assetsTransformer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const path = require('path');

module.exports = {
process(src, filename, config, options) {
process(_, filename /* config, options */) {
return 'module.exports = ' + JSON.stringify(path.basename(filename)) + ';';
},
};
22 changes: 15 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
import 'react-native-gesture-handler';
import 'react-native-get-random-values';

import { AppRegistry } from 'react-native';

import PropTypes from 'prop-types';

import { jobRunner } from '@shared/lib/services/jobManagement';

import { name as appName } from './app.json';
import App from './src/app';
import displayRemoteNotifications from './src/jobs/display-remote-notifications';
import localization from './src/jobs/localization';
import requestInterception from './src/jobs/request-interception';
import responseInterception from './src/jobs/response-interception';
import setBackgroundTask from './src/jobs/set-background-task';
import { jobRunner } from './src/shared/lib';

jobRunner.runAll([
requestInterception,
responseInterception,
setBackgroundTask,
]);
jobRunner
.runAll([requestInterception, responseInterception, setBackgroundTask])
.catch(console.error);

jobRunner.runAllSync([localization, displayRemoteNotifications]);
jobRunner
.runAllSync([localization, displayRemoteNotifications])
.catch(console.error);

function HeadlessCheck({ isHeadless }) {
if (isHeadless) {
Expand All @@ -26,4 +30,8 @@ function HeadlessCheck({ isHeadless }) {
return <App />;
}

HeadlessCheck.propTypes = {
isHeadless: PropTypes.bool,
};

AppRegistry.registerComponent(appName, () => HeadlessCheck);
9 changes: 0 additions & 9 deletions jest.components.jsx

This file was deleted.

6 changes: 4 additions & 2 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ const jestConfig: JestConfigWithTsJest = {
'node_modules/(?!(jest-)?@?react-native|@react-native-community|@react-navigation|@react-native-device-info|@notifee|@miblanchard/react-native-slider|victory-*|@shopify/react-native-skia|react-native-reanimated|react-redux)',
],
setupFiles: [
'<rootDir>/jest.setup.js',
'<rootDir>/jest.components.jsx',
'<rootDir>/jest.vendor-mocks.js',
'<rootDir>/node_modules/react-native-gesture-handler/jestSetup.js',
'<rootDir>/node_modules/react-native-reanimated/src/reanimated2/jestUtils.ts',
],
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
moduleDirectories: ['node_modules', '<rootDir>'],
moduleNameMapper: {
...pathsToModuleNameMapper({
Expand All @@ -43,6 +43,8 @@ const jestConfig: JestConfigWithTsJest = {
'<rootDir>/assetsTransformer.js',
'^uuid$': require.resolve('uuid'),
},
restoreMocks: true,
clearMocks: true,
};

export default jestConfig;
Loading
Loading