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

WSTEAMA-1412: Add Reverb dependency as the transpiled version #12189

Open
wants to merge 67 commits into
base: latest
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
1af2a31
Add reverb as a dependency
karinathomasbbc Oct 23, 2024
881309c
use git+ssh syntax
karinathomasbbc Oct 23, 2024
d8d342b
Following guidelines in https://github.com/bbc/delivery-engineering/t…
karinathomasbbc Oct 23, 2024
50f1608
Following guidelines in https://github.com/bbc/delivery-engineering/t…
karinathomasbbc Oct 23, 2024
ecf0f23
TEMP: don't check package manager; remove winston as npm does not sup…
karinathomasbbc Oct 23, 2024
8cf70ff
Adding GITHUB_TOKEN to builds which install node modules
karinathomasbbc Oct 23, 2024
f4eb63c
Use git+ssh syntax
karinathomasbbc Oct 23, 2024
d7c72fb
Revert "TEMP: don't check package manager; remove winston as npm does…
karinathomasbbc Oct 23, 2024
5dcb396
Use github instead of github+ssh syntax
karinathomasbbc Oct 28, 2024
2fe6d28
Update bbc/reverb reference
alex-magana Oct 30, 2024
edbba63
Change reference
alex-magana Oct 30, 2024
21134ea
Add flag
alex-magana Oct 30, 2024
bdc6cba
Revert flag
alex-magana Oct 30, 2024
e54735f
Change reverb reference
alex-magana Oct 31, 2024
a56a4f3
Remove Reverb from cache and lock file
alex-magana Nov 5, 2024
5617923
Update Reverb reference to match Webcore
alex-magana Nov 12, 2024
a7cfef2
Serve compiled Reverb code
alex-magana Nov 18, 2024
164e389
Use correct reference for smart tag
alex-magana Nov 19, 2024
443d632
Add reverb loading boilerplate code
alex-magana Nov 20, 2024
0bce537
Disable withReverb in applyBasicPageHandlers
alex-magana Nov 21, 2024
f64a497
Fire page view event via Reverb
alex-magana Nov 22, 2024
76f28ad
Use static Reverb in sendBeacon module
alex-magana Nov 25, 2024
ea302c5
Add click tracking for MostRead
alex-magana Nov 25, 2024
d5ff79d
Remove sample Reverb data
alex-magana Nov 26, 2024
b144379
Add view tracking support
alex-magana Nov 26, 2024
5529207
Enable Top Stories view tracking
alex-magana Nov 26, 2024
dba7875
Add click tracking for Top Stories
alex-magana Nov 26, 2024
d91a4fc
Enable click and view tracking for Feature Analysis component
alex-magana Nov 26, 2024
fd66f0c
Revert setting GITHUB_TOKEN in workflow config
alex-magana Nov 26, 2024
75fd19e
Remove reverb from package.json
alex-magana Nov 26, 2024
06460e8
Remove local compiled versions of reverb in favour of mybbc-analytics…
alex-magana Nov 26, 2024
84aa432
Delete the withReverb page handler
alex-magana Nov 26, 2024
5e20221
Invoke event functions if reverb is ready
alex-magana Dec 5, 2024
4d15f30
Fix return linting error
alex-magana Dec 5, 2024
068f6b0
Make the reverb static script non-blocking
alex-magana Dec 5, 2024
1d1e1ba
To be reverted - make atiAnalyticsProducerName optional
alex-magana Dec 9, 2024
736a246
Merge pull request #12226 from bbc/WSTEAMA-1482-optimise-reverb-initi…
alex-magana Dec 10, 2024
ca43537
Merge branch 'latest' into reverb-dependency-minified
alex-magana Dec 10, 2024
6f86298
Merge branch 'latest' into reverb-dependency-minified
alex-magana Dec 16, 2024
47cde59
adds producer name value for afaanoromoo
louisearchibald Dec 17, 2024
109b613
correct name
louisearchibald Dec 17, 2024
974f998
adds producer name value for afrique amharic arabic archive and azeri
louisearchibald Dec 17, 2024
71b8703
add producer name to config for bengali burmese cymrufyw gahuza gujar…
louisearchibald Dec 18, 2024
b3a2931
update config for hindi igbo indonesia japanese and korean
louisearchibald Dec 18, 2024
91e38e1
update kyrgyz marathi mundo naidheachdan & nepali
louisearchibald Dec 18, 2024
99570ed
update config for news newsround pashto pidgin & portuguese
louisearchibald Dec 18, 2024
721cc0c
update service config for punjabi russian scotland serbian & sinhala
louisearchibald Dec 18, 2024
92addb7
update service config for somali sport swahili tamil & telugu
louisearchibald Dec 18, 2024
078e69f
update service config for thai tigrinya turkce ukchina & ukrainian
louisearchibald Dec 18, 2024
c18fb40
update service config for urdu uzbek vietnamese ws yoruba & zhongwen
louisearchibald Dec 18, 2024
a45c784
Remove useReverb prop from ATIAnalytics component
alex-magana Dec 19, 2024
f0c28b2
Remove useReverb prop from the MostRead component
alex-magana Dec 20, 2024
3e46f44
Remove useReverb prop from Top Stories component
alex-magana Dec 23, 2024
5a008d4
Remove useReverb prop from the FeaturesAnalysis component
alex-magana Dec 23, 2024
21122ae
Merge branch 'latest' into reverb-dependency-minified
alex-magana Dec 23, 2024
1c68e74
Merge pull request #12244 from bbc/WSTEAMA-1508-adds-producerName-to-…
alex-magana Jan 2, 2025
d98957c
Merge pull request #12253 from bbc/WSTEAMA-1496-enable-reverb-service…
alex-magana Jan 2, 2025
7e19f85
Add producerName to config generation assertions
alex-magana Jan 2, 2025
f68a76b
Fix ATIAnalytics and EventTrackingContext ATI tests assertions
alex-magana Jan 3, 2025
37f57da
Update PageLayoutWrapper copyright text
alex-magana Jan 3, 2025
547e8f7
Add Reverb boilerplate to the CanonicalRenderer snapshot
alex-magana Jan 3, 2025
f5ea110
Add producer name to snapshot
alex-magana Jan 6, 2025
55035ad
Merge branch 'latest' into reverb-dependency-minified
alex-magana Jan 6, 2025
28465d9
Merge branch 'latest' into reverb-dependency-minified
eagerterrier Jan 6, 2025
9e013d7
Update snapshots to reflect 2025 in the page copyright
alex-magana Jan 6, 2025
78e8dfb
Merge branch 'reverb-dependency-minified' of github.com:bbc/simorgh i…
alex-magana Jan 6, 2025
4216516
WSTEAMA-1484 - Reverb unit tests (#12265)
amoore108 Jan 9, 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
1 change: 1 addition & 0 deletions .github/workflows/simorgh-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
env:
CI: true
LOG_LEVEL: 'error'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/simorgh-local-server-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
LOG_LEVEL: 'error'
BFF_PATH: 'https://web-cdn.test.api.bbci.co.uk/fd/simorgh-bff'
LIGHTHOUSE_BUILD: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/simorgh-misc-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
node-version: [18.x]
env:
CI: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/simorgh-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
LOG_LEVEL: 'error'
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
GIT_COMMIT_SHA: ${{ github.sha }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
},
"homepage": "https://github.com/bbc/simorgh#readme",
"dependencies": {
"@bbc/reverb": "github:bbc/reverb#3.9.2",
"@bbc/web-vitals": "1.2.0",
"@emotion/cache": "11.11.0",
"@emotion/react": "11.11.4",
Expand Down
1 change: 1 addition & 0 deletions public/static/js/reverb/reverb-3.9.2.js

Large diffs are not rendered by default.

151 changes: 151 additions & 0 deletions public/static/js/reverb/smarttag-5.29.4.min.js

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions src/app/legacy/containers/PageHandlers/withReverb/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import React from 'react';
import { Helmet } from 'react-helmet';

const SCRIPT_SRC_REVERB =
'http://localhost:7080/static/js/reverb/reverb-3.9.2.js';
const SCRIPT_SRC_SMART_TAG =
'http://localhost:7080/static/js/reverb/reverb-3.9.2.js';

const buildScript = () => (
<Helmet>
<script src={SCRIPT_SRC_REVERB} />
<script src={SCRIPT_SRC_SMART_TAG} />
</Helmet>
);

const ReverbLoader = Component => {
const withReverb = props => {
const ComponentWithReverb = () => {
const scriptElements = buildScript();

return (
<>
{scriptElements}
<Component {...props} />
</>
);
};

return <ComponentWithReverb />;
};

return withReverb;
};

export default ReverbLoader;
2 changes: 2 additions & 0 deletions src/app/pages/utils/applyBasicPageHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import withPageWrapper from '#containers/PageHandlers/withPageWrapper';
import withError from '#containers/PageHandlers/withError';
import withData from '#containers/PageHandlers/withData';
import withHashChangeHandler from '#containers/PageHandlers/withHashChangeHandler';
import withReverb from '#containers/PageHandlers/withReverb';

export default (
component,
Expand All @@ -16,4 +17,5 @@ export default (
handlerBeforeContexts,
withContexts,
withHashChangeHandler,
withReverb,
)(component);
19 changes: 19 additions & 0 deletions src/server/local/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,25 @@ export default server => {
);
sendDataFile(res, localComscorePath, next);
})
.get('/static/js/reverb/reverb-:version.js', ({ params }, res, next) => {
const { version } = params;
const localReverbPath = path.join(
process.cwd(),
`/public/static/js/reverb/reverb-${version}.js`,
);
sendDataFile(res, localReverbPath, next);
})
.get(
'/static/js/reverb/smarttag-:version.min.js',
({ params }, res, next) => {
const { version } = params;
const localSmartTagPath = path.join(
process.cwd(),
`/public/static/js/reverb/smarttag-${version}.min.js`,
);
sendDataFile(res, localSmartTagPath, next);
},
)
.get('/ckns_policy/*', (req, res) => {
// Route to allow the cookie banner to make the cookie oven request
// without throwing an error due to not being on a bbc domain.
Expand Down
Loading