-
Notifications
You must be signed in to change notification settings - Fork 7
AB#668532 - feat: Implement Dianomi Sponsor Module #183
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
Open
AhmedLukmanTR
wants to merge
4
commits into
main
Choose a base branch
from
feat/dianomi-sponsor-module
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
ff5f1f3
feat: Implement Dianomi Sponsor Module
AhmedLukmanTR 9290663
feat: Export DianomiAd component for future import
AhmedLukmanTR dd0820f
fix: Iframe ad not showing since when script loads, div not targeted
AhmedLukmanTR 8d48bec
docs: Add dianomi ad story
AhmedLukmanTR File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| {"generatedAt":1727177987669,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"testPackages":{},"packageManager":{"type":"npm","version":"10.8.2"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/svelte-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/svelte","storybookVersion":"8.2.9","storybookVersionSpecifier":"^8.2.9","language":"typescript","storybookPackages":{"@storybook/addon-essentials":{"version":"8.2.9"},"@storybook/addon-mdx-gfm":{"version":"8.2.9"},"@storybook/blocks":{"version":"8.2.9"},"@storybook/builder-vite":{"version":"8.2.9"},"@storybook/components":{"version":"8.2.9"},"@storybook/manager-api":{"version":"8.2.9"},"@storybook/mdx2-csf":{"version":"1.1.0"},"@storybook/svelte":{"version":"8.2.9"},"@storybook/svelte-vite":{"version":"8.2.9"},"@storybook/test":{"version":"8.2.9"},"@storybook/theming":{"version":"8.2.9"},"storybook":{"version":"8.2.9"}},"addons":{"@storybook/addon-svelte-csf":{"version":"4.1.5"},"@storybook/addon-links":{"version":"8.2.9"},"@storybook/addon-actions":{"version":"8.2.9"},"@storybook/addon-viewport":{"version":"8.2.9"},"@storybook/addon-docs":{"version":"8.2.9"},"@storybook/addon-controls":{"version":"8.2.9"},"@storybook/addon-backgrounds":{"version":"8.2.9"},"@storybook/addon-toolbars":{"version":"8.2.9"},"@storybook/addon-measure":{"version":"8.2.9"},"@storybook/addon-outline":{"version":"8.2.9"},"@storybook/addon-interactions":{"version":"8.2.9"},"@chromatic-com/storybook":{"version":"1.7.0"},"chromatic":{"version":null,"versionSpecifier":"^7.1.0"}}} | ||
| {"generatedAt":1729247024480,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"testPackages":{},"packageManager":{"type":"npm","version":"10.8.3"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/svelte-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/svelte","storybookVersion":"8.2.9","storybookVersionSpecifier":"^8.2.9","language":"typescript","storybookPackages":{"@storybook/addon-essentials":{"version":"8.2.9"},"@storybook/addon-mdx-gfm":{"version":"8.2.9"},"@storybook/blocks":{"version":"8.2.9"},"@storybook/builder-vite":{"version":"8.2.9"},"@storybook/components":{"version":"8.2.9"},"@storybook/manager-api":{"version":"8.2.9"},"@storybook/mdx2-csf":{"version":"1.1.0"},"@storybook/svelte":{"version":"8.2.9"},"@storybook/svelte-vite":{"version":"8.2.9"},"@storybook/test":{"version":"8.2.9"},"@storybook/theming":{"version":"8.2.9"},"storybook":{"version":"8.2.9"}},"addons":{"@storybook/addon-svelte-csf":{"version":"4.1.5"},"@storybook/addon-links":{"version":"8.2.9"},"@storybook/addon-actions":{"version":"8.2.9"},"@storybook/addon-viewport":{"version":"8.2.9"},"@storybook/addon-docs":{"version":"8.2.9"},"@storybook/addon-controls":{"version":"8.2.9"},"@storybook/addon-backgrounds":{"version":"8.2.9"},"@storybook/addon-toolbars":{"version":"8.2.9"},"@storybook/addon-measure":{"version":"8.2.9"},"@storybook/addon-outline":{"version":"8.2.9"},"@storybook/addon-interactions":{"version":"8.2.9"},"@chromatic-com/storybook":{"version":"1.7.0"},"chromatic":{"version":null,"versionSpecifier":"^7.1.0"}}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <script lang="ts"> | ||
| import { Story, Meta } from '@storybook/addon-svelte-csf'; | ||
|
|
||
| // @ts-ignore raw | ||
| import adDocs from './stories/docs/dianomi.md?raw'; | ||
|
|
||
| import DianomiAd from './DianomiAd.svelte'; | ||
|
|
||
| import { withComponentDocs } from '$lib/docs/utils/withParams.js'; | ||
|
|
||
| const meta = { | ||
| ...withComponentDocs(adDocs), | ||
| }; | ||
| </script> | ||
|
|
||
| <Meta title="Components/DianomiAd" component="{DianomiAd}" {...meta} /> | ||
|
|
||
| <Story name="Default"> | ||
| <DianomiAd /> | ||
| </Story> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <script> | ||
| import { onMount } from 'svelte'; | ||
| onMount(() => { | ||
| const script = document.createElement('script'); | ||
| script.src = 'https://www.dianomi.com/js/contextfeed.js'; | ||
| script.id = 'dianomi_context_script'; | ||
| document.head.appendChild(script); | ||
| }); | ||
| </script> | ||
|
|
||
| <div class="dianomi_context" data-dianomi-context-id="1948"></div> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| Add a dianomi ad to your page. | ||
|
|
||
| Dianomi sponsor module appears above the footer on Graphics pages in the same placement using the same tag as Topic pages. | ||
|
|
||
| > **IMPORTANT!** Make sure ads are only used on dotcom pages, never on embeds. | ||
|
|
||
| ```svelte | ||
| <!-- App.svelte --> | ||
| <script> | ||
| import { DianomiAd } from '@reuters-graphics/graphics-components'; | ||
|
|
||
| export let embedded = false; | ||
| </script> | ||
|
|
||
| <!-- Check if in an embed context! --> | ||
| {#if !embedded} | ||
| <DianomiAd /> | ||
| {/if} | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this display any visual content? If so, how does that interplay with our existing ad components?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it does display the Dianomi sponsorship ads. Please expound on what you meant by interplaying with the existing ad components.