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

♻️ workshops landing when logged in #1765

Open
wants to merge 13 commits into
base: development
Choose a base branch
from
1 change: 1 addition & 0 deletions customtypes/page/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"fieldset": "Slice Zone",
"config": {
"choices": {
"search_bar": { "type": "SharedSlice" },
"info_cards": { "type": "SharedSlice" },
"trust_cards": { "type": "SharedSlice" },
"title_introduction": { "type": "SharedSlice" },
Expand Down
225 changes: 225 additions & 0 deletions prismicio-types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type * as prismicClient from "@prismicio/client";
type Simplify<T> = { [KeyType in keyof T]: T[KeyType] };

type PageDocumentDataSlicesSlice =
| SearchBarSlice
| InfoCardsSlice
| TrustCardsSlice
| TitleIntroductionSlice
Expand Down Expand Up @@ -149,6 +150,49 @@ export interface EventCardsSliceDefaultPrimary {
* - **Documentation**: https://prismic.io/docs/field#key-text
*/
margin: prismic.KeyTextField;

/**
* Tech Filtered field in *EventCards → Primary*
*
* - **Field Type**: Text
* - **Placeholder**: Auto filter the events by a technology
* - **API ID Path**: event_cards.primary.tech_filtered
* - **Documentation**: https://prismic.io/docs/field#key-text
*/
tech_filtered: prismic.KeyTextField;

/**
* Search Sensitive field in *EventCards → Primary*
*
* - **Field Type**: Boolean
* - **Placeholder**: *None*
* - **Default Value**: false
* - **API ID Path**: event_cards.primary.search_sensitive
* - **Documentation**: https://prismic.io/docs/field#boolean
*/
search_sensitive: prismic.BooleanField;

/**
* Show checked in events field in *EventCards → Primary*
*
* - **Field Type**: Boolean
* - **Placeholder**: *None*
* - **Default Value**: false
* - **API ID Path**: event_cards.primary.show_checked_in_events
* - **Documentation**: https://prismic.io/docs/field#boolean
*/
show_checked_in_events: prismic.BooleanField;

/**
* Is for logged in users only field in *EventCards → Primary*
*
* - **Field Type**: Boolean
* - **Placeholder**: *None*
* - **Default Value**: false
* - **API ID Path**: event_cards.primary.is_for_logged_in_users
* - **Documentation**: https://prismic.io/docs/field#boolean
*/
is_for_logged_in_users: prismic.BooleanField;
}

/**
Expand Down Expand Up @@ -511,6 +555,17 @@ export interface MarkdownSliceDefaultPrimary {
* - **Documentation**: https://prismic.io/docs/field#key-text
*/
padding: prismic.KeyTextField;

/**
* Is for logged in users only field in *Markdown → Primary*
*
* - **Field Type**: Boolean
* - **Placeholder**: *None*
* - **Default Value**: false
* - **API ID Path**: markdown.primary.is_for_logged_in_users
* - **Documentation**: https://prismic.io/docs/field#boolean
*/
is_for_logged_in_users: prismic.BooleanField;
}

/**
Expand Down Expand Up @@ -1014,6 +1069,107 @@ export type RoadMapSlice = prismic.SharedSlice<
RoadMapSliceVariation
>;

/**
* Primary content in *SearchBar → Primary*
*/
export interface SearchBarSliceDefaultPrimary {
/**
* heading top field in *SearchBar → Primary*
*
* - **Field Type**: Text
* - **Placeholder**: *None*
* - **API ID Path**: search_bar.primary.heading_top
* - **Documentation**: https://prismic.io/docs/field#key-text
*/
heading_top: prismic.KeyTextField;

/**
* heading bottom field in *SearchBar → Primary*
*
* - **Field Type**: Text
* - **Placeholder**: *None*
* - **API ID Path**: search_bar.primary.heading_bottom
* - **Documentation**: https://prismic.io/docs/field#key-text
*/
heading_bottom: prismic.KeyTextField;

/**
* subtitle field in *SearchBar → Primary*
*
* - **Field Type**: Text
* - **Placeholder**: *None*
* - **API ID Path**: search_bar.primary.subtitle
* - **Documentation**: https://prismic.io/docs/field#key-text
*/
subtitle: prismic.KeyTextField;

/**
* background field in *SearchBar → Primary*
*
* - **Field Type**: Text
* - **Placeholder**: hex
* - **API ID Path**: search_bar.primary.background
* - **Documentation**: https://prismic.io/docs/field#key-text
*/
background: prismic.KeyTextField;

/**
* Is for logged in users only field in *SearchBar → Primary*
*
* - **Field Type**: Boolean
* - **Placeholder**: *None*
* - **Default Value**: false
* - **API ID Path**: search_bar.primary.is_for_logged_in_users
* - **Documentation**: https://prismic.io/docs/field#boolean
*/
is_for_logged_in_users: prismic.BooleanField;
}

/**
* Primary content in *SearchBar → Items*
*/
export interface SearchBarSliceDefaultItem {
/**
* Popular Searches field in *SearchBar → Items*
*
* - **Field Type**: Text
* - **Placeholder**: Tecnology pills at the bottom
* - **API ID Path**: search_bar.items[].popular_searches
* - **Documentation**: https://prismic.io/docs/field#key-text
*/
popular_searches: prismic.KeyTextField;
}

/**
* Default variation for SearchBar Slice
*
* - **API ID**: `default`
* - **Description**: Default
* - **Documentation**: https://prismic.io/docs/slice
*/
export type SearchBarSliceDefault = prismic.SharedSliceVariation<
"default",
Simplify<SearchBarSliceDefaultPrimary>,
Simplify<SearchBarSliceDefaultItem>
>;

/**
* Slice variation for *SearchBar*
*/
type SearchBarSliceVariation = SearchBarSliceDefault;

/**
* SearchBar Shared Slice
*
* - **API ID**: `search_bar`
* - **Description**: SearchBar
* - **Documentation**: https://prismic.io/docs/slice
*/
export type SearchBarSlice = prismic.SharedSlice<
"search_bar",
SearchBarSliceVariation
>;

/**
* Primary content in *ShowPrices → Primary*
*/
Expand Down Expand Up @@ -1142,6 +1298,17 @@ export interface TechnologiesSliceDefaultPrimary {
* - **Documentation**: https://prismic.io/docs/field#key-text
*/
margin: prismic.KeyTextField;

/**
* Is for logged in users only field in *Technologies → Primary*
*
* - **Field Type**: Boolean
* - **Placeholder**: *None*
* - **Default Value**: false
* - **API ID Path**: technologies.primary.is_for_logged_in_users
* - **Documentation**: https://prismic.io/docs/field#boolean
*/
is_for_logged_in_users: prismic.BooleanField;
}

/**
Expand Down Expand Up @@ -1207,6 +1374,37 @@ export interface TechnologiesPillsSliceDefaultPrimary {
* - **Documentation**: https://prismic.io/docs/field#key-text
*/
margin: prismic.KeyTextField;

/**
* background field in *TechnologiesPills → Primary*
*
* - **Field Type**: Text
* - **Placeholder**: *None*
* - **API ID Path**: technologies_pills.primary.background
* - **Documentation**: https://prismic.io/docs/field#key-text
*/
background: prismic.KeyTextField;

/**
* padding top field in *TechnologiesPills → Primary*
*
* - **Field Type**: Text
* - **Placeholder**: *None*
* - **API ID Path**: technologies_pills.primary.padding_top
* - **Documentation**: https://prismic.io/docs/field#key-text
*/
padding_top: prismic.KeyTextField;

/**
* Is for logged in users only field in *TechnologiesPills → Primary*
*
* - **Field Type**: Boolean
* - **Placeholder**: *None*
* - **Default Value**: false
* - **API ID Path**: technologies_pills.primary.is_for_logged_in_users
* - **Documentation**: https://prismic.io/docs/field#boolean
*/
is_for_logged_in_users: prismic.BooleanField;
}

/**
Expand Down Expand Up @@ -1460,6 +1658,17 @@ export interface TitleIntroductionSliceDefaultPrimary {
* - **Documentation**: https://prismic.io/docs/field#key-text
*/
button_id: prismic.KeyTextField;

/**
* Is for logged in users only field in *TitleIntroduction → Primary*
*
* - **Field Type**: Boolean
* - **Placeholder**: *None*
* - **Default Value**: false
* - **API ID Path**: title_introduction.primary.is_for_logged_in_users
* - **Documentation**: https://prismic.io/docs/field#boolean
*/
is_for_logged_in_users: prismic.BooleanField;
}

/**
Expand Down Expand Up @@ -1782,6 +1991,17 @@ export interface TwoColumnSliceDefaultPrimary {
* - **Documentation**: https://prismic.io/docs/field#select
*/
fontFamily: prismic.SelectField<"Lato" | "Space Grotesk Variable", "filled">;

/**
* Is for logged in users only field in *TwoColumn → Primary*
*
* - **Field Type**: Boolean
* - **Placeholder**: *None*
* - **Default Value**: false
* - **API ID Path**: two_column.primary.is_for_logged_in_users
* - **Documentation**: https://prismic.io/docs/field#boolean
*/
is_for_logged_in_users: prismic.BooleanField;
}

/**
Expand Down Expand Up @@ -1856,6 +2076,11 @@ declare module "@prismicio/client" {
RoadMapSliceDefaultPrimary,
RoadMapSliceVariation,
RoadMapSliceDefault,
SearchBarSlice,
SearchBarSliceDefaultPrimary,
SearchBarSliceDefaultItem,
SearchBarSliceVariation,
SearchBarSliceDefault,
ShowPricesSlice,
ShowPricesSliceDefaultPrimary,
ShowPricesSliceVariation,
Expand Down
3 changes: 3 additions & 0 deletions slices/EventCards/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ const EventCards = ({ slice }) => (
id={slice?.primary?.id_key}
title={slice?.primary?.title}
endpoint={slice?.primary?.endpoint}
techFilter={slice?.primary?.tech_filtered}
searchSensitive={slice?.primary?.search_sensitive}
showCheckedInEvents={slice?.primary?.show_checked_in_events}
margin={slice?.primary?.margin || '40px auto'}
/>
);
Expand Down
81 changes: 49 additions & 32 deletions slices/EventCards/mocks.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,51 @@
[
{
"__TYPE__": "SharedSliceContent",
"variation": "default",
"primary": {
"id_key": {
"__TYPE__": "FieldContent",
"value": "fewer",
"type": "Text"
},
"title": {
"__TYPE__": "FieldContent",
"value": "pictured",
"type": "Text"
},
"endpoint": {
"__TYPE__": "FieldContent",
"value": "carried",
"type": "Text"
},
"margin": {
"__TYPE__": "FieldContent",
"value": "continent",
"type": "Text"
}
},
"items": [
{
"__TYPE__": "GroupItemContent",
"value": []
}
]
}
{
"__TYPE__": "SharedSliceContent",
"variation": "default",
"primary": {
"id_key": {
"__TYPE__": "FieldContent",
"value": "fewer",
"type": "Text"
},
"title": {
"__TYPE__": "FieldContent",
"value": "pictured",
"type": "Text"
},
"endpoint": {
"__TYPE__": "FieldContent",
"value": "carried",
"type": "Text"
},
"margin": {
"__TYPE__": "FieldContent",
"value": "continent",
"type": "Text"
},
"is_for_logged_in_users": {
"__TYPE__": "BooleanContent",
"value": false
},
"search_sensitive": {
"__TYPE__": "BooleanContent",
"value": false
},
"tech_filtered": {
"__TYPE__": "FieldContent",
"value": "swam",
"type": "Text"
},
"show_checked_in_events": {
"__TYPE__": "BooleanContent",
"value": true
}
},
"items": [
{
"__TYPE__": "GroupItemContent",
"value": []
}
]
}
]
Loading