Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
52df67f
feat: Add income module
d-beezee Jun 25, 2025
5534524
fix(mock): update API path for draft plan retrieval
d-beezee Jun 26, 2025
e8a76e1
test: Update some fixtures
d-beezee Jun 26, 2025
05f3f66
test: Update some fixtures 2
d-beezee Jun 26, 2025
744e101
test: Update some fixture 3
d-beezee Jun 26, 2025
413d753
test: Update fixture 5
d-beezee Jun 26, 2025
0e6cd4e
test: Update fixture 6
d-beezee Jun 26, 2025
e996042
test: Update fixture 7
d-beezee Jun 26, 2025
5cc2324
test: Update fixtures 8
d-beezee Jun 26, 2025
b8ca7f1
test: Update fixtures 9
d-beezee Jun 26, 2025
fcdd6f0
test: Update fixtures 10
d-beezee Jun 26, 2025
4e528d2
test: Go to tab before locality checks
d-beezee Jun 26, 2025
0e7b13f
test: Update fixtures 11
d-beezee Jun 26, 2025
0c9e34c
test: Fix missing await
d-beezee Jun 26, 2025
a96b5dc
chore: Sort examples
d-beezee Jun 26, 2025
c121aca
test: Make age and income disabled check less flaky
d-beezee Jun 26, 2025
c48838f
test: Regenerate examples
d-beezee Jun 26, 2025
0a168e3
Merge pull request #1362 from AppQuality/UN-1512
d-beezee Jun 27, 2025
633ff59
feat(useModule): add support for 'bank' module type configuration
Kariamos Jun 25, 2025
1b07626
feat(bank): implement bank module with validation and delete function…
Kariamos Jun 25, 2025
f09d618
feat(icon): add bank icon and title translation for bank module
Kariamos Jun 25, 2025
0f20bc6
feat(modules): add bank module to modulesMap and MODULES_BY_TAB
Kariamos Jun 25, 2025
2917aa3
feat(translation): add bank-related labels and error messages in Engl…
Kariamos Jun 25, 2025
95d7367
feat(bank): improve layout for other bank providers input
Kariamos Jun 25, 2025
c742f45
feat(bank): enhance handling of "Other providers" input
Kariamos Jun 25, 2025
a944c68
fix(bank): add validation for required name of other bank providers
Kariamos Jun 25, 2025
180ba95
refactor(bank): refactored bank module and removed feature flag check
Kariamos Jun 26, 2025
f82e2c2
fix(translation): update label for bank remove button to "Delete"
Kariamos Jun 26, 2025
ad5d8af
fix(bank): ensure that the other bank provider name is set to an emp…
Kariamos Jun 26, 2025
b2b99fb
test(bank): add bank module and corresponding tests for account manag…
Kariamos Jun 26, 2025
6f1af0f
test(bank): update tests in moduleCheckboxes selector to use role ins…
Kariamos Jun 26, 2025
0ced584
chore(modulesMap): add new fake mapping modules
Kariamos Jun 26, 2025
0781b59
Update src/pages/Plan/modules/Bank.tsx
Kariamos Jun 26, 2025
8be2fef
refactor(bank): reinserted function inside handling onchange
Kariamos Jun 26, 2025
eb0b199
style(bank): improve layout for other providers selection
Kariamos Jun 26, 2025
81feae1
chore(modulesMap): remove placeholder modules from modulesMap
Kariamos Jun 27, 2025
3f6012d
feat(bank): make other bank name field read-only in non-draft status
Kariamos Jun 27, 2025
aa9b2ea
test(bank): updated tests and fixtures
Kariamos Jun 27, 2025
8b83070
fix(Signup): update terms and conditions link to include privacy policy
cannarocks Jun 26, 2025
e03f337
refactor(ageModule): rename variable for clarity in expectToBeReadonly
Kariamos Jun 27, 2025
728776d
i18n: Add textarea required message
d-beezee Jun 27, 2025
5c3be05
feat: Integrate analytics tracking with Google Tag Manager and use-an…
cannarocks Jun 25, 2025
f8ee9c7
fix: Remove unused react-gtm-module dependency from package.json and …
cannarocks Jun 25, 2025
e5457eb
feat: Add segment analytics plugin and update dependencies in package…
cannarocks Jun 25, 2025
6944a6c
fix: Correct identifier format in analytics tracking for user profile
cannarocks Jun 25, 2025
5eca6f7
test: Restore employment
d-beezee Jun 27, 2025
574103e
feat: Update examples
d-beezee Jun 27, 2025
0153568
Merge pull request #1360 from AppQuality/UN-1514-module-bank
d-beezee Jun 27, 2025
d8ca5e1
fix: remove feature flag checks for draft status in multiple modules
cannarocks Jun 25, 2025
43ede70
fix(modules): restore feature flag checks for draft status in Instruc…
cannarocks Jun 26, 2025
529b9bf
fix(employment): simplify destructuring in map function for Employmen…
cannarocks Jun 26, 2025
d497487
feat(useModule): Add default bank on creation
d-beezee Jun 27, 2025
abc7f15
Merge pull request #1363 from AppQuality/add-starting-data-for-bank
d-beezee Jun 27, 2025
003eab5
feat(Bank): update bank output to return first non-other bank and rem…
d-beezee Jun 27, 2025
e9b3fea
refactor(Bank): simplify bank output handling and update type definition
d-beezee Jun 27, 2025
f5617d1
fix: Update starting age ranges
d-beezee Jun 27, 2025
f0817f9
refactor(Locality): move handleAreaChange function and add validation…
d-beezee Jun 27, 2025
9115c7f
Merge pull request #1364 from AppQuality/add-starting-data-for-bank
d-beezee Jun 27, 2025
dc68c1a
feat: Add basic electricity provider structure
d-beezee Jun 30, 2025
958d1d0
test: Add readonly test for electricity
d-beezee Jun 30, 2025
dde779a
i18n: Add electricity provider error messages and labels in translations
d-beezee Jun 30, 2025
ca4d471
feat: Update default electricity providers list with new entries
d-beezee Jun 30, 2025
48afb68
Merge pull request #1367 from AppQuality/UN-1515-elettriciti
d-beezee Jun 30, 2025
4b9c5df
refactor(schema, api): reorganize and enhance type definitions for cl…
sinatragianpaolo Jun 30, 2025
6e97b80
feat(InternetMobile): add default mobile internet providers and type …
sinatragianpaolo Jun 30, 2025
67579be
feat(InternetMobile): add mobile internet providers module with valid…
sinatragianpaolo Jun 30, 2025
7d3c9ff
feat(InternetHome): add home internet providers module with default p…
sinatragianpaolo Jun 30, 2025
aefd299
feat(translations): add internet home label to plan page module in En…
sinatragianpaolo Jun 30, 2025
50c4775
feat(InternetHome): update error messages and labels for internet hom…
sinatragianpaolo Jun 30, 2025
38bf649
Merge pull request #1366 from AppQuality/UN-1523
d-beezee Jun 30, 2025
15e88e4
feat: Add gas supply module with default providers and validation
iacopolea Jun 30, 2025
06c528b
feat: Add gas supply module and integrate into plan page
iacopolea Jun 30, 2025
5e77480
feat: Add gas icon and update gas supply module icon rendering
iacopolea Jun 30, 2025
6ed1d1b
feat: Update default gas providers to include Enel Energia and relate…
iacopolea Jun 30, 2025
bf2ae40
feat: Add configuration for 'elettricity_supply' module with default …
iacopolea Jun 30, 2025
bd64284
feat: Add gas provider error messages and labels in English and Itali…
iacopolea Jun 30, 2025
e5a850c
fix: Rename 'elettricity_supply' case to 'gas_supply' in useModule co…
d-beezee Jun 30, 2025
ae31958
Merge pull request #1368 from AppQuality/UN-1517-gas-supply-module
d-beezee Jun 30, 2025
d5bceae
Merge pull request #1361 from AppQuality/UN-1527-add-privacy-policy-t…
cannarocks Jun 30, 2025
a2858fa
Merge pull request #1359 from AppQuality/UN-1526-release-e2e-ff
cannarocks Jun 30, 2025
1443871
Merge pull request #1358 from AppQuality/add-segment
cannarocks Jun 30, 2025
175bf5d
fix: Update TooltipModal to append to document body and set max heigh…
d-beezee Jun 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
"version": "1.4.0",
"private": true,
"dependencies": {
"@analytics/google-tag-manager": "^0.6.0",
"@analytics/segment": "^2.1.0",
"@appquality/languages": "1.4.3",
"@appquality/unguess-design-system": "4.0.42",
"@headwayapp/react-widget": "^0.0.4",
"@reduxjs/toolkit": "^1.8.0",
"@sentry/react": "^8.32.0",
"@zendeskgarden/svg-icons": "^7.2.0",
"comuni-province-regioni": "^0.4.3",
"analytics": "^0.8.16",
"date-fns": "^2.28.0",
"formik": "^2.2.9",
"i18n-iso-countries": "^7.3.0",
Expand All @@ -20,7 +23,6 @@
"query-string": "^7.1.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-gtm-module": "^2.0.11",
"react-helmet": "^6.1.0",
"react-i18next": "^15.0.2",
"react-redux": "^7.2.6",
Expand All @@ -29,6 +31,7 @@
"styled-components": "^6.1.1",
"ts-node": "^10.9.2",
"typescript": "^4.6.2",
"use-analytics": "^1.1.0",
"uuid": "^10.0.0",
"web-vitals": "^2.1.4",
"yup": "^0.32.11"
Expand Down Expand Up @@ -79,10 +82,10 @@
"@types/qs": "^6.9.7",
"@types/react": "^18.3.9",
"@types/react-dom": "^18.3.0",
"@types/react-gtm-module": "^2.0.1",
"@types/react-helmet": "^6.1.5",
"@types/react-scroll": "^1.8.10",
"@types/react-transition-group": "^4.4.5",
"@types/use-analytics": "^0.0.3",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
Expand Down
16 changes: 16 additions & 0 deletions src/@types/analytics__google-tag-manager/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
declare module '@analytics/google-tag-manager' {
type AnalyticsPlugin = import('analytics').AnalyticsPlugin;

type GoogleTagManagerConfig = {
auth?: string;
containerId: string;
customScriptSrc?: string;
dataLayerName?: string;
debug?: boolean;
execution?: string;
preview?: string;
};

function googleTagManager(config: GoogleTagManagerConfig): AnalyticsPlugin;
export default googleTagManager;
}
20 changes: 20 additions & 0 deletions src/@types/analytics__segment/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
declare module '@analytics/segment' {
type AnalyticsPlugin = import('analytics').AnalyticsPlugin;

type SegmentConfig = {
/** Your segment write key */
writeKey: string;
flushAt?: number;
/* Segment sdk config options. Docs https://segment.com/docs/connections/sources/catalog/libraries/server/node/#configuration */
flushInterval?: number;
/** Disable loading segment for anonymous visitors */
disableAnonymousTraffic?: boolean;
/** Override the Segment snippet url, for loading via custom CDN proxy */
customScriptSrc?: boolean;
/** Enable/disable segment destinations https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/#managing-data-flow-with-the-integrations-object */
integrations?: Record<string, boolean>;
};

function segmentPlugin(config: SegmentConfig): AnalyticsPlugin;
export default segmentPlugin;
}
24 changes: 24 additions & 0 deletions src/analytics.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import Analytics from 'analytics';
import googleTagManager from '@analytics/google-tag-manager';
import segmentPlugin from '@analytics/segment';
import { isDev } from './common/isDevEnvironment';

const analytics = Analytics({
app: 'unguess-react',
plugins: [
googleTagManager({
containerId: process.env.REACT_APP_GTM_ID || 'GTM-WVXPS94',
...(isDev() && {
auth: 'HjeAxSQB9e685mi-_8YiDw',
preview: 'env-4',
}),
}),
segmentPlugin({
writeKey: isDev()
? 'AxHbacd31w50NwjDM8tadsP82hSwTz4Z'
: 'oxd3W7coKxDdzq99F88doV5VvQrESbJh',
}),
],
});

export default analytics;
54 changes: 29 additions & 25 deletions src/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,44 @@ import Helmet from 'react-helmet';
import { useTranslation } from 'react-i18next';
import { Provider } from 'react-redux';
import { appTheme } from 'src/app/theme';
import { AnalyticsProvider } from 'use-analytics';
import Pages from 'src/common/Pages';
import analytics from 'src/analytics';
import '../i18n';
import { store } from './store';

const App = () => {
const { t } = useTranslation();
return (
<Provider store={store}>
<ThemeProvider theme={appTheme}>
<GlobalStyle />
<Helmet>
<meta
property="og:title"
content={`UNGUESS - ${t('__APP_META_PAYOFF')}`}
/>
<title>UNGUESS - {t('__APP_META_PAYOFF')}</title>
<meta name="description" content={t('__APP_META_DESCRIPTION')} />
</Helmet>
<ToastProvider
limit={5}
zIndex={500}
placementProps={{
top: {
style: {
top:
parseInt(appTheme.components.chrome.header.height, 10) +
appTheme.space.base * 4,
<AnalyticsProvider instance={analytics}>
<ThemeProvider theme={appTheme}>
<GlobalStyle />
<Helmet>
<meta
property="og:title"
content={`UNGUESS - ${t('__APP_META_PAYOFF')}`}
/>
<title>UNGUESS - {t('__APP_META_PAYOFF')}</title>
<meta name="description" content={t('__APP_META_DESCRIPTION')} />
</Helmet>
<ToastProvider
limit={5}
zIndex={500}
placementProps={{
top: {
style: {
top:
parseInt(appTheme.components.chrome.header.height, 10) +
appTheme.space.base * 4,
},
},
},
}}
>
<Pages />
</ToastProvider>
</ThemeProvider>
}}
>
<Pages />
</ToastProvider>
</ThemeProvider>
</AnalyticsProvider>
</Provider>
);
};
Expand Down
3 changes: 3 additions & 0 deletions src/assets/icons/arrow-trending.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/icons/gas_module_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/icons/home-internet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 32 additions & 21 deletions src/common/GoogleTagManager.tsx → src/common/Track.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import React, { useEffect } from 'react';
import TagManager, { TagManagerArgs } from 'react-gtm-module';
import { Helmet } from 'react-helmet';
import { useLocation } from 'react-router-dom';
import { useAppSelector } from 'src/app/hooks';
import { useActiveWorkspace } from 'src/hooks/useActiveWorkspace';
import { isDev } from './isDevEnvironment';
import { useAnalytics } from 'use-analytics';

const tagManagerArgs: TagManagerArgs = {
gtmId: process.env.REACT_APP_GTM_ID || 'GTM-WVXPS94',
...(isDev() && {
auth: 'HjeAxSQB9e685mi-_8YiDw',
preview: 'env-4',
}),
events: {
unguess_loaded: 'unguess_loaded',
workspace_change: 'workspace_change',
generic_error: 'generic_error',
},
};
TagManager.initialize(tagManagerArgs);
// const tagManagerArgs: TagManagerArgs = {
// gtmId: process.env.REACT_APP_GTM_ID || 'GTM-WVXPS94',
// ...(isDev() && {
// auth: 'HjeAxSQB9e685mi-_8YiDw',
// preview: 'env-4',
// }),
// events: {
// unguess_loaded: 'unguess_loaded',
// workspace_change: 'workspace_change',
// generic_error: 'generic_error',
// },
// };
// TagManager.initialize(tagManagerArgs);

export const GoogleTagManager = ({
export const Track = ({
title,
children,
}: {
Expand All @@ -28,6 +28,12 @@ export const GoogleTagManager = ({
}) => {
const { userData } = useAppSelector((state) => state.user);
const { activeWorkspace } = useActiveWorkspace();
const { track, identify, page } = useAnalytics();
const location = useLocation();

useEffect(() => {
page();
}, [location]);

const helmet = () => (
<Helmet>
Expand All @@ -39,19 +45,24 @@ export const GoogleTagManager = ({

useEffect(() => {
if (userData?.role && activeWorkspace?.company) {
const tagManagerDataLayer = {
identify(`profile_${userData.profile_id}`, {
role: userData.role,
customer_role: userData.customer_role,
wp_user_id: userData.tryber_wp_user_id,
tester_id: userData.profile_id,
name: userData.name,
email: userData.email,
company: activeWorkspace.company,
event: 'unguess_loaded',
};
});

TagManager.dataLayer({
dataLayer: tagManagerDataLayer,
track('unguess_loaded', {
role: userData.role,
customer_role: userData.customer_role,
wp_user_id: userData.tryber_wp_user_id,
tester_id: userData.profile_id,
name: userData.name,
email: userData.email,
company: activeWorkspace.company,
});
}
}, [userData, activeWorkspace]);
Expand Down
6 changes: 3 additions & 3 deletions src/common/components/ErrorBoundary/ErrorBoundaryPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from '@appquality/unguess-design-system';
import { useTranslation } from 'react-i18next';
import { ReactComponent as Illustration } from 'src/assets/errorBoundaryPage.svg';
import { GoogleTagManager } from 'src/common/GoogleTagManager';
import { Track } from 'src/common/Track';
import { Logged } from 'src/features/templates/Logged';
import styled from 'styled-components';

Expand All @@ -26,7 +26,7 @@ const ErrorBoundaryPage = () => {
const { t } = useTranslation();

return (
<GoogleTagManager title={t('__ERROR_PAGE_TITLE')}>
<Track title={t('__ERROR_PAGE_TITLE')}>
<Logged route="">
<Container id="error-container" style={{ height: '100%' }}>
<Grid>
Expand Down Expand Up @@ -56,7 +56,7 @@ const ErrorBoundaryPage = () => {
</Grid>
</Container>
</Logged>
</GoogleTagManager>
</Track>
);
};

Expand Down
Loading
Loading