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

Fix issue when analytics not being sent when href prop used #2612

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

cpoftea
Copy link
Contributor

@cpoftea cpoftea commented Nov 5, 2024

Description:

Fixed issue when clickAnalyticsEvent not being sent when href prop used at components, that uses inner Clickable component: Tag, Badge, Anchor, TabButton, MainMenuButton, Button, LinkButton, IconButton.

Issue link:

Closes #2611

QA notes:

Honestly, I don't like the idea to mock entire React.useContext, especially when it is required to mock more API than is actually to be tested. There's an option to mock just jest.spyOn(AnalyticsContext.prototype, 'sendEvent') in updated test cases instead.

@cpoftea cpoftea force-pushed the fix/clickable-analytics-event branch from 017208a to e717a48 Compare November 5, 2024 21:37
Copy link

github-actions bot commented Nov 5, 2024

Generated by: track-bundle-size
Generated at: Wed, 06 Nov 2024 13:07:40 GMT
Bundle size diff (in kBytes). Not gzipped. Both CSS & JS included.
Baseline: v5.10.0 (2024-10-15)
CI Status: ok

Module Baseline Size
(v5.10.0)
Size Diff Within
Threshold
Threshold
(min - max)
templateApp 760.53 765.99 +5.45
js:+3.92
css:+1.53
🆗 684.48 - 836.59
@epam/app 5578.86 5630.42 +51.55
js:+5.53
css:+46.02
🆗 5020.98 - 6136.75
@epam/draft-rte 53.77 53.77 +0.01
js:+0
css:+0
🆗 48.39 - 59.15
@epam/electric 4.57 4.59 +0.01
js:+0
css:+0.01
🆗 4.12 - 5.03
@epam/promo 57.15 57.43 +0.28
js:0
css:+0.28
🆗 51.44 - 62.87
@epam/uui-extra 0.21 0.21 0
js:0
css:0
🆗 0.19 - 0.23
@epam/loveship 93.74 94.05 +0.31
js:+0
css:+0.31
🆗 84.36 - 103.11
@epam/uui-components 263.21 264.16 +0.95
js:+0.95
css:0
🆗 236.89 - 289.54
@epam/uui-core 337.45 337.82 +0.37
js:+0.37
css:0
🆗 303.7 - 371.19
@epam/uui-db 44.7 44.7 0
js:0
css:0
🆗 40.23 - 49.17
@epam/uui-docs 207.12 207.12 0
js:0
css:0
🆗 186.41 - 227.83
@epam/uui-editor 183.61 184.36 +0.75
js:+0.74
css:+0.01
🆗 165.25 - 201.97
@epam/uui-timeline 79.51 80.98 +1.46
js:+1.47
css:0
🆗 71.56 - 87.46
@epam/uui 606.81 608.91 +2.1
js:+0.76
css:+1.34
🆗 546.13 - 667.49
new sizes (raw)

To set the sizes as a new baseline, you can copy/paste next content to the uui-build/config/bundleSizeBaseLine.json and commit the file.

{
  "version": "5.11.0-rc.0",
  "timestamp": "2024-11-06",
  "sizes": {
    "templateApp": {
      "css": 301607,
      "js": 482760
    },
    "@epam/app": {
      "css": 726093,
      "js": 5039449
    },
    "@epam/draft-rte": {
      "css": 9773,
      "js": 45296
    },
    "@epam/electric": {
      "css": 2289,
      "js": 2409
    },
    "@epam/promo": {
      "css": 47916,
      "js": 10894
    },
    "@epam/uui-extra": {
      "css": 0,
      "js": 213
    },
    "@epam/loveship": {
      "css": 53755,
      "js": 42551
    },
    "@epam/uui-components": {
      "css": 22527,
      "js": 247972
    },
    "@epam/uui-core": {
      "css": 0,
      "js": 345926
    },
    "@epam/uui-db": {
      "css": 0,
      "js": 45769
    },
    "@epam/uui-docs": {
      "css": 2448,
      "js": 209640
    },
    "@epam/uui-editor": {
      "css": 12748,
      "js": 176037
    },
    "@epam/uui-timeline": {
      "css": 2254,
      "js": 80667
    },
    "@epam/uui": {
      "css": 279145,
      "js": 344378
    }
  }
}

Generated by: generate-components-api
CI Status: ok

Total amount of exported types/props without JSDoc comments

Amount
Types 300 (+0) 🆗
Props 233 (+0) 🆗

@cpoftea cpoftea force-pushed the fix/clickable-analytics-event branch from e717a48 to f84f9b8 Compare November 6, 2024 13:01
@AlekseyManetov AlekseyManetov merged commit f398eb0 into epam:develop Nov 8, 2024
3 checks passed
@cpoftea cpoftea deleted the fix/clickable-analytics-event branch November 8, 2024 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants