Collection-types help you manage several entries, Single-types are suitable to manage only one entry.
Ex: For a website, articles would be a Collection type and homepage would be a Single type.
', + }, + cta: { + title: { + id: 'app.components.GuidedTour.CTB.create.cta.title', + defaultMessage: 'Build a Collection-type', + }, + type: 'CLOSE', + }, + }, + success: { + title: { + id: 'app.components.GuidedTour.CTB.success.title', + defaultMessage: 'Step 1: Completed ✅', + }, + content: { + id: 'app.components.GuidedTour.CTB.success.content', + defaultMessage: 'Good going!
What would you like to share with the world? ⚡️', + }, + cta: { + title: { + id: 'app.components.GuidedTour.CTB.success.cta.title', + defaultMessage: 'Create sample content', + }, + type: 'REDIRECT', + target: '/content-manager', + }, + }, + }, + contentManager: { + home: { + title: { + id: 'app.components.GuidedTour.home.CM.title', + defaultMessage: '⚡️ What would you like to share with the world?', + }, + cta: { + title: { + id: 'app.components.GuidedTour.home.CM.cta.title', + defaultMessage: 'Create sample data', + }, + type: 'REDIRECT', + target: '/content-manager', + }, + }, + create: { + title: { + id: 'app.components.GuidedTour.CM.create.title', + defaultMessage: 'Create sample content', + }, + content: { + id: 'app.components.GuidedTour.CM.create.content', + defaultMessage: + 'Create and manage all the content here in the Content Manager.
Ex: Taking the blog website example further, one can write an article, save and publish it as they like.
', + }, + cta: { + title: { + id: 'app.components.GuidedTour.CM.create.ctaTitle', + defaultMessage: 'Create sample content', + }, + type: 'CLOSE', + }, + }, + success: { + title: { + id: 'app.components.GuidedTour.CM.success.title', + defaultMessage: 'Step 2: Completed ✅', + }, + content: { + id: 'app.components.GuidedTour.CM.success.content', + defaultMessage: 'Awesome, one last step to go!
🚀 See content in action', + }, + cta: { + title: { + id: 'app.components.GuidedTour.CM.success.cta.title', + defaultMessage: 'Test the API', + }, + type: 'REDIRECT', + target: '/settings/api-tokens', + }, + }, + }, + apiTokens: { + home: { + title: { + id: 'app.components.GuidedTour.home.apiTokens.title', + defaultMessage: '🚀 See content in action', + }, + cta: { + title: { + id: 'app.components.GuidedTour.home.apiTokens.cta.title', + defaultMessage: 'Test the API', + }, + type: 'REDIRECT', + target: '/content-manager', + }, + }, + create: { + title: { + id: 'app.components.GuidedTour.apiTokens.create.title', + defaultMessage: 'See content in action', + }, + content: { + id: 'app.components.GuidedTour.apiTokens.create.content', + defaultMessage: + 'Generate an authentication token here and retrieve the content you just created', + }, + cta: { + title: { + id: 'app.components.GuidedTour.apiTokens.create.cta.title', + defaultMessage: 'Create sample content', + }, + type: 'CLOSE', + }, + }, + success: { + title: { + id: 'app.components.GuidedTour.apiTokens.success.title', + defaultMessage: 'Step 3: Completed ✅', + }, + content: { + id: 'app.components.GuidedTour.apiTokens.success.content', + defaultMessage: 'You successfully finished the guided tour.', + }, + cta: { + title: { + id: 'app.components.GuidedTour.apiTokens.success.cta.title', + defaultMessage: 'Go back to homepage', + }, + type: 'REDIRECT', + target: '/', + }, + }, + }, +}; + +export default layout; diff --git a/packages/core/admin/admin/src/components/GuidedTour/reducer.js b/packages/core/admin/admin/src/components/GuidedTour/reducer.js index 3bed887b01..37fa172dda 100644 --- a/packages/core/admin/admin/src/components/GuidedTour/reducer.js +++ b/packages/core/admin/admin/src/components/GuidedTour/reducer.js @@ -3,6 +3,20 @@ import produce from 'immer'; export const initialState = { currentStep: null, + guidedTourState: { + contentTypeBuilder: { + create: false, + success: false, + }, + contentManager: { + create: false, + success: false, + }, + apiTokens: { + create: false, + success: false, + }, + }, }; const reducer = (state = initialState, action) => diff --git a/packages/core/admin/admin/src/translations/en.json b/packages/core/admin/admin/src/translations/en.json index 8dff8a2553..921c7fa750 100644 --- a/packages/core/admin/admin/src/translations/en.json +++ b/packages/core/admin/admin/src/translations/en.json @@ -232,6 +232,30 @@ "Users.components.List.empty.withFilters": "There is no users with the applied filters...", "Users.components.List.empty.withSearch": "There is no users corresponding to the search ({search})...", "anErrorOccurred": "Woops! Something went wrong. Please, try again.", + "app.components.GuidedTour.home.CTB.title": "Build the content structure", + "app.components.GuidedTour.home.CTB.cta.title": "Go to the Content-type Builder", + "app.components.GuidedTour.CTB.create.title": "Create a first Collection-type", + "app.components.GuidedTour.CTB.create.content": "Collection-types help you manage several entries, Single-types are suitable to manage only one entry.
Ex: For a website, articles would be a Collection type and homepage would be a Single type.
", + "app.components.GuidedTour.CTB.create.cta.title": "Build a Collection-type", + "app.components.GuidedTour.CTB.success.title": "Step 1: Completed ✅", + "app.components.GuidedTour.CTB.success.content": "Good going!
What would you like to share with the world? ⚡️", + "app.components.GuidedTour.CTB.success.cta.title": "Create sample content", + "app.components.GuidedTour.home.CM.title": "⚡️ What would you like to share with the world?", + "app.components.GuidedTour.home.CM.cta.title": "Create sample data", + "app.components.GuidedTour.CM.create.title": "Create sample content", + "app.components.GuidedTour.CM.create.content": "Create and manage all the content here in the Content Manager.
Ex: Taking the blog website example further, one can write an article, save and publish it as they like.
", + "app.components.GuidedTour.CM.create.ctaTitle": "Create sample content", + "app.components.GuidedTour.CM.success.title": "Step 2: Completed ✅", + "app.components.GuidedTour.CM.success.content": "Awesome, one last step to go!
🚀 See content in action", + "app.components.GuidedTour.CM.success.cta.title": "Test the API", + "app.components.GuidedTour.home.apiTokens.title": "🚀 See content in action", + "app.components.GuidedTour.home.apiTokens.cta.title": "Test the API", + "app.components.GuidedTour.apiTokens.create.title": "See content in action", + "app.components.GuidedTour.apiTokens.create.content": "Generate an authentication token here and retrieve the content you just created", + "app.components.GuidedTour.apiTokens.create.cta.title": "Create sample content", + "app.components.GuidedTour.apiTokens.success.title": "Step 3: Completed ✅", + "app.components.GuidedTour.apiTokens.success.content": "You successfully finished the guided tour.", + "app.components.GuidedTour.apiTokens.success.cta.title": "Go back to homepage", "app.component.CopyToClipboard.label": "Copy to clipboard", "app.component.search.label": "Search for {target}", "app.component.table.delete": "Delete {target}", diff --git a/packages/core/helper-plugin/lib/src/providers/GuidedTourProvider/index.js b/packages/core/helper-plugin/lib/src/providers/GuidedTourProvider/index.js index 61a5b47253..c1ed815a35 100644 --- a/packages/core/helper-plugin/lib/src/providers/GuidedTourProvider/index.js +++ b/packages/core/helper-plugin/lib/src/providers/GuidedTourProvider/index.js @@ -7,9 +7,9 @@ import React from 'react'; import PropTypes from 'prop-types'; import GuidedTourContext from '../../contexts/GuidedTourContext'; -const GuidedTourProvider = ({ children, currentStep, setStep }) => { +const GuidedTourProvider = ({ children, currentStep, setStep, guidedTourState }) => { return ( -