Skip to content

RichLinkComponent as an island - #3830

Merged
oliverlloyd merged 11 commits into
mainfrom
oliver/richlinkcomponent-island
Jan 20, 2022
Merged

oliverlloyd merged 11 commits into
mainfrom
oliver/richlinkcomponent-island

Conversation

@oliverlloyd

@oliverlloyd oliverlloyd commented Jan 13, 2022 •

Copy link
Copy Markdown
Contributor

What does this change?

This PR brings the RichLinkComponent over to the island pattern

Why?

To continue the work to remove App.tsx

ajaxUrl

This value was previously only used on the client but it is now needed on the server and, in order to make it available to the code which is rendering this element on the server, it needs to be prop drilled down

@github-actions

github-actions Bot commented Jan 13, 2022 •

Copy link
Copy Markdown

Size Change: -28.3 kB (-1%)

Total Size: 2.59 MB

Filename Size Change
dotcom-rendering/dist/195.js 1.12 kB +7 B (+1%)
dotcom-rendering/dist/195.legacy.js 1.23 kB +7 B (+1%)
dotcom-rendering/dist/272.js 0 B -8.6 kB (removed) 🏆
dotcom-rendering/dist/39.js 0 B -4.05 kB (removed) 🏆
dotcom-rendering/dist/39.legacy.js 0 B -4.21 kB (removed) 🏆
dotcom-rendering/dist/460.legacy.js 0 B -6.75 kB (removed) 🏆
dotcom-rendering/dist/624.js 3.58 kB +6 B (0%)
dotcom-rendering/dist/624.legacy.js 3.71 kB +5 B (0%)
dotcom-rendering/dist/639.legacy.js 4.26 kB -117 B (-3%)
dotcom-rendering/dist/frontend.server.js 1.82 MB +1.61 kB (0%)
dotcom-rendering/dist/guardian-braze-components-banner.js 9.78 kB +204 B (+2%)
dotcom-rendering/dist/guardian-braze-components-banner.legacy.js 9.78 kB +204 B (+2%)
dotcom-rendering/dist/islands.js 7.25 kB +17 B (0%)
dotcom-rendering/dist/islands.legacy.js 8.02 kB +18 B (0%)
dotcom-rendering/dist/OnwardsLower.js 9.72 kB +21 B (0%)
dotcom-rendering/dist/OnwardsLower.legacy.js 9.91 kB +1 B (0%)
dotcom-rendering/dist/OnwardsUpper.js 14.1 kB -2 B (0%)
dotcom-rendering/dist/OnwardsUpper.legacy.js 14.4 kB +27 B (0%)
dotcom-rendering/dist/react.js 136 kB -53 B (0%)
dotcom-rendering/dist/react.legacy.js 141 kB -73 B (0%)
dotcom-rendering/dist/RichLinkComponent.js 0 B -3.26 kB (removed) 🏆
dotcom-rendering/dist/RichLinkComponent.legacy.js 0 B -3.29 kB (removed) 🏆
ℹ️ View Unchanged
Filename Size
dotcom-rendering/dist/126.js 6.65 kB
dotcom-rendering/dist/126.legacy.js 6.72 kB
dotcom-rendering/dist/327.js 4.46 kB
dotcom-rendering/dist/327.legacy.js 4.47 kB
dotcom-rendering/dist/331.js 16.2 kB
dotcom-rendering/dist/331.legacy.js 16.4 kB
dotcom-rendering/dist/343.js 1.63 kB
dotcom-rendering/dist/343.legacy.js 1.71 kB
dotcom-rendering/dist/348.js 4.02 kB
dotcom-rendering/dist/348.legacy.js 4.12 kB
dotcom-rendering/dist/400.js 21.5 kB
dotcom-rendering/dist/400.legacy.js 21.5 kB
dotcom-rendering/dist/440.js 8.72 kB
dotcom-rendering/dist/468.legacy.js 3.09 kB
dotcom-rendering/dist/533.legacy.js 4.38 kB
dotcom-rendering/dist/597.js 5.36 kB
dotcom-rendering/dist/597.legacy.js 5.52 kB
dotcom-rendering/dist/602.js 4 kB
dotcom-rendering/dist/602.legacy.js 4.11 kB
dotcom-rendering/dist/639.js 4.27 kB
dotcom-rendering/dist/665.js 4.08 kB
dotcom-rendering/dist/764.legacy.js 6.88 kB
dotcom-rendering/dist/965.js 2.16 kB
dotcom-rendering/dist/965.legacy.js 2.23 kB
dotcom-rendering/dist/atomIframe.js 1.87 kB
dotcom-rendering/dist/atomIframe.legacy.js 2.14 kB
dotcom-rendering/dist/bootCmp.js 7.39 kB
dotcom-rendering/dist/bootCmp.legacy.js 10.9 kB
dotcom-rendering/dist/braze-web-sdk-core.js 36.1 kB
dotcom-rendering/dist/braze-web-sdk-core.legacy.js 36.1 kB
dotcom-rendering/dist/CalloutBlockComponent.js 4.14 kB
dotcom-rendering/dist/CalloutBlockComponent.legacy.js 4.46 kB
dotcom-rendering/dist/cmp.js 7.51 kB
dotcom-rendering/dist/coreVitals.js 4.03 kB
dotcom-rendering/dist/coreVitals.legacy.js 4.33 kB
dotcom-rendering/dist/DocumentBlockComponent.js 566 B
dotcom-rendering/dist/DocumentBlockComponent.legacy.js 596 B
dotcom-rendering/dist/dynamicImport.js 2.99 kB
dotcom-rendering/dist/dynamicImport.legacy.js 3.29 kB
dotcom-rendering/dist/embedIframe.js 1.88 kB
dotcom-rendering/dist/embedIframe.legacy.js 2.14 kB
dotcom-rendering/dist/ga.js 3.88 kB
dotcom-rendering/dist/ga.legacy.js 4.14 kB
dotcom-rendering/dist/guardian-braze-components-end-of-article.js 6.56 kB
dotcom-rendering/dist/guardian-braze-components-end-of-article.legacy.js 6.57 kB
dotcom-rendering/dist/InteractiveBlockComponent.js 2.95 kB
dotcom-rendering/dist/InteractiveBlockComponent.legacy.js 3.09 kB
dotcom-rendering/dist/InteractiveContentsBlockComponent.js 1.87 kB
dotcom-rendering/dist/InteractiveContentsBlockComponent.legacy.js 1.95 kB
dotcom-rendering/dist/MapEmbedBlockComponent.js 1.87 kB
dotcom-rendering/dist/MapEmbedBlockComponent.legacy.js 1.93 kB
dotcom-rendering/dist/MostViewedFooterData.js 6.27 kB
dotcom-rendering/dist/MostViewedFooterData.legacy.js 6.37 kB
dotcom-rendering/dist/newsletterEmbedIframe.js 1.83 kB
dotcom-rendering/dist/newsletterEmbedIframe.legacy.js 2.1 kB
dotcom-rendering/dist/ophan.js 7.18 kB
dotcom-rendering/dist/ophan.legacy.js 7.38 kB
dotcom-rendering/dist/relativeTime.js 2.41 kB
dotcom-rendering/dist/relativeTime.legacy.js 2.68 kB
dotcom-rendering/dist/sentry.js 676 B
dotcom-rendering/dist/sentry.legacy.js 688 B
dotcom-rendering/dist/sentryLoader.js 4.74 kB
dotcom-rendering/dist/sentryLoader.legacy.js 7.71 kB
dotcom-rendering/dist/shimport.js 2.75 kB
dotcom-rendering/dist/shimport.legacy.js 2.76 kB
dotcom-rendering/dist/SignInGateMain.js 1.82 kB
dotcom-rendering/dist/SignInGateMain.legacy.js 1.85 kB
dotcom-rendering/dist/VideoFacebookBlockComponent.js 1.88 kB
dotcom-rendering/dist/VideoFacebookBlockComponent.legacy.js 1.93 kB
dotcom-rendering/dist/VineBlockComponent.js 575 B
dotcom-rendering/dist/VineBlockComponent.legacy.js 591 B
dotcom-rendering/dist/YoutubeBlockComponent.js 2.57 kB
dotcom-rendering/dist/YoutubeBlockComponent.legacy.js 2.7 kB

compressed-size-action

@oliverlloyd
oliverlloyd marked this pull request as ready for review January 19, 2022 16:32
@oliverlloyd
oliverlloyd marked this pull request as draft January 19, 2022 16:33
@jamesgorrie

Copy link
Copy Markdown
Contributor

part of #3629

@oliverlloyd
oliverlloyd marked this pull request as ready for review January 20, 2022 10:37
if (error) {
// Send the error to Sentry
window.guardian.modules.sentry.reportError(error, 'rich-link');
window?.guardian?.modules?.sentry?.reportError(error, 'rich-link');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@OllysCoding OllysCoding left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 Lots of prop drilling but unavoidable! Looks good :)

@oliverlloyd
oliverlloyd merged commit cb03e30 into main Jan 20, 2022
@oliverlloyd
oliverlloyd deleted the oliver/richlinkcomponent-island branch January 20, 2022 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants