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

Rename "App Route" to "Page" #1159

Merged
merged 2 commits into from
Sep 21, 2022
Merged
Changes from 1 commit
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
Next Next commit
Rename "App Route" to "Page"
illiakovalenko committed Sep 16, 2022

Verified

This commit was signed with the committer’s verified signature. The key has expired.
s3krit s3krit
commit ff6e6c14de9b9d72275b92fece47e318fa281091
Original file line number Diff line number Diff line change
@@ -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 app route template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
# Get the page title from the page template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
pageTitle {
value
}
@@ -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) %>AppRoute {
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
pageTitle {
jsonValue
value
Original file line number Diff line number Diff line change
@@ -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) %>App Route',
name: '<%- helper.getAppPrefix(appPrefix, appName) %>Page',
fields: [
{
name: 'pageTitle',
@@ -25,7 +25,7 @@ export default function addRoutesToManifest(manifest: Manifest): Promise<void> {
type: CommonFieldTypes.SingleLineText,
},
],
insertOptions: ['<%- helper.getAppPrefix(appPrefix, appName) %>App Route'],
insertOptions: ['<%- helper.getAppPrefix(appPrefix, appName) %>Page'],
});

return mergeFs('./data/routes') // relative to process invocation (i.e. your package.json)
Original file line number Diff line number Diff line change
@@ -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 app route template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
# Get the page title from the page template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
pageTitle {
value
}
@@ -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) %>AppRoute {
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
pageTitle {
jsonValue
value
Original file line number Diff line number Diff line change
@@ -153,7 +153,7 @@ export default {
name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>ContentBlock',
},
{
name: 'C__<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute',
name: 'C__<%- helper.getAppPrefix(appPrefix, appName, false) %>Page',
},
{
name: 'JsonRendering',
@@ -192,13 +192,13 @@ export default {
},
{
kind: 'INTERFACE',
name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute',
name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>Page',
possibleTypes: [
{
name: '<%- helper.getAppPrefix(appPrefix, appName, false) %>ExampleCustomRouteType',
},
{
name: 'C__<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute',
name: 'C__<%- helper.getAppPrefix(appPrefix, appName, false) %>Page',
},
],
},
Original file line number Diff line number Diff line change
@@ -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 app route template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
# Get the page title from the page template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
pageTitle {
value
}
@@ -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) %>AppRoute {
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
pageTitle {
jsonValue
value
Original file line number Diff line number Diff line change
@@ -24,8 +24,8 @@ export default function addRoutesToManifest(manifest: Manifest): Promise<void> {
const appTemplateSection = 'Page Metadata';

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

return mergeFs('./data/routes') // relative to process invocation (i.e. your package.json)
Original file line number Diff line number Diff line change
@@ -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 app route template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
# Get the page title from the page template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
pageTitle {
value
}
@@ -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) %>AppRoute {
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
pageTitle {
jsonValue
value
Original file line number Diff line number Diff line change
@@ -12,14 +12,14 @@ import {
import NextLink from 'next/link';
import {
ConnectedDemoQueryDocument,
<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute as AppRoute,
<%- helper.getAppPrefix(appPrefix, appName, false) %>Page as Page,
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 RouteItem = AppRoute & Item;
type RouteItem = Page & Item;
illiakovalenko marked this conversation as resolved.
Show resolved Hide resolved

type GraphQLConnectedDemoData = {
datasource: GrapQLConnectedDemoDatasource;
Original file line number Diff line number Diff line change
@@ -2179,7 +2179,7 @@
},
{
"kind": "OBJECT",
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute",
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>Page",
"ofType": null
},
{
@@ -17760,7 +17760,7 @@
"interfaces": [
{
"kind": "INTERFACE",
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute",
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>Page",
"ofType": null
},
{
@@ -18219,8 +18219,8 @@
},
{
"kind": "OBJECT",
"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.",
"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.",
"fields": [
{
"name": "ancestors",
@@ -18643,7 +18643,7 @@
"interfaces": [
{
"kind": "INTERFACE",
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute",
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>Page",
"ofType": null
},
{
@@ -21496,8 +21496,8 @@
},
{
"kind": "INTERFACE",
"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.",
"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.",
"fields": [
{
"name": "pageTitle",
@@ -21523,7 +21523,7 @@
},
{
"kind": "OBJECT",
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute",
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>Page",
"ofType": null
}
]
Original file line number Diff line number Diff line change
@@ -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 app route template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
# Get the page title from the page template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
pageTitle {
value
}
@@ -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) %>AppRoute {
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
pageTitle {
jsonValue
value
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ export default function addRoutesToManifest(manifest) {
const appTemplateSection = 'Page Metadata';

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

return mergeFs('./data/routes') // relative to process invocation (i.e. your package.json)
Original file line number Diff line number Diff line change
@@ -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 app route template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
# Get the page title from the page template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
pageTitle {
value
}
@@ -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) %>AppRoute {
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
pageTitle {
jsonValue
value
Original file line number Diff line number Diff line change
@@ -141,7 +141,7 @@
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>ContentBlock"
},
{
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute"
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>Page"
},
{
"name": "JsonRendering"
@@ -180,13 +180,13 @@
},
{
"kind": "INTERFACE",
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute",
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>Page",
"possibleTypes": [
{
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>ExampleCustomRouteType"
},
{
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute"
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>Page"
}
]
},
Original file line number Diff line number Diff line change
@@ -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 app route template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
# Get the page title from the page template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
pageTitle {
value
}
@@ -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) %>AppRoute {
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
pageTitle {
jsonValue
value
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ export default function addRoutesToManifest(manifest) {
const appTemplateSection = 'Page Metadata';

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

return mergeFs('./data/routes') // relative to process invocation (i.e. your package.json)
Original file line number Diff line number Diff line change
@@ -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 app route template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute {
# Get the page title from the page template
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
pageTitle {
value
}
@@ -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) %>AppRoute {
...on <%- helper.getAppPrefix(appPrefix, appName, false) %>Page {
pageTitle {
jsonValue
value
Original file line number Diff line number Diff line change
@@ -144,7 +144,7 @@
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>ContentBlock"
},
{
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute"
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>Page"
},
{
"name": "JsonRendering"
@@ -246,13 +246,13 @@
},
{
"kind": "INTERFACE",
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute",
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>Page",
"possibleTypes": [
{
"name": "<%- helper.getAppPrefix(appPrefix, appName, false) %>ExampleCustomRouteType"
},
{
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>AppRoute"
"name": "C__<%- helper.getAppPrefix(appPrefix, appName, false) %>Page"
}
]
},