guardian / guardian/dotcom-rendering
Drop `elementId`
- Dominant language
- TypeScript
- Stars
- 274
- Forks
- 34
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 121
Description
## Why
This prevents DCR being a pure function, which impacts caching, as noted by @davidfurey.
## What
We may no longer have the requirements that required its introduction.
Current usages:
- [`YoutubeAtom`’s `uniqueId`](https://github.com/guardian/dotcom-rendering/blob/023c41c1a17b134652b928b9a96410e9400f8e04/dotcom-rendering/src/components/YoutubeAtom/YoutubeAtom.tsx#L78)
- [`openLightboxForImageId`](https://github.com/guardian/dotcom-rendering/blob/2d099c496cc2c4cdf67b67d590917e4d7a0585ac/dotcom-rendering/src/components/AppsLightboxImageStore.importable.tsx#L10-L13)
- [`InteractiveBlockComponent`’s id & boot script](https://github.com/guardian/dotcom-rendering/blob/2d099c496cc2c4cdf67b67d590917e4d7a0585ac/dotcom-rendering/src/components/InteractiveBlockComponent.importable.tsx#L239)
- [`InteractiveContentsBlockComponent`](https://github.com/guardian/dotcom-rendering/blob/c796e2300d2170924659dd9251201b3b00ef8723/dotcom-rendering/src/components/InteractiveContentsBlockComponent.importable.tsx#L311)
- [`LightboxLink`](https://github.com/guardian/dotcom-rendering/blob/2d099c496cc2c4cdf67b67d590917e4d7a0585ac/dotcom-rendering/src/components/LightboxLink.tsx#L112) & [`LightboxImages`](https://github.com/guardian/dotcom-rendering/blob/2d099c496cc2c4cdf67b67d590917e4d7a0585ac/dotcom-rendering/src/components/LightboxImages.tsx#L201) use `data-element-id`
- [`loadTweet`](https://github.com/guardian/dotcom-rendering/blob/2d099c496cc2c4cdf67b67d590917e4d7a0585ac/dotcom-rendering/src/components/TweetBlockComponent.importable.tsx#L48-L53)
- [`FullPageInteractiveLayout`](https://github.com/guardian/dotcom-rendering/blob/2d099c496cc2c4cdf67b67d590917e4d7a0585ac/dotcom-rendering/src/layouts/FullPageInteractiveLayout.tsx#L99-L103) uses it as an ``
- [`renderElement`](https://github.com/guardian/dotcom-rendering/blob/2d099c496cc2c4cdf67b67d590917e4d7a0585ac/dotcom-rendering/src/lib/renderElement.tsx)
- enhancers
## More
Related to the work being done in:
- #10154
Contributor guide
Assessment
This issue has not been assessed yet.