Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
7cb79b9
Add payment processing features and update plan status handling
cannarocks Aug 22, 2025
3fb28e8
chore(actions): update workflow files to standardize node version syn…
cannarocks Aug 26, 2025
41dcea9
fix: add translation for 'BUY NOW' button in English and Italian
Kariamos Aug 27, 2025
40e00b8
fix: update translations for error messages in English and Italian
Kariamos Aug 27, 2025
88b01fd
Update src/pages/Plan/summary/components/BuyButton.tsx
Kariamos Aug 27, 2025
9799652
fix: log error message during checkout process
Kariamos Aug 27, 2025
9d10d63
feat: implement error handling with toasts for login and nonce retrieval
iacopolea Aug 28, 2025
604f438
fix: update mock functions to handle successful and fallback response…
iacopolea Aug 28, 2025
324bad9
validate
iacopolea Aug 28, 2025
62e2f01
validate
iacopolea Aug 28, 2025
a5b54b3
fix: remove unused analytics dependencies and add userpilot package
cannarocks Sep 1, 2025
5d9c106
feat: implement userpilot analytics plugin and remove segment plugin
cannarocks Sep 1, 2025
9be1b42
Merge pull request #1410 from AppQuality/test-purchasable-plans
cannarocks Sep 1, 2025
670597e
Merge pull request #1417 from AppQuality/UN-1734-direct-setup-userpilot
cannarocks Sep 1, 2025
26bf5b9
Merge pull request #1415 from AppQuality/UN-1727-LOGIN-403-non-gestita
cannarocks Sep 1, 2025
b0dae83
Merge pull request #1413 from AppQuality/UN-1726-add-cache
cannarocks Sep 1, 2025
afb5ded
feat: link join page to login page and vice versa
iacopolea Sep 2, 2025
2d07524
feat: add robots.txt and enhance meta tags for JoinPage
cannarocks Sep 2, 2025
f5867fb
fix: ensure analytics plugins are only added in non-test environments
cannarocks Sep 3, 2025
0347996
Merge pull request #1418 from AppQuality/UN-1761-Ricerca-Google-Meta-…
cannarocks Sep 3, 2025
a7dd716
feat: enhance PlanProvider to initialize active tab from URL paramete…
iacopolea Sep 2, 2025
f57b595
chore validation
iacopolea Sep 2, 2025
215137f
feat: update PlanProvider to use searchParams for active tab management
iacopolea Sep 2, 2025
8762151
fix: update URL expectation in save template test to include tab para…
iacopolea Sep 3, 2025
11bd1f8
feat: increase parallel job execution to 8 shards in E2E tests
iacopolea Sep 3, 2025
6764c0b
fix: update translation keys for consistency and improve JoinForm layout
iacopolea Sep 3, 2025
25bed1e
Merge branch 'develop' into UN-1736-UG-React-Collegare-Join-e-login
iacopolea Sep 3, 2025
9a79158
fix: remove unused navigate import in Step1 component
iacopolea Sep 4, 2025
f6b451e
fix: clean up import statements in LoginPage component
cannarocks Sep 4, 2025
fbea5a1
Merge pull request #1420 from AppQuality/UN-1736-UG-React-Collegare-J…
cannarocks Sep 4, 2025
c9101ac
fix: update dashboard and plan page button labels for clarity
Kariamos Sep 4, 2025
95c6451
Merge pull request #1422 from AppQuality/UN-1745
cannarocks Sep 4, 2025
3b56c39
refactor: move plan checks after the useEffect hook to avoid react error
Kariamos Sep 4, 2025
abece1f
Merge pull request #1419 from AppQuality/UN-1762-UNGUESS-query-param-…
cannarocks Sep 4, 2025
8c31d91
refactor: update styled-components prop forwarding and improve TableW…
iacopolea Sep 5, 2025
61ba284
feat: add @emotion/is-prop-valid dependency and update PlanPage compo…
iacopolea Sep 5, 2025
4cff250
refactor: remove @emotion/is-prop-valid dependency and clean up App c…
iacopolea Sep 5, 2025
b722036
Merge pull request #1426 from AppQuality/fixes
d-beezee Sep 8, 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
17 changes: 13 additions & 4 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
strategy:
fail-fast: false
matrix:
# run 6 copies of the job in parallel
shard: [1, 2, 3, 4, 5, 6]
# run 8 copies of the job in parallel
shard: [1, 2, 3, 4, 5, 6, 7, 8]

name: "Playwright Tests - pwc"
name: 'Playwright Tests - pwc'
timeout-minutes: 20
runs-on: ubuntu-22.04
container: mcr.microsoft.com/playwright:v1.39.0-jammy
Expand All @@ -43,7 +43,16 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: "18.x"
node-version: '18.x'

- name: Cache node_modules
uses: actions/cache@v3
with:
path: |
node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install dependencies
run: |
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Cache node_modules
uses: actions/cache@v3
with:
path: |
node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Use Node.js 18.x
uses: actions/setup-node@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
"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.48",
"@appquality/unguess-design-system": "4.0.49",
"@atlaskit/pragmatic-drag-and-drop": "^1.7.4",
"@atlaskit/pragmatic-drag-and-drop-flourish": "^2.0.3",
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
Expand Down Expand Up @@ -35,6 +34,7 @@
"ts-node": "^10.9.2",
"typescript": "^4.6.2",
"use-analytics": "^1.1.0",
"userpilot": "^1.4.1",
"uuid": "^10.0.0",
"web-vitals": "^2.1.4",
"yup": "^0.32.11"
Expand Down
File renamed without changes.
20 changes: 0 additions & 20 deletions src/@types/analytics__segment/index.d.ts

This file was deleted.

30 changes: 15 additions & 15 deletions src/analytics.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import Analytics from 'analytics';
import googleTagManager from '@analytics/google-tag-manager';
import segmentPlugin from '@analytics/segment';
import Analytics from 'analytics';
import userpilot from './common/analytics-plugins/userpilot';
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',
...(process.env.NODE_ENV !== 'test' && {
plugins: [
googleTagManager({
containerId: process.env.REACT_APP_GTM_ID || 'GTM-WVXPS94',
...(isDev() && {
auth: 'HjeAxSQB9e685mi-_8YiDw',
preview: 'env-4',
}),
}),
userpilot({
token: isDev() ? 'STG-NX-54e88e10' : 'NX-54e88e10',
}),
}),
segmentPlugin({
writeKey: isDev()
? 'AxHbacd31w50NwjDM8tadsP82hSwTz4Z'
: 'oxd3W7coKxDdzq99F88doV5VvQrESbJh',
}),
],
],
}),
});

export default analytics;
Binary file modified src/assets/join-loghi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/join-loghi.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 27 additions & 17 deletions src/common/Track.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,38 @@ import { useGetUsersMeQuery } from 'src/features/api';
import { useActiveWorkspace } from 'src/hooks/useActiveWorkspace';
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);

export const Track = ({
title,
description,
metaTags,
children,
}: {
title: string;
description?: string;
metaTags?: { name: string; content: string }[];
children: React.ReactNode;
}) => {
const { data: userData, isLoading, isSuccess } = useGetUsersMeQuery();
const { activeWorkspace } = useActiveWorkspace();
const { track, identify, page } = useAnalytics();
const location = useLocation();

const defaultMeta = [
{ name: 'og:description', content: description ?? title },
{ name: 'robots', content: 'noindex, nofollow' },
];

// Merge metaTags over defaultMeta, overriding by name
const meta: { name: string; content: string }[] = [
...defaultMeta.map((def) => {
const override = metaTags?.find((m) => m.name === def.name);
return override ?? def;
}),
...(metaTags?.filter(
(m) => !defaultMeta.some((def) => def.name === m.name)
) ?? []),
];

useEffect(() => {
page();
}, [location]);
Expand All @@ -39,7 +45,10 @@ export const Track = ({
<Helmet>
<title>{title} - UNGUESS</title>
<meta property="og:title" content={title} />
<meta name="description" content={title} />
<meta name="description" content={description ?? title} />
{meta.map((m) => (
<meta key={m.name} name={m.name} content={m.content} />
))}
</Helmet>
);

Expand All @@ -53,6 +62,7 @@ export const Track = ({
name: userData.name,
email: userData.email,
company: activeWorkspace.company,
workspace: activeWorkspace,
});

track(
Expand All @@ -68,8 +78,8 @@ export const Track = ({
},
{
plugins: {
// disable track event for segment
segment: false,
// disable userpilot for this event
userpilot: false,
},
}
);
Expand Down
61 changes: 61 additions & 0 deletions src/common/analytics-plugins/userpilot.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import { User } from 'src/features/api';
import { Userpilot } from 'userpilot';

declare global {
interface Window {
userpilot?: {
initialized: number;
};
}
}

interface UserpilotConfig {
token: string;
name?: string;
}

interface IPayload {
type: string;
userId: string;
}

interface IIdentifyPayload extends IPayload {
traits: User & { workspace: { id: number; company: string } };
}

export default function userpilotPlugin(pluginSettings: UserpilotConfig) {
return {
name: 'userpilot',
config: { ...pluginSettings },
initialize: ({ config }: { config: UserpilotConfig }) => {
Userpilot.initialize(config.token);
},
identify: ({ payload }: { payload: IIdentifyPayload }) => {
const { userId, traits } = payload;
const { workspace, ...basicTraits } = traits;

Userpilot.identify(userId, {
...basicTraits,
company: {
id: workspace.id,
name: workspace.company,
},
});
},

page: () => {
Userpilot.reload();
},

track: ({
payload,
}: {
payload: IPayload & { event: string; properties: Record<string, any> };
}) => {
const { event, properties, userId } = payload;
Userpilot.track(event, { ...properties, userId });
},

loaded: () => !!window.userpilot,
};
}
8 changes: 4 additions & 4 deletions src/common/components/PasswordRequirements.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MD, theme } from '@appquality/unguess-design-system';
import { SM, theme } from '@appquality/unguess-design-system';
import { ReactComponent as X } from 'src/assets/icons/password-check-x.svg';
import { ReactComponent as Check } from 'src/assets/icons/password-check-v.svg';
import { useTranslation } from 'react-i18next';
Expand All @@ -16,14 +16,14 @@ const PasswordRequirement = ({
) : (
<X aria-hidden="true" fontSize={16} />
)}
<MD
<SM
isBold={!check()}
style={{
color: `${check() ? theme.palette.grey[500] : theme.palette.grey[700]}`,
}}
>
{children}
</MD>
</SM>
</li>
);

Expand All @@ -32,7 +32,7 @@ const PasswordRequirements = ({ password }: { password: string }) => {

return (
<div data-qa="password-requirements" className="aq-mb-3">
<MD>{t('PASSWORD_VALIDATOR_PASSWORD_REQUIREMENTS')}</MD>
<SM>{t('PASSWORD_VALIDATOR_PASSWORD_REQUIREMENTS')}</SM>
<ul>
<PasswordRequirement check={() => password.length >= 6}>
{t('PASSWORD_VALIDATOR_MINIMUM_OF_6_CHARACTERS')}
Expand Down
8 changes: 4 additions & 4 deletions src/common/components/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ type TableProps<T extends TableData, K extends keyof T> = {
emptyState?: JSX.Element;
};

const TableWrapper = styled.div<{ maxHeight?: string }>`
const TableWrapper = styled.div<{ $maxHeight?: string }>`
width: 100%;
padding-bottom: ${({ theme }) => theme.space.sm};
${({ maxHeight }) =>
maxHeight && `max-height: ${maxHeight}; overflow-y: auto;`}
${({ $maxHeight }) =>
$maxHeight && `max-height: ${$maxHeight}; overflow-y: auto;`}
`;

const StyledHead = styled(Head)<{ isSticky?: boolean }>`
Expand All @@ -65,7 +65,7 @@ const Table = <T extends TableData, K extends keyof T>({
return emptyState || null;
}
return (
<TableWrapper maxHeight={maxHeight} style={style}>
<TableWrapper $maxHeight={maxHeight} style={style}>
<ZendeskTable>
<StyledHead isSticky={isSticky}>
<HeaderRow>
Expand Down
Loading
Loading