chore: update getting_started icon and remove empty paragraph (#778)
* chore: update getting_started icon and remove empty paragraph * fix: get_user_default_workspace test
This commit is contained in:
parent
365c64c5c2
commit
cf1bae3ccb
|
|
@ -5,7 +5,6 @@
|
||||||
"type": "heading",
|
"type": "heading",
|
||||||
"data": { "level": 3, "delta": [{ "insert": "Adding content" }] }
|
"data": { "level": 3, "delta": [{ "insert": "Adding content" }] }
|
||||||
},
|
},
|
||||||
{ "type": "paragraph", "data": { "delta": [] } },
|
|
||||||
{
|
{
|
||||||
"type": "todo_list",
|
"type": "todo_list",
|
||||||
"data": {
|
"data": {
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ use crate::{gen_view_id, TemplateData, TemplateObjectId, WorkspaceTemplate};
|
||||||
// |-- Getting started (document)
|
// |-- Getting started (document)
|
||||||
// |-- Desktop guide (document)
|
// |-- Desktop guide (document)
|
||||||
// |-- Mobile guide (document)
|
// |-- Mobile guide (document)
|
||||||
// |-- To-Dos (board)
|
// |-- To-dos (board)
|
||||||
// |-- Shared (space)
|
// |-- Shared (space)
|
||||||
// |-- ... (empty)
|
// |-- ... (empty)
|
||||||
// Note: Update the folder structure above if you changed the code below
|
// Note: Update the folder structure above if you changed the code below
|
||||||
|
|
@ -195,7 +195,7 @@ impl GettingStartedTemplate {
|
||||||
// getting started view
|
// getting started view
|
||||||
let mut view_builder = view_builder
|
let mut view_builder = view_builder
|
||||||
.with_name("Getting started")
|
.with_name("Getting started")
|
||||||
.with_icon("⭐️")
|
.with_icon("🌟")
|
||||||
.with_extra(r#"{"font_layout":"normal","line_height_layout":"normal","cover":{"type":"gradient","value":"appflowy_them_color_gradient4"},"font":null}"#)
|
.with_extra(r#"{"font_layout":"normal","line_height_layout":"normal","cover":{"type":"gradient","value":"appflowy_them_color_gradient4"},"font":null}"#)
|
||||||
.with_view_id(getting_started_view_uuid);
|
.with_view_id(getting_started_view_uuid);
|
||||||
|
|
||||||
|
|
@ -272,8 +272,8 @@ impl WorkspaceTemplate for GettingStartedTemplate {
|
||||||
|
|
||||||
let mut builder = workspace_view_builder.write().await;
|
let mut builder = workspace_view_builder.write().await;
|
||||||
|
|
||||||
// Create general space with 2 built-in views: Getting started, To-Dos
|
// Create general space with 2 built-in views: Getting started, To-dos
|
||||||
// The Getting started view is a document view, and the To-Dos view is a board view
|
// The Getting started view is a document view, and the To-dos view is a board view
|
||||||
// The Getting started view contains 2 sub views: Desktop guide, Mobile guide
|
// The Getting started view contains 2 sub views: Desktop guide, Mobile guide
|
||||||
builder
|
builder
|
||||||
.with_view_builder(|view_builder| async {
|
.with_view_builder(|view_builder| async {
|
||||||
|
|
@ -301,7 +301,7 @@ impl WorkspaceTemplate for GettingStartedTemplate {
|
||||||
let child_view_builder = child_view_builder
|
let child_view_builder = child_view_builder
|
||||||
.with_layout(ViewLayout::Board)
|
.with_layout(ViewLayout::Board)
|
||||||
.with_view_id(todos_view_uuid.clone())
|
.with_view_id(todos_view_uuid.clone())
|
||||||
.with_name("To-Dos")
|
.with_name("To-dos")
|
||||||
.with_icon("✅");
|
.with_icon("✅");
|
||||||
child_view_builder.build()
|
child_view_builder.build()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ async fn get_document_collab_from_remote(
|
||||||
// |-- Getting started (document)
|
// |-- Getting started (document)
|
||||||
// |-- Desktop guide (document)
|
// |-- Desktop guide (document)
|
||||||
// |-- Mobile guide (document)
|
// |-- Mobile guide (document)
|
||||||
// |-- To-Dos (board)
|
// |-- To-dos (board)
|
||||||
// |-- Shared (space)
|
// |-- Shared (space)
|
||||||
// |-- ... (empty)
|
// |-- ... (empty)
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
|
|
@ -75,7 +75,7 @@ async fn get_user_default_workspace_test() {
|
||||||
getting_started_view.icon,
|
getting_started_view.icon,
|
||||||
Some(ViewIcon {
|
Some(ViewIcon {
|
||||||
ty: IconType::Emoji,
|
ty: IconType::Emoji,
|
||||||
value: "⭐️".to_string()
|
value: "🌟".to_string()
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -121,13 +121,13 @@ async fn get_user_default_workspace_test() {
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
let mobile_guide_document_data = mobile_guide_document.get_document_data().unwrap();
|
let mobile_guide_document_data = mobile_guide_document.get_document_data().unwrap();
|
||||||
assert_eq!(mobile_guide_document_data.blocks.len(), 34);
|
assert_eq!(mobile_guide_document_data.blocks.len(), 33);
|
||||||
}
|
}
|
||||||
|
|
||||||
// the second view is the to-dos board, and contains 0 sub views
|
// the second view is the to-dos board, and contains 0 sub views
|
||||||
{
|
{
|
||||||
let to_dos_view = general_space_views[1].clone();
|
let to_dos_view = general_space_views[1].clone();
|
||||||
assert_eq!(to_dos_view.name, "To-Dos");
|
assert_eq!(to_dos_view.name, "To-dos");
|
||||||
assert_eq!(to_dos_view.layout, ViewLayout::Board);
|
assert_eq!(to_dos_view.layout, ViewLayout::Board);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
to_dos_view.icon,
|
to_dos_view.icon,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue