Skip to content

Commit df64ac5

Browse files
committed
Merge branch 'master' into DOC_131-Algolia
2 parents 33293ac + 198dad4 commit df64ac5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+406
-62
lines changed

js/hoverhelp/index.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
const COMPONENT_NAME = 'data-hoverhelp'
2+
const COMPONENT_SELECTOR = `[${COMPONENT_NAME}]`
3+
const BODY_SELECTOR = 'data-hoverhelp-body'
4+
const TRIGGER_SELECTOR = '[data-hoverhelp-target]'
5+
6+
export default function () {
7+
const components = document.querySelectorAll(COMPONENT_SELECTOR)
8+
9+
for (let i = 0; i < components.length; i++) {
10+
const triggers = components[i].querySelectorAll(TRIGGER_SELECTOR)
11+
12+
for (let i = 0; i < triggers.length; i++) {
13+
triggers[i].addEventListener('mouseover', e => {
14+
e.preventDefault()
15+
16+
const targetBody = document.querySelector(`[${BODY_SELECTOR}=${e.target.dataset.hoverhelpTarget}]`)
17+
18+
components[i].classList.toggle(components[i].dataset.activeClass)
19+
})
20+
}
21+
22+
document.addEventListener('mouseover', e => {
23+
if (components[i].classList.contains(components[i].dataset.activeClass)) {
24+
const hoverhelpBody = components[i].querySelector(`[${BODY_SELECTOR}]`)
25+
26+
for (let i = 0; i < triggers.length; i++) {
27+
if (!hoverhelpBody.contains(e.target) && e.target !== triggers[i]) {
28+
components[i].classList.remove(components[i].dataset.activeClass)
29+
}
30+
}
31+
}
32+
})
33+
}
34+
}

js/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import dropdownMenu from './dropdown-menu'
99
import anchorsIndicator from './anchors-indicator'
1010
import codeExample from './code-example'
1111
import popover from './popover'
12+
import hoverhelp from './hoverhelp'
1213
import menuPanels from './menu-panels'
1314
import searchBar404 from './search-bar-404'
1415
import backScrolling from './back-scrolling'
@@ -30,6 +31,7 @@ dropdownMenu()
3031
anchorsIndicator()
3132
codeExample()
3233
popover()
34+
hoverhelp()
3335
searchBar404()
3436
backScrolling()
3537
navigation()

src/_data/catalog/destination_categories.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT
2-
# destination categories last updated 2021-02-23
2+
# destination categories last updated 2021-03-05
33
items:
44
- display_name: Email Marketing
55
slug: email-marketing

