Skip to content

Commit

Permalink
Revert "Rename "App Route" to "Page" (#1159)"
Browse files Browse the repository at this point in the history
This reverts commit e1d1a02.
  • Loading branch information
illiakovalenko committed Nov 28, 2022
1 parent 011ce63 commit 666329d
Show file tree
Hide file tree
Showing 17 changed files with 57 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ query IntegratedDemoQuery($datasource: String!, $contextItem: String!, $language
# (as long as the GraphQLData helper is used)
contextItem: item(path: $contextItem, language: $language) {
id
# Get the page title from the page template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
# Get the page title from the app route template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
pageTitle {
value
}
Expand All @@ -56,7 +56,7 @@ query IntegratedDemoQuery($datasource: String!, $contextItem: String!, $language
# typing fragments can be used anywhere!
# so in this case, we're grabbing the 'pageTitle'
# field on all child route items.
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
pageTitle {
jsonValue
value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function addRoutesToManifest(manifest: Manifest): Promise<void> {
// which routes can use by setting `template: YourCustomRouteTypeName` in their definition.
const appTemplateSection = 'Page Metadata';
manifest.setDefaultRouteType({
name: '<%- helper.getAppPrefix(appPrefix, appName) %>Page',
name: '<%- helper.getAppPrefix(appPrefix, appName) %>App Route',
fields: [
{
name: 'pageTitle',
Expand All @@ -25,7 +25,7 @@ export default function addRoutesToManifest(manifest: Manifest): Promise<void> {
type: CommonFieldTypes.SingleLineText,
},
],
insertOptions: ['<%- helper.getAppPrefix(appPrefix, appName) %>Page'],
insertOptions: ['<%- helper.getAppPrefix(appPrefix, appName) %>App Route'],
});

return mergeFs('./data/routes') // relative to process invocation (i.e. your package.json)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ query ConnectedDemoQuery($datasource: String!, $contextItem: String!, $language:
# $contextItem should be set to the ID of the current context item (the route item)
contextItem: item(path: $contextItem, language: $language) {
id
# Get the page title from the page template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
# Get the page title from the app route template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
pageTitle {
value
}
Expand All @@ -54,7 +54,7 @@ query ConnectedDemoQuery($datasource: String!, $contextItem: String!, $language:
# typing fragments can be used anywhere!
# so in this case, we're grabbing the 'pageTitle'
# field on all child route items.
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
pageTitle {
jsonValue
value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export default {
name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>ContentBlock',
},
{
name: 'C__<%- helper.getAppPrefix(appPrefix, appName, false) %>Page',
name: 'C__<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute',
},
{
name: 'JsonRendering',
Expand Down Expand Up @@ -192,13 +192,13 @@ export default {
},
{
kind: 'INTERFACE',
name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>Page',
name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute',
possibleTypes: [
{
name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>ExampleCustomRouteType',
},
{
name: 'C__<%- helper.getAppPrefix(appPrefix, appName, false) %>Page',
name: 'C__<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute',
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ query IntegratedDemoQuery($datasource: String!, $contextItem: String!, $language
# (as long as the GraphQLData helper is used)
contextItem: item(path: $contextItem, language: $language) {
id
# Get the page title from the page template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
# Get the page title from the app route template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
pageTitle {
value
}
Expand All @@ -56,7 +56,7 @@ query IntegratedDemoQuery($datasource: String!, $contextItem: String!, $language
# typing fragments can be used anywhere!
# so in this case, we're grabbing the 'pageTitle'
# field on all child route items.
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
pageTitle {
jsonValue
value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export default function addRoutesToManifest(manifest: Manifest): Promise<void> {
const appTemplateSection = 'Page Metadata';

manifest.setDefaultRouteType({
name: '<%- helper.getAppPrefix(appPrefix, appName) %>Page',
displayName: 'Page',
name: '<%- helper.getAppPrefix(appPrefix, appName) %>App Route',
displayName: 'App Route',
fields: [
{
name: 'pageTitle',
Expand All @@ -34,7 +34,7 @@ export default function addRoutesToManifest(manifest: Manifest): Promise<void> {
type: CommonFieldTypes.SingleLineText,
},
],
insertOptions: ['<%- helper.getAppPrefix(appPrefix, appName) %>Page'],
insertOptions: ['<%- helper.getAppPrefix(appPrefix, appName) %>App Route'],
});

return mergeFs('./data/routes') // relative to process invocation (i.e. your package.json)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ query ConnectedDemoQuery($datasource: String!, $contextItem: String!, $language:
# $contextItem should be set to the ID of the current context item (the route item)
contextItem: item(path: $contextItem, language: $language) {
id
# Get the page title from the page template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
# Get the page title from the app route template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
pageTitle {
value
}
Expand All @@ -54,7 +54,7 @@ query ConnectedDemoQuery($datasource: String!, $contextItem: String!, $language:
# typing fragments can be used anywhere!
# so in this case, we're grabbing the 'pageTitle'
# field on all child route items.
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
pageTitle {
jsonValue
value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ import {
import NextLink from 'next/link';
import {
ConnectedDemoQueryDocument,
<%- helper.getAppPrefix(appPrefix, appName, false) %>Page as Page,
<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute as AppRoute,
Item,
<%- helper.getAppPrefix(appPrefix, appName, false) %>GraphQlConnectedDemo as GrapQLConnectedDemoDatasource,
} from './GraphQL-ConnectedDemo.dynamic.graphql';
import { ComponentProps } from 'lib/component-props';
import config from 'temp/config';

type PageItem = Page & Item;
type RouteItem = AppRoute & Item;

type GraphQLConnectedDemoData = {
datasource: GrapQLConnectedDemoDatasource;
contextItem: PageItem;
contextItem: RouteItem;
};

type GraphQLConnectedDemoProps = ComponentProps & GraphQLConnectedDemoData;
Expand Down Expand Up @@ -80,12 +80,12 @@ const GraphQLConnectedDemo = (props: GraphQLConnectedDemoProps): JSX.Element =>
children:
<ul>
{props.contextItem.children.results.map((child) => {
const pageItem = child as PageItem;
const routeItem = child as RouteItem;

return (
<li key={pageItem.id}>
<NextLink href={pageItem.url.path}>{pageItem.pageTitle?.value}</NextLink>
(editable title too! <Text field={pageItem.pageTitle?.jsonValue} />)
<li key={routeItem.id}>
<NextLink href={routeItem.url.path}>{routeItem.pageTitle?.value}</NextLink>
(editable title too! <Text field={routeItem.pageTitle?.jsonValue} />)
</li>
);
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2179,7 +2179,7 @@
},
{
"kind": "OBJECT",
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>Page",
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute",
"ofType": null
},
{
Expand Down Expand Up @@ -17760,7 +17760,7 @@
"interfaces": [
{
"kind": "INTERFACE",
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>Page",
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute",
"ofType": null
},
{
Expand Down Expand Up @@ -18219,8 +18219,8 @@
},
{
"kind": "OBJECT",
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>Page",
"description": "/sitecore/templates/Project/<%- helper.getAppPrefix(appPrefix, appName, false) %>/<%- helper.getAppPrefix(appPrefix, appName, false) %>-Page template (ID: {787584C0-A057-5876-9836-F8B3708F0CAF}). NOTE: This is a concrete type. Favor using interfaces instead of this type (e.g. <%- helper.getAppPrefix(appPrefix, appName, false) %>Page) for reliable querying.",
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute",
"description": "/sitecore/templates/Project/<%- helper.getAppPrefix(appPrefix, appName, false) %>/<%- helper.getAppPrefix(appPrefix, appName, false) %>-App Route template (ID: {787584C0-A057-5876-9836-F8B3708F0CAF}). NOTE: This is a concrete type. Favor using interfaces instead of this type (e.g. <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute) for reliable querying.",
"fields": [
{
"name": "ancestors",
Expand Down Expand Up @@ -18643,7 +18643,7 @@
"interfaces": [
{
"kind": "INTERFACE",
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>Page",
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute",
"ofType": null
},
{
Expand Down Expand Up @@ -21496,8 +21496,8 @@
},
{
"kind": "INTERFACE",
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>Page",
"description": "/sitecore/templates/Project/<%- helper.getAppPrefix(appPrefix, appName, false) %>/<%- helper.getAppPrefix(appPrefix, appName, false) %>-Page template (ID: {787584C0-A057-5876-9836-F8B3708F0CAF}). Also implements Route.",
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute",
"description": "/sitecore/templates/Project/<%- helper.getAppPrefix(appPrefix, appName, false) %>/<%- helper.getAppPrefix(appPrefix, appName, false) %>-App Route template (ID: {787584C0-A057-5876-9836-F8B3708F0CAF}). Also implements Route.",
"fields": [
{
"name": "pageTitle",
Expand All @@ -21523,7 +21523,7 @@
},
{
"kind": "OBJECT",
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>Page",
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute",
"ofType": null
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ query IntegratedDemoQuery($datasource: String!, $contextItem: String!, $language
# (as long as the GraphQLData helper is used)
contextItem: item(path: $contextItem, language: $language) {
id
# Get the page title from the page template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
# Get the page title from the app route template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
pageTitle {
value
}
Expand All @@ -56,7 +56,7 @@ query IntegratedDemoQuery($datasource: String!, $contextItem: String!, $language
# typing fragments can be used anywhere!
# so in this case, we're grabbing the 'pageTitle'
# field on all child route items.
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
pageTitle {
jsonValue
value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function addRoutesToManifest(manifest) {
const appTemplateSection = 'Page Metadata';

manifest.setDefaultRouteType({
name: '<%- helper.getAppPrefix(appPrefix, appName) %>Page',
name: '<%- helper.getAppPrefix(appPrefix, appName) %>App Route',
fields: [
{
name: 'pageTitle',
Expand All @@ -37,7 +37,7 @@ export default function addRoutesToManifest(manifest) {
type: CommonFieldTypes.SingleLineText,
},
],
insertOptions: ['<%- helper.getAppPrefix(appPrefix, appName) %>Page'],
insertOptions: ['<%- helper.getAppPrefix(appPrefix, appName) %>App Route'],
});

return mergeFs('./data/routes') // relative to process invocation (i.e. your package.json)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ query ConnectedDemoQuery($datasource: String!, $contextItem: String!, $language:
# $contextItem should be set to the ID of the current context item (the route item)
contextItem: item(path: $contextItem, language: $language) {
id
# Get the page title from the page template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
# Get the page title from the app route template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
pageTitle {
value
}
Expand All @@ -54,7 +54,7 @@ query ConnectedDemoQuery($datasource: String!, $contextItem: String!, $language:
# typing fragments can be used anywhere!
# so in this case, we're grabbing the 'pageTitle'
# field on all child route items.
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
pageTitle {
jsonValue
value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>ContentBlock"
},
{
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>Page"
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute"
},
{
"name": "JsonRendering"
Expand Down Expand Up @@ -180,13 +180,13 @@
},
{
"kind": "INTERFACE",
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>Page",
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute",
"possibleTypes": [
{
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>ExampleCustomRouteType"
},
{
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>Page"
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ query IntegratedDemoQuery($datasource: String!, $contextItem: String!, $language
# (as long as the GraphQLData helper is used)
contextItem: item(path: $contextItem, language: $language) {
id
# Get the page title from the page template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
# Get the page title from the app route template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
pageTitle {
value
}
Expand All @@ -56,7 +56,7 @@ query IntegratedDemoQuery($datasource: String!, $contextItem: String!, $language
# typing fragments can be used anywhere!
# so in this case, we're grabbing the 'pageTitle'
# field on all child route items.
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
pageTitle {
jsonValue
value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function addRoutesToManifest(manifest) {
const appTemplateSection = 'Page Metadata';

manifest.setDefaultRouteType({
name: '<%- helper.getAppPrefix(appPrefix, appName) %>Page',
name: '<%- helper.getAppPrefix(appPrefix, appName) %>App Route',
fields: [
{
name: 'pageTitle',
Expand All @@ -31,7 +31,7 @@ export default function addRoutesToManifest(manifest) {
type: CommonFieldTypes.SingleLineText,
},
],
insertOptions: ['<%- helper.getAppPrefix(appPrefix, appName) %>Page'],
insertOptions: ['<%- helper.getAppPrefix(appPrefix, appName) %>App Route'],
});

return mergeFs('./data/routes') // relative to process invocation (i.e. your package.json)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ query ConnectedDemoQuery($datasource: String!, $contextItem: String!, $language:
# $contextItem should be set to the ID of the current context item (the route item)
contextItem: item(path: $contextItem, language: $language) {
id
# Get the page title from the page template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
# Get the page title from the app route template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
pageTitle {
value
}
Expand All @@ -54,7 +54,7 @@ query ConnectedDemoQuery($datasource: String!, $contextItem: String!, $language:
# typing fragments can be used anywhere!
# so in this case, we're grabbing the 'pageTitle'
# field on all child route items.
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
pageTitle {
jsonValue
value
Expand Down
Loading

0 comments on commit 666329d

Please sign in to comment.