Skip to content

Commit

Permalink
chore: update getting_started icon and remove empty paragraph (#778)
Browse files Browse the repository at this point in the history
* chore: update getting_started icon and remove empty paragraph

* fix: get_user_default_workspace test
  • Loading branch information
LucasXu0 authored Sep 3, 2024
1 parent 365c64c commit cf1bae3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion libs/workspace-template/assets/mobile_guide.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"type": "heading",
"data": { "level": 3, "delta": [{ "insert": "Adding content" }] }
},
{ "type": "paragraph", "data": { "delta": [] } },
{
"type": "todo_list",
"data": {
Expand Down
10 changes: 5 additions & 5 deletions libs/workspace-template/src/document/getting_started.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use crate::{gen_view_id, TemplateData, TemplateObjectId, WorkspaceTemplate};
// |-- Getting started (document)
// |-- Desktop guide (document)
// |-- Mobile guide (document)
// |-- To-Dos (board)
// |-- To-dos (board)
// |-- Shared (space)
// |-- ... (empty)
// Note: Update the folder structure above if you changed the code below
Expand Down Expand Up @@ -195,7 +195,7 @@ impl GettingStartedTemplate {
// getting started view
let mut view_builder = view_builder
.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_view_id(getting_started_view_uuid);

Expand Down Expand Up @@ -272,8 +272,8 @@ impl WorkspaceTemplate for GettingStartedTemplate {

let mut builder = workspace_view_builder.write().await;

// 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
// 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 contains 2 sub views: Desktop guide, Mobile guide
builder
.with_view_builder(|view_builder| async {
Expand Down Expand Up @@ -301,7 +301,7 @@ impl WorkspaceTemplate for GettingStartedTemplate {
let child_view_builder = child_view_builder
.with_layout(ViewLayout::Board)
.with_view_id(todos_view_uuid.clone())
.with_name("To-Dos")
.with_name("To-dos")
.with_icon("✅");
child_view_builder.build()
}
Expand Down
8 changes: 4 additions & 4 deletions tests/workspace/default_user_workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async fn get_document_collab_from_remote(
// |-- Getting started (document)
// |-- Desktop guide (document)
// |-- Mobile guide (document)
// |-- To-Dos (board)
// |-- To-dos (board)
// |-- Shared (space)
// |-- ... (empty)
#[tokio::test]
Expand Down Expand Up @@ -75,7 +75,7 @@ async fn get_user_default_workspace_test() {
getting_started_view.icon,
Some(ViewIcon {
ty: IconType::Emoji,
value: "⭐️".to_string()
value: "🌟".to_string()
})
);

Expand Down Expand Up @@ -121,13 +121,13 @@ async fn get_user_default_workspace_test() {
)
.await;
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
{
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.icon,
Expand Down

0 comments on commit cf1bae3

Please sign in to comment.