Skip to content

Commit 5a46861

Browse files
authored
make cmodes tables consume overrides (#1624)
1 parent 95e4ddc commit 5a46861

File tree

5 files changed

+36
-8
lines changed

5 files changed

+36
-8
lines changed

src/_data/catalog/overrides-list.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
items:
2+
- hubspot
3+
- iterable

src/_data/catalog/overrides.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is manually generated. When you add or remove an item, add or remove
2+
# it from the `overrides-list.yml` too.
13
items:
24
- slug: hubspot
35
components:
@@ -13,7 +15,7 @@ items:
1315
mobile: true
1416
server: true
1517
summary: >-
16-
accepts data from any Segment mobile or server source in cloud mode.
18+
accepts data from any Segment mobile or server source in cloud mode.
1719
It does not accept data from a web source, and does not offer device-mode connections.
1820
cmode_type: mixed
1921
case: '6'
@@ -33,4 +35,4 @@ items:
3335
summary: >-
3436
accepts cloud-mode data from all Segment source types. It does not offer device-mode connections.
3537
cmode_type: mixed
36-
case: '5'
38+
case: '5'

src/connections/destinations/category-compare.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: Destination comparison by category
33
---
44

55
This page collates information about each destination, organized by category for better comparison shopping.
6+
{% assign overridesList = site.data.catalog.overrides-list.items %}
67

78
{% for category in site.data.catalog.destination_categories.items %}
89

@@ -27,12 +28,21 @@ This page collates information about each destination, organized by category for
2728
{% unless destination.connection_modes.cloud.web == false and destination.connection_modes.cloud.mobile == false and destination.connection_modes.cloud.server == false and destination.connection_modes.device.web == false and destination.connection_modes.device.mobile == false %}
2829
<tr>
2930
<td>**[{{ destination.display_name }}](/docs/{{ destination.url }})**</td>
30-
<td style="border-left: 1px solid gray;">{% if destination.connection_modes.cloud.web %}✅{% else %}⬜️{% endif %} </td>
31+
{% if overridesList contains destination.slug %}{% assign thisDestname = destination.slug %}{% assign thisDest = site.data.catalog.overrides.items | where: "slug", thisDestname | first%}
32+
<td style="border-left: 1px solid gray;">
33+
{% if thisDest.connection_modes.cloud.web %}✅{% else %}⬜️{% endif %} </td>
34+
<td>{% if thisDest.connection_modes.cloud.mobile %}✅{% else %}⬜️{% endif %} </td>
35+
<td>{% if thisDest.connection_modes.cloud.server %}✅{% else %}⬜️{% endif %} </td>
36+
<td style="border-left: 1px solid gray;">{% if thisDest.connection_modes.device.web %}✅{% else %}⬜️{% endif %} </td>
37+
<td>{% if thisDest.connection_modes.device.mobile %}✅{% else %}⬜️{% endif %} </td>
38+
{% else %}
39+
<td style="border-left: 1px solid gray;">
40+
{% if destination.connection_modes.cloud.web %}✅{% else %}⬜️{% endif %} </td>
3141
<td>{% if destination.connection_modes.cloud.mobile %}✅{% else %}⬜️{% endif %} </td>
3242
<td>{% if destination.connection_modes.cloud.server %}✅{% else %}⬜️{% endif %} </td>
3343
<td style="border-left: 1px solid gray;">{% if destination.connection_modes.device.web %}✅{% else %}⬜️{% endif %} </td>
3444
<td>{% if destination.connection_modes.device.mobile %}✅{% else %}⬜️{% endif %} </td>
35-
</tr>
45+
{%endif%}</tr>
3646
{% endunless %}
3747
{% endif %}
3848
{% endfor %}

src/connections/destinations/cmodes-compare.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ title: Destinations Connection Modes comparison
77
88
> success ""
99
> Comparison shopping? Check out the [destination connection modes by category](/docs/connections/destinations/category-compare/).
10+
{% assign overridesList = site.data.catalog.overrides-list.items %}
1011

1112
<table>
1213
<tr>
@@ -26,12 +27,23 @@ title: Destinations Connection Modes comparison
2627
{% unless destination.connection_modes.cloud.web == false and destination.connection_modes.cloud.mobile == false and destination.connection_modes.device.web == false and destination.connection_modes.device.mobile == false and destination.connection_modes.cloud.server == false %}
2728
<tr>
2829
<td>[{{ destination.display_name }}](/docs/{{ destination.url }}){% if destination.status == "PUBLIC_BETA" %}&nbsp;ℹ️{% endif %}</td>
29-
<td style="border-left: 1px solid gray;">{% if destination.connection_modes.cloud.web %}✅{% else %}⬜️{% endif %} </td>
30+
{% if overridesList contains destination.slug %}{% assign thisDestname = destination.slug %}{% assign thisDest = site.data.catalog.overrides.items | where: "slug", thisDestname | first%}
31+
<td style="border-left: 1px solid gray;">
32+
{% if thisDest.connection_modes.cloud.web %}✅{% else %}⬜️{% endif %} </td>
33+
<td>{% if thisDest.connection_modes.cloud.mobile %}✅{% else %}⬜️{% endif %} </td>
34+
<td>{% if thisDest.connection_modes.cloud.server %}✅{% else %}⬜️{% endif %} </td>
35+
<td style="border-left: 1px solid gray;">{% if thisDest.connection_modes.device.web %}✅{% else %}⬜️{% endif %} </td>
36+
<td>{% if thisDest.connection_modes.device.mobile %}✅{% else %}⬜️{% endif %} </td>
37+
{% else %}
38+
<td style="border-left: 1px solid gray;">
39+
{% if destination.connection_modes.cloud.web %}✅{% else %}⬜️{% endif %} </td>
3040
<td>{% if destination.connection_modes.cloud.mobile %}✅{% else %}⬜️{% endif %} </td>
3141
<td>{% if destination.connection_modes.cloud.server %}✅{% else %}⬜️{% endif %} </td>
3242
<td style="border-left: 1px solid gray;">{% if destination.connection_modes.device.web %}✅{% else %}⬜️{% endif %} </td>
3343
<td>{% if destination.connection_modes.device.mobile %}✅{% else %}⬜️{% endif %} </td>
44+
{%endif%}
3445
</tr>
46+
3547
{% endunless %}
3648
{% endfor %}
3749
</table>

src/connections/destinations/index.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,23 @@ Segment has five types of sources: Web (Analytics.js), Mobile, Server, and Cloud
1818

1919
## Method Compatibility
2020

21-
Not all destinations can accept data from specific method types. Wondering which ones are which? Check out the [Destinations Methods matrix](/docs/connections/destinations/methods-compare/).
21+
Not all destinations can accept data from specific method types. Wondering which ones are which? Look for the "Quick Info" box at the top of the destination's documentation page, or check out the [Destinations Methods matrix](/docs/connections/destinations/methods-compare/).
2222

2323
## Source Compatibility
2424

25-
Many destinations can accept data from all types of sources, but some are only compatible with specific source types (for example, web only, or server only). To find out which source types a specific destination can accept data from, check the documentation for that destination for a "Supported Sources and Connection Modes" section.
25+
Many destinations can accept data from all types of sources, but some are only compatible with specific source types (for example, web only, or server only). To find out which source types a specific destination can accept data from, check the documentation for that destination for a "Quick info" box, or a "Supported Sources and Connection Modes" section.
2626

2727
{% include components/reference-button.html href="/docs/connections/destinations/category-compare/" icon="guides.svg" title="Destinations Compatibility Matrix" description="Wondering which destinations take which data? Check out the Destination connection modes list by category." %}
2828

29+
2930
## Connection Modes
3031

3132
{% include content/connection-modes-intro.md %}
3233

3334

3435
### When should I use Device-mode? When should I use Cloud-mode?
3536

36-
There are two main things we consider when we decide to build Device- or Cloud-Modes (or both!) for a destination partner
37+
There are two main things we consider when Segment decides to use Device- or Cloud-Modes (or both!) for a destination partner
3738

3839
#### 1. Anonymous Attribution Methodology
3940

0 commit comments

Comments
 (0)