Skip to content

Add support for connection mode overrides in dossier #2236

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

Merged
merged 1 commit into from
Dec 2, 2021
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
10 changes: 10 additions & 0 deletions src/_data/catalog/overrides.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# This file is manually generated. When you add or remove an item, add or remove
# it from the `overrides-list.yml` too.
items:
- slug: intercom
connection_modes:
device:
web: true
mobile: false
server: false
cloud:
web: false
mobile: true
server: true
- slug: hubspot
display_name: HubSpot
previous_names:
Expand Down
15 changes: 12 additions & 3 deletions src/_includes/content/destination-dossier.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<!-- in the file we're pulling from the API, "name" corresponds with the path to the yml blob for a specific destination.-->
{% assign thisDestination = page.url | split: "/" | last %}

{% assign overrideInfo = site.data.catalog.overrides.items % | where: "slug", thisDestination | first %}



{% assign destinationInfo = site.data.catalog.destinations.items | where: "slug", thisDestination | first %}
{% comment %}There are probably prettier ways to generate a list of links to these methods, but this was good enough for me.{% endcomment %}
{% assign destMethods = "" | split: ", " %}
Expand All @@ -12,14 +17,18 @@
{% assign methodHTML = methodUrl | append: methodName %}
{% assign methodHTML = methodHTML | append: '</a>' %}
{% assign destMethods = destMethods | push: methodHTML %} {%endif%}

{% if page.cmode-override %}
{% assign connectionModes = overrideInfo.connection_modes %}
{% else %}
{% assign connectionModes = destinationInfo.connection_modes %}
{% endif %}

{% assign components = destinationInfo.components %}
{% endfor %}
{% assign destMethods = destMethods| reverse %}

{% if page.cmode-override %}
{% assign destinationInfo = site.data.catalog.overrides.items % | where: "slug", thisDestination | first %}
{% endif %}



<div class="quick-info">
Expand Down
1 change: 1 addition & 0 deletions src/connections/destinations/catalog/intercom/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Intercom Destination
hide-cmodes: true
hide-personas-partial: true
cmode-override: true
---

[Intercom](https://www.intercom.com/) makes customer messaging apps for sales, marketing, and support, connected on one platform. The Intercom Destination is open-source. You can browse the code for [analytics.js](https://github.com/segment-integrations/analytics.js-integration-intercom), [iOS](https://github.com/segment-integrations/analytics-ios-integration-intercom) and [Android](https://github.com/segment-integrations/analytics-android-integration-intercom) on GitHub.
Expand Down