mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 11:58:41 +00:00
Merge pull request #219 from toeverything/feat/update-get-started-template
feat: update Get Started template
This commit is contained in:
@@ -4,11 +4,11 @@ describe('ligo-virgo', () => {
|
||||
beforeEach(() => cy.visit('/'));
|
||||
|
||||
it('basic load check', () => {
|
||||
getTitle().contains('Get Started with AFFiNE');
|
||||
getTitle().contains('👋 Get Started with AFFINE');
|
||||
|
||||
cy.get('.block_container').contains('The Essentials');
|
||||
|
||||
getBoard().click();
|
||||
cy.get('.tl-inner-div').contains('Graduating');
|
||||
cy.get('.tl-inner-div').contains('The Essentials');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -22,8 +22,8 @@ export function WorkspaceHome() {
|
||||
workspace_id,
|
||||
user_initial_page_id,
|
||||
TemplateFactory.generatePageTemplateByGroupKeys({
|
||||
name: null,
|
||||
groupKeys: ['todolist'],
|
||||
name: '👋 Get Started with AFFINE',
|
||||
groupKeys: ['getStartedGroup0', 'getStartedGroup1'],
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,197 @@
|
||||
{
|
||||
"type": "group",
|
||||
"properties": {
|
||||
"metaProps": [
|
||||
{
|
||||
"id": "JaBsu39eY_tAWjJM",
|
||||
"type": "information",
|
||||
"name": "Information#XvIJ",
|
||||
"emailOptions": [
|
||||
{
|
||||
"id": "flJIydQpaSqr9Mvc",
|
||||
"name": "Email",
|
||||
"color": "#8f4400",
|
||||
"background": "#ffcca7",
|
||||
"iconName": "email"
|
||||
}
|
||||
],
|
||||
"phoneOptions": [
|
||||
{
|
||||
"id": "DODf7wtotk-n_-sH",
|
||||
"name": "Phone",
|
||||
"color": "#263486",
|
||||
"background": "#c3dbff",
|
||||
"iconName": "phone"
|
||||
}
|
||||
],
|
||||
"locationOptions": [
|
||||
{
|
||||
"id": "aYqpJse4RX2n2tuq",
|
||||
"name": "Location",
|
||||
"color": "#263486",
|
||||
"background": "#c5f1f3",
|
||||
"iconName": "location"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "tgbUMhgz0yWEPfKj",
|
||||
"name": "Select#kWWx",
|
||||
"type": "select",
|
||||
"options": [
|
||||
{
|
||||
"id": "fIsk1MI2bCq5mtyE",
|
||||
"name": "Single Select",
|
||||
"color": "#896406",
|
||||
"background": "#FFF5AB",
|
||||
"iconName": "singleSelect"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "xZld2XD__Cojniv5",
|
||||
"name": "MultiSelect#tjdY",
|
||||
"type": "multiSelect",
|
||||
"options": [
|
||||
{
|
||||
"id": "pXKGBw3_mPXxXIwV",
|
||||
"name": "Multiple Select",
|
||||
"color": "#511AAB",
|
||||
"background": "#E3DEFF",
|
||||
"iconName": "multiSelect"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"blocks": [
|
||||
{
|
||||
"type": "heading1",
|
||||
"properties": {
|
||||
"text": {
|
||||
"value": [
|
||||
{
|
||||
"text": "The Essentials. Check things off in Text view"
|
||||
}
|
||||
]
|
||||
},
|
||||
"textStyle": {}
|
||||
},
|
||||
"blocks": []
|
||||
},
|
||||
{
|
||||
"type": "todo",
|
||||
"properties": {
|
||||
"text": {
|
||||
"value": [
|
||||
{
|
||||
"text": "Click anywhere and just start typing. Hit `/` to see all the types of content you can add - images, videos, figma files, code blocks, and more."
|
||||
}
|
||||
]
|
||||
},
|
||||
"textStyle": {},
|
||||
"collapsed": { "value": false }
|
||||
},
|
||||
"blocks": []
|
||||
},
|
||||
{
|
||||
"type": "todo",
|
||||
"properties": {
|
||||
"text": {
|
||||
"value": [
|
||||
{ "text": "Do you see the " },
|
||||
{ "text": "⋮", "inlinecode": true },
|
||||
{
|
||||
"text": " when you hover over the left of this checkbox? Click and drag the "
|
||||
},
|
||||
{ "text": "⋮", "inlinecode": true },
|
||||
{
|
||||
"text": " to move this block, and see more settings inside."
|
||||
}
|
||||
]
|
||||
},
|
||||
"textStyle": {},
|
||||
"collapsed": { "value": false }
|
||||
},
|
||||
"blocks": []
|
||||
},
|
||||
{
|
||||
"type": "todo",
|
||||
"properties": {
|
||||
"text": {
|
||||
"value": [
|
||||
{ "text": "Find the " },
|
||||
{ "text": "⋮⋮", "inlinecode": true },
|
||||
{
|
||||
"text": " button while hovering anywhere on this group. Click the "
|
||||
},
|
||||
{
|
||||
"text": "—— + Add New Group Here + ——",
|
||||
"inlinecode": true
|
||||
},
|
||||
{ "text": " divider to add a new group." }
|
||||
]
|
||||
},
|
||||
"textStyle": {},
|
||||
"collapsed": { "value": false }
|
||||
},
|
||||
"blocks": []
|
||||
},
|
||||
{
|
||||
"type": "todo",
|
||||
"properties": {
|
||||
"text": {
|
||||
"value": [
|
||||
{ "text": "Hover over the " },
|
||||
{ "text": "——————", "inlinecode": true },
|
||||
{
|
||||
"text": " button at the bottom of every block to evoke Tag App. Click on the "
|
||||
},
|
||||
{ "text": "+", "inlinecode": true },
|
||||
{
|
||||
"text": " button following the tagged labels to see more options - status, date, collaborators, text, information, multiple/single select... and you can can expect more options soon!"
|
||||
}
|
||||
]
|
||||
},
|
||||
"textStyle": {},
|
||||
"collapsed": { "value": false },
|
||||
"recastValues": {
|
||||
"JaBsu39eY_tAWjJM": {
|
||||
"id": "JaBsu39eY_tAWjJM",
|
||||
"type": "information",
|
||||
"value": {
|
||||
"email": ["flJIydQpaSqr9Mvc"],
|
||||
"phone": ["DODf7wtotk-n_-sH"],
|
||||
"location": ["aYqpJse4RX2n2tuq"]
|
||||
}
|
||||
},
|
||||
"tgbUMhgz0yWEPfKj": {
|
||||
"id": "tgbUMhgz0yWEPfKj",
|
||||
"type": "select",
|
||||
"value": "fIsk1MI2bCq5mtyE"
|
||||
},
|
||||
"xZld2XD__Cojniv5": {
|
||||
"id": "xZld2XD__Cojniv5",
|
||||
"type": "multiSelect",
|
||||
"value": ["pXKGBw3_mPXxXIwV"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"blocks": []
|
||||
},
|
||||
{
|
||||
"type": "todo",
|
||||
"properties": {
|
||||
"text": {
|
||||
"value": [
|
||||
{
|
||||
"text": "An incredible design! You can check your tasks in different views, switch between Text View and Kanban View on group menu. → try it out!"
|
||||
}
|
||||
]
|
||||
},
|
||||
"textStyle": {}
|
||||
},
|
||||
"blocks": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,200 @@
|
||||
{
|
||||
"type": "group",
|
||||
"properties": {
|
||||
"recastCurrentViewId": "vwjI_O0J2CEsHyMW",
|
||||
"metaProps": [
|
||||
{
|
||||
"id": "bNjVwBq8YLxvmvr7",
|
||||
"name": "Status#GVsG",
|
||||
"type": "status",
|
||||
"options": [
|
||||
{
|
||||
"id": "wusZ8Qht8rsmFD1s",
|
||||
"name": "No Started",
|
||||
"color": "#05683D",
|
||||
"background": "#C5FBE0",
|
||||
"iconName": "status"
|
||||
},
|
||||
{
|
||||
"id": "qLJFK5bqYhW8NLtQ",
|
||||
"name": "In Progress",
|
||||
"color": "#896406",
|
||||
"background": "#FFF5AB",
|
||||
"iconName": "status"
|
||||
},
|
||||
{
|
||||
"id": "u0ZgY0sRCnqMkxzn",
|
||||
"name": "Complete",
|
||||
"color": "#AF1212",
|
||||
"background": "#FFCECE",
|
||||
"iconName": "status"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "DfVMd-EXXO9-WZTO",
|
||||
"type": "date",
|
||||
"name": "Date#0neY",
|
||||
"background": "#6880FF",
|
||||
"color": "#fff",
|
||||
"iconName": "date"
|
||||
},
|
||||
{
|
||||
"id": "UgQQiv9D-72nRyYy",
|
||||
"type": "mention",
|
||||
"name": "Mention#Recx",
|
||||
"background": "#FFD568",
|
||||
"color": "#FFFFFF",
|
||||
"iconName": "collaborator"
|
||||
},
|
||||
{
|
||||
"id": "ICT1AlKCQkwYLjGs",
|
||||
"type": "text",
|
||||
"name": "Text#uObM",
|
||||
"background": "#67dcaa",
|
||||
"color": "#FFF",
|
||||
"iconName": "text"
|
||||
}
|
||||
],
|
||||
"recastViews": [
|
||||
{
|
||||
"id": "qJslh-HAKnf8gGV-",
|
||||
"name": "Text",
|
||||
"type": "page"
|
||||
},
|
||||
{
|
||||
"id": "vwjI_O0J2CEsHyMW",
|
||||
"name": "Kanban",
|
||||
"type": "kanban",
|
||||
"groupBy": "bNjVwBq8YLxvmvr7"
|
||||
}
|
||||
]
|
||||
},
|
||||
"blocks": [
|
||||
{
|
||||
"type": "text",
|
||||
"properties": {
|
||||
"text": {
|
||||
"value": [
|
||||
{
|
||||
"text": "You can customize a Kanban to fit your workflow. Such as by adding/removing columns or changing Tag App labels."
|
||||
}
|
||||
]
|
||||
},
|
||||
"textStyle": {}
|
||||
},
|
||||
"blocks": []
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"properties": {
|
||||
"text": {
|
||||
"value": [{ "text": "Add a Due Date to set a reminder" }]
|
||||
},
|
||||
"recastValues": {
|
||||
"bNjVwBq8YLxvmvr7": {
|
||||
"id": "bNjVwBq8YLxvmvr7",
|
||||
"type": "status",
|
||||
"value": "wusZ8Qht8rsmFD1s"
|
||||
},
|
||||
"DfVMd-EXXO9-WZTO": {
|
||||
"id": "DfVMd-EXXO9-WZTO",
|
||||
"type": "date",
|
||||
"value": 1660233600000
|
||||
}
|
||||
},
|
||||
"textStyle": {}
|
||||
},
|
||||
"blocks": []
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"properties": {
|
||||
"text": {
|
||||
"value": [{ "text": "Type @ to mention people" }]
|
||||
},
|
||||
"recastValues": {
|
||||
"bNjVwBq8YLxvmvr7": {
|
||||
"id": "bNjVwBq8YLxvmvr7",
|
||||
"type": "status",
|
||||
"value": "wusZ8Qht8rsmFD1s"
|
||||
},
|
||||
"UgQQiv9D-72nRyYy": {
|
||||
"id": "UgQQiv9D-72nRyYy",
|
||||
"type": "mention",
|
||||
"value": "AFFiNE"
|
||||
}
|
||||
},
|
||||
"textStyle": {}
|
||||
},
|
||||
"blocks": []
|
||||
},
|
||||
{
|
||||
"type": "todo",
|
||||
"properties": {
|
||||
"text": {
|
||||
"value": [
|
||||
{
|
||||
"text": "Check the box to complete the task!"
|
||||
}
|
||||
]
|
||||
},
|
||||
"recastValues": {
|
||||
"bNjVwBq8YLxvmvr7": {
|
||||
"id": "bNjVwBq8YLxvmvr7",
|
||||
"type": "status",
|
||||
"value": "qLJFK5bqYhW8NLtQ"
|
||||
}
|
||||
},
|
||||
"textStyle": {},
|
||||
"collapsed": { "value": false }
|
||||
},
|
||||
"blocks": [
|
||||
{
|
||||
"type": "todo",
|
||||
"properties": {
|
||||
"text": { "value": [{ "text": "Check 01" }] },
|
||||
"textStyle": {},
|
||||
"collapsed": { "value": false },
|
||||
"checked": { "value": true }
|
||||
},
|
||||
"blocks": []
|
||||
},
|
||||
{
|
||||
"type": "todo",
|
||||
"properties": {
|
||||
"text": { "value": [{ "text": "Check 02" }] },
|
||||
"textStyle": {}
|
||||
},
|
||||
"blocks": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"properties": {
|
||||
"text": {
|
||||
"value": [
|
||||
{
|
||||
"text": "The GroupBy button allows you to customise how you want your data grouped just utilize your preferred Tag App settings"
|
||||
}
|
||||
]
|
||||
},
|
||||
"recastValues": {
|
||||
"bNjVwBq8YLxvmvr7": {
|
||||
"id": "bNjVwBq8YLxvmvr7",
|
||||
"type": "status",
|
||||
"value": "u0ZgY0sRCnqMkxzn"
|
||||
},
|
||||
"ICT1AlKCQkwYLjGs": {
|
||||
"id": "ICT1AlKCQkwYLjGs",
|
||||
"type": "text",
|
||||
"value": "GroupBy others"
|
||||
}
|
||||
},
|
||||
"textStyle": {}
|
||||
},
|
||||
"blocks": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -3,14 +3,24 @@ import blogTemplate from './blog.json';
|
||||
import emptyTemplate from './empty.json';
|
||||
import gridTemplate from './grid.json';
|
||||
import todoTemplate from './todo.json';
|
||||
import getStartedGroup0 from './get-started-group0.json';
|
||||
import getStartedGroup1 from './get-started-group1.json';
|
||||
|
||||
export type GroupTemplateKeys = 'todolist' | 'blog' | 'empty' | 'grid';
|
||||
type GroupTemplateMap = Record<GroupTemplateKeys, GroupTemplate>;
|
||||
export type GroupTemplateKeys =
|
||||
| 'todolist'
|
||||
| 'blog'
|
||||
| 'empty'
|
||||
| 'grid'
|
||||
| 'getStartedGroup0'
|
||||
| 'getStartedGroup1';
|
||||
type GroupTemplateMap = Record<GroupTemplateKeys, any>;
|
||||
const groupTemplateMap = {
|
||||
empty: emptyTemplate,
|
||||
todolist: todoTemplate,
|
||||
blog: blogTemplate,
|
||||
grid: gridTemplate,
|
||||
getStartedGroup0,
|
||||
getStartedGroup1,
|
||||
} as GroupTemplateMap;
|
||||
|
||||
const defaultTemplateList: Array<TemplateMeta> = [
|
||||
|
||||
Reference in New Issue
Block a user