src/_data/catalog/destinations.yml

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT
2-
# destination data last updated 2021-02-23
2+
# destination data last updated 2021-03-05
33
items:
44
- display_name: ActiveCampaign
55
slug: activecampaign
@@ -2893,6 +2893,7 @@ items:
28932893
mark:
28942894
url: 'https://cdn.filepicker.io/api/file/sybdw0htTTKBmrgD1jJI'
28952895
categories:
2896+
- Referrals
28962897
- Attribution
28972898
components:
28982899
- type: CLOUD
@@ -10990,7 +10991,9 @@ items:
1099010991
mark:
1099110992
url: >-
1099210993
https://public-segment-devcenter-production.s3.amazonaws.com/edaa6886-d1fe-4af5-a76b-e2832fea8884.svg
10993-
categories: []
10994+
categories:
10995+
- Attribution
10996+
- Referrals
1099410997
components: []
1099510998
platforms:
1099610999
browser: true
@@ -16141,28 +16144,6 @@ items:
1614116144
Code**. Note: you can still use a URL query parameter of `pi_campaign_id`
1614216145
to override this on specific pages.
1614316146
settings: []
16144-
- name: email
16145-
display_name: Pardot Account Email
16146-
type: STRING
16147-
deprecated: false
16148-
required: false
16149-
string_validators:
16150-
regexp: ''
16151-
description: Your account email.
16152-
settings: []
16153-
- name: password
16154-
display_name: Pardot Account Password
16155-
type: PASSWORD
16156-
deprecated: false
16157-
required: false
16158-
string_validators:
16159-
regexp: ''
16160-
description: >-
16161-
Pardot requires we store a Pardot user email and password to access their
16162-
API. For security, we recommend you add a new user to your Pardot account
16163-
under **Admin > Users and Groups > Add User**, so that you don't have to
16164-
tell us your actual password.
16165-
settings: []
1616616147
- name: primaryBusinessUnitId
1616716148
display_name: Primary Business Unit Id
1616816149
type: STRING
@@ -16206,17 +16187,6 @@ items:
1620616187
lookup key value. If disabled, we will search for a trait in the event
1620716188
with the same name as the lookup field ID and match on that.
1620816189
settings: []
16209-
- name: userKey
16210-
display_name: User Key
16211-
type: STRING
16212-
deprecated: false
16213-
required: false
16214-
string_validators:
16215-
regexp: '^[a-f0-9]{32}$'
16216-
description: >-
16217-
You can find your User Key on under **User Settings** in your [Pardot
16218-
account](https://pi.pardot.com/account).
16219-
settings: []
1622016190
connection_modes:
1622116191
device:
1622216192
web: true

src/_data/catalog/source_categories.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT
2-
# source cateogries last updated 2021-02-23
2+
# source cateogries last updated 2021-03-05
33
items:
44
- display_name: Server
55
slug: server

src/_data/catalog/sources.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT
2-
# sources last updated 2021-02-23
2+
# sources last updated 2021-03-05
33
items:
44
- display_name: .NET
55
slug: net

src/_data/products.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
items:
2+
- product_display_name: Personas
3+
slug: personas
4+
plan-note: "Personas is available as an add-on for Business plans only."
5+
plans:
6+
free: false
7+
team: false
8+
business: true
9+
add-on: true
10+
- product_display_name: Personas Identity Graph
11+
slug: personas-id
12+
plans:
13+
free: false
14+
team: false
15+
business: true
16+
add-on: true
17+
- product_display_name: Protocols
18+
slug: protocols
19+
plan-note: "Protocols is available as an add-on for Business plans only."
20+
plans:
21+
free: false
22+
team: false
23+
business: true
24+
add-on: true
25+
- product_display_name: Advanced Access Management
26+
slug: iam
27+
plan-note: "Advanced Access Management is available for all Business plans."
28+
plans:
29+
free: false
30+
team: false
31+
business: true
32+
add-on: false
33+
- product_display_name: Replay
34+
slug: replay
35+
plan-note: "Replay is available to all Business plans."
36+
plans:
37+
free: false
38+
team: false
39+
business: true
40+
add-on: false
41+
- product_display_name: Privacy Portal
42+
slug: privacy
43+
plans:
44+
free: true
45+
team: true
46+
business: true
47+
add-on: false
48+
- product_display_name: Warehouses
49+
slug: warehouses
50+
plan-note: "Free and Team plan workspaces can have 1 warehouse. Business plans can have more than one, and include custom sync schedules and filtering."
51+
plans:
52+
free: true
53+
team: true
54+
business: true
55+
add-on: false
56+
- product_display_name: Warehouse custom sync
57+
slug: warehouse-sync
58+
plans:
59+
free: false
60+
team: false
61+
business: true
62+
add-on: true
63+
- product_display_name: Data Lakes
64+
slug: data-lakes
65+
plans:
66+
free: false
67+
team: false
68+
business: true
69+
add-on: false
70+
- product_display_name: Audit Trail
71+
slug: audit-trail
72+
plans:
73+
free: false
74+
team: false
75+
business: true
76+
add-on: false
77+
- product_display_name: Single Sign-on
78+
slug: sso
79+
plan-note: "Single Sign-on is only available in Business plan workspaces."
80+
plans:
81+
free: false
82+
team: false
83+
business: true
84+
add-on: false
85+
- product_display_name: Multi-factor authentication
86+
slug: mfa
87+
plan-note: "MFA is available to all Segment plans, but cannot be used with SSO."
88+
plans:
89+
free: true
90+
team: true
91+
business: true
92+
add-on: false

src/_includes/content/plan-grid.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{% assign thisProduct = include.name %}
2+
{% assign productData = site.data.products.items | where: "slug", thisProduct | first %}
3+
<!-- The line below hides the grid if there's no matching data in products.yml-->
4+
{% if productData %}
5+
6+
{% assign productPlans = productData.plans %}
7+
8+
9+
<div class="popover" data-popover data-active-class="popover--active">
10+
<div class="flex flex--wrap waffle" style="margin-top: -25px;margin-bottom: 40px;" >
11+
12+
{% for item in productPlans %}
13+
{% if item[1] == true %}
14+
<div class="flex__column flex__column--shrink">
15+
<span class="badge badge--{% if item[0] == 'add-on' %}success{% else %}primary{%endif%}"> {{item[0] | capitalize }} ✓ </span>
16+
</div>
17+
{% else %}
18+
<div class="flex__column flex__column--shrink">
19+
<span class="badge badge--gray" style="opacity:0.2"> {{item[0] | capitalize }} x </span>
20+
</div>
21+
{% endif %}
22+
23+
{% endfor %}
24+
<div class="flex__column flex__column--shrink" style="padding-top:0px">
25+
<a class="recent-contributor__button button-link" href="#" data-popover-target="contributors">?</a>
26+
</div>
27+
</div>
28+
29+
30+
31+
<div class="popover__body" data-popover-body="contributors">
32+
{% if productData.plan-note %}
33+
<p style="font-size:12px">{{productData.plan-note}}
34+
{% elsif productData.plans.add-on and productData.plans.business == false%}
35+
<p style="font-size:12px">{{productData.product_display_name}} is available as an add-on for the displayed plans only.</p>
36+
{% elsif productData.plans.add-on and productData.plans.business %}
37+
<p style="font-size:12px">{{productData.product_display_name}} is available as an add-on for Business plans only.
38+
{% else %}
39+
<p style="font-size:12px">{{productData.product_display_name}} is available for the listed account plans only.
40+
{% endif %}
41+
<br>See the <a href="https://segment.com/pricing">available plans</a>, or <a href="https://segment.com/help/contact/">contact us</a>.</p></div>
42+
</div>
43+
{% endif %}

src/_sass/components/_hoverhelp.scss

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.hoverhelp {
2+
$this: &;
3+
4+
position: relative;
5+
6+
&__body {
7+
position: absolute;
8+
top: 100%;
9+
left: 0;
10+
z-index: 10;
11+
width: 100%;
12+
margin-top: 10px;
13+
padding: 15px;
14+
opacity: 0;
15+
visibility: hidden;
16+
border: 1px solid color(gray-400);
17+
border-radius: 4px;
18+
background: color(white);
19+
transition: 200ms ease;
20+
}
21+
22+
&--active {
23+
#{$this}__body {
24+
opacity: 1;
25+
visibility: visible;
26+
}
27+
}
28+
}

src/_sass/segment.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
@import "components/integration-header";
8585
@import "components/code-example";
8686
@import "components/popover";
87+
@import "components/hoverhelp";
8788
@import "components/avatars-list";
8889
@import "components/mobile-menu-side";
8990
@import "components/gloss";

0 commit comments

Comments
 (0)