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

chore: remove Intercom widget #945

Merged
merged 4 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions apps/ui/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script setup lang="ts">
import defaultRoutes from '@/routes/default';
import whiteLabelRoutes from '@/routes/whiteLabel';
import { startIntercom } from './helpers/intercom';

const route = useRoute();
const router = useRouter();
Expand Down Expand Up @@ -31,7 +30,6 @@ watch(
resolved => {
if (!resolved) return;

if (!isWhiteLabel.value) startIntercom();
if (isCustomDomain.value && !whiteLabelFailed.value) {
mountCustomDomainRoutes();
}
Expand All @@ -48,4 +46,5 @@ onMounted(() => {
<LayoutSplashScreen v-if="!whiteLabelResolved" />
<LayoutSite v-else-if="routeName === 'site'" />
<LayoutApp v-else />
<Messenger />
wa0x6e marked this conversation as resolved.
Show resolved Hide resolved
</template>
13 changes: 13 additions & 0 deletions apps/ui/src/components/Messenger.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<script setup lang="ts">
import { HELPDESK_URL } from '@/helpers/constants';
</script>

<template>
<a
:href="HELPDESK_URL"
target="_blank"
class="hidden md:block fixed bottom-4 right-4 rounded-full bg-skin-link text-skin-bg p-2"
>
<IS-chat class="inline-block size-[32px]" />
</a>
</template>
5 changes: 3 additions & 2 deletions apps/ui/src/components/Site/Footer.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { HELPDESK_URL } from '@/helpers/constants';
import { repository, version } from '@/../package.json';
import ICDiscord from '~icons/c/discord';
import ICGithub from '~icons/c/github';
Expand Down Expand Up @@ -50,7 +51,7 @@ const SOCIALS = [
<div class="eyebrow">Resources</div>
<div class="space-y-1">
<div>
<a href="https://help.snapshot.box" target="_blank">
<a :href="HELPDESK_URL" target="_blank">
Helpdesk <IH-arrow-sm-right class="inline-block -rotate-45" />
</a>
</div>
Expand Down Expand Up @@ -106,7 +107,7 @@ const SOCIALS = [
<AppLink :to="{ name: 'site-policy' }">Privacy policy</AppLink>
</div>
<div>
<a class="intercom-launcher" target="_blank"> Contact us </a>
<a :href="HELPDESK_URL" target="_blank">Contact us</a>
</div>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions apps/ui/src/helpers/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export const APP_NAME = 'Snapshot';

export const SIDEKICK_URL = 'https://sh5.co';

export const HELPDESK_URL = 'https://help.snapshot.box';

export const ETH_CONTRACT = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee';

export const CHAIN_IDS: Record<Exclude<NetworkID, 's' | 's-tn'>, ChainId> = {
Expand Down
41 changes: 0 additions & 41 deletions apps/ui/src/helpers/intercom.ts

This file was deleted.

8 changes: 4 additions & 4 deletions apps/ui/src/networks/evm/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { AbiCoder } from '@ethersproject/abi';
import { Web3Provider } from '@ethersproject/providers';
import { StandardMerkleTree } from '@openzeppelin/merkle-tree';
import { clients, evmNetworks } from '@snapshot-labs/sx';
import { MAX_SYMBOL_LENGTH } from '@/helpers/constants';
import { HELPDESK_URL, MAX_SYMBOL_LENGTH } from '@/helpers/constants';
import { pinGraph } from '@/helpers/pin';
import { getUrl, shorten } from '@/helpers/utils';
import { NetworkID, StrategyParsedMetadata, VoteType } from '@/types';
Expand Down Expand Up @@ -167,7 +167,7 @@ export function createConstants(networkId: NetworkID) {
name: 'Vanilla',
about:
'A strategy that gives one voting power to anyone. It should only be used for testing purposes and not in production.',
link: 'https://help.snapshot.box/en/articles/9839150-vanilla-voting-strategy',
link: `${HELPDESK_URL}/en/articles/9839150-vanilla-voting-strategy`,
icon: IHBeaker,
generateMetadata: async (params: Record<string, any>) => ({
name: 'Vanilla',
Expand Down Expand Up @@ -207,7 +207,7 @@ export function createConstants(networkId: NetworkID) {
name: 'Whitelist',
about:
'A strategy that defines a list of addresses each with designated voting power, using a Merkle tree for verification.',
link: 'https://help.snapshot.box/en/articles/9839118-whitelist-voting-strategy',
link: `${HELPDESK_URL}/en/articles/9839118-whitelist-voting-strategy`,
generateSummary: (params: Record<string, any>) => {
const length =
params.whitelist.trim().length === 0
Expand Down Expand Up @@ -308,7 +308,7 @@ export function createConstants(networkId: NetworkID) {
name: 'ERC-20 Votes (EIP-5805)',
about:
'A strategy that allows delegated balances of OpenZeppelin style checkpoint tokens to be used as voting power.',
link: 'https://help.snapshot.box/en/articles/9839125-erc-20-votes-eip-5805-voting-strategy',
link: `${HELPDESK_URL}/en/articles/9839125-erc-20-votes-eip-5805-voting-strategy`,
icon: IHCode,
generateSummary: (params: Record<string, any>) =>
`(${shorten(params.contractAddress)}, ${params.decimals})`,
Expand Down
10 changes: 5 additions & 5 deletions apps/ui/src/networks/starknet/constants.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Web3Provider } from '@ethersproject/providers';
import { clients, starknetNetworks, utils } from '@snapshot-labs/sx';
import { CallData, uint256 } from 'starknet';
import { MAX_SYMBOL_LENGTH } from '@/helpers/constants';
import { HELPDESK_URL, MAX_SYMBOL_LENGTH } from '@/helpers/constants';
import { pinPineapple } from '@/helpers/pin';
import { getUrl, shorten, verifyNetwork } from '@/helpers/utils';
import { NetworkID, StrategyParsedMetadata, VoteType } from '@/types';
Expand Down Expand Up @@ -267,7 +267,7 @@ export function createConstants(
name: 'Whitelist',
about:
'A strategy that defines a list of addresses each with designated voting power, using a Merkle tree for verification.',
link: 'https://help.snapshot.box/en/articles/9839118-whitelist-voting-strategy',
link: `${HELPDESK_URL}/en/articles/9839118-whitelist-voting-strategy`,
generateSummary: (params: Record<string, any>) => {
const length =
params.whitelist.trim().length === 0
Expand Down Expand Up @@ -375,7 +375,7 @@ export function createConstants(
name: 'ERC-20 Votes (EIP-5805)',
about:
'A strategy that allows delegated balances of OpenZeppelin style checkpoint tokens to be used as voting power.',
link: 'https://help.snapshot.box/en/articles/9839125-erc-20-votes-eip-5805-voting-strategy',
link: `${HELPDESK_URL}/en/articles/9839125-erc-20-votes-eip-5805-voting-strategy`,
icon: IHCode,
generateSummary: (params: Record<string, any>) =>
`(${shorten(params.contractAddress)}, ${params.decimals})`,
Expand Down Expand Up @@ -432,7 +432,7 @@ export function createConstants(
config.Strategies.EVMSlotValue,
'EVM slot value',
'A strategy that allows to use the value of an slot on EVM chain (for example ERC-20 balance on L1) as voting power.',
'https://help.snapshot.box/en/articles/9839132-evm-slot-value-voting-strategy'
`${HELPDESK_URL}/en/articles/9839132-evm-slot-value-voting-strategy`
)
]
: []),
Expand All @@ -442,7 +442,7 @@ export function createConstants(
config.Strategies.OZVotesStorageProof,
'OZ Votes storage proof (trace 224)',
'A strategy that allows to use the value of an slot on EVM chain (for example ERC-20 balance on L1) as voting power including delegated balances (trace 224 format).',
'https://help.snapshot.box/en/articles/9839152-oz-votes-storage-proof-voting-strategy'
`${HELPDESK_URL}/en/articles/9839152-oz-votes-storage-proof-voting-strategy`
)
]
: []),
Expand Down
7 changes: 0 additions & 7 deletions apps/ui/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -409,13 +409,6 @@ input:placeholder-shown {
}
}

// Intercom
// Hide the launcher button on small screen

div.intercom-launcher {
@apply hidden md:block
}

// tippy.js
// Fix for long text in tippy.js
div[data-tippy-root] {
Expand Down
3 changes: 0 additions & 3 deletions apps/ui/src/views/Policy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ For further information on the purpose and scope of the data processing of Twitt
## Newsletters
If you subscribe to our newsletter, we process the information provided by you (e.g. contact details) in order to provide you with our newsletter. You may cancel your subscription at any time by using the option to unsubscribe contained in the newsletter or by sending us an email to the address mentioned above.

## Cookies
We use cookies to operate and optimise our website (see also “Tracking Tools” below). These are text files that are stored on your computer and enable the analysis of the use of our website. You can configure your browser in such a way that no cookies are stored on your computer or a message always appears before a cookie is installed. For further information or to change your cookies settings, please check out our Cookie Consent Management Tool. Complete deactivation of cookies may result in our website not functioning or not functioning completely.

## Links to third-party offerings
Our website may contain third-party offerings. Please note that when you use such link, your data such as IP address, personal browser settings etc., are transmitted to these third parties. We have no control over, do not review and cannot be responsible for these third-party websites or their content. Please be aware that the terms of this Privacy Notice do not apply to these third-party websites or their content, or any collection of your data after you click on links to such third-party websites. We encourage you to read the privacy policies of every website you visit. Any links to third-party websites or locations are for your convenience and do not signify our endorsement of such third parties or their products, content, or websites.

Expand Down
3 changes: 2 additions & 1 deletion apps/ui/src/views/Proposal.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import { HELPDESK_URL } from '@/helpers/constants';
import { loadSingleTopic, Topic } from '@/helpers/discourse';
import { getFormattedVotingPower, sanitizeUrl } from '@/helpers/utils';
import { Choice, Space } from '@/types';
Expand Down Expand Up @@ -264,7 +265,7 @@ watchEffect(() => {
votingPower?.status === 'success' &&
votingPower.totalVotingPower === BigInt(0)
"
href="https://help.snapshot.box/en/articles/9566904-why-do-i-have-0-voting-power"
:href="`${HELPDESK_URL}/en/articles/9566904-why-do-i-have-0-voting-power`"
target="_blank"
>
<IH-question-mark-circle />
Expand Down
2 changes: 1 addition & 1 deletion apps/ui/src/views/Terms.vue
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ You agree to promptly notify the Foundation of any Claims and cooperate with the

## 15. Privacy notice and cookie declaration
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe also remove the cookie reference in the title, or add something in the body that says we don't track cookies


Please refer to our Privacy Notice to understand how we collect and use and disclose your personal data as well as our Cookie Declaration to understand how we use cookies and how you can change your consent to their use.
Please refer to our Privacy Notice to understand how we collect and use and disclose your personal data.

## 16. Miscellaneous

Expand Down
Loading