From 172f82f10140139725a0ae9b7070ab35fe730feb Mon Sep 17 00:00:00 2001 From: Richard Shiue <71320345+richardshiue@users.noreply.github.com> Date: Wed, 20 Mar 2024 22:49:01 +0800 Subject: [PATCH 1/3] chore: improve link between folder and database --- frontend/appflowy_tauri/src-tauri/Cargo.lock | 14 +-- frontend/appflowy_tauri/src-tauri/Cargo.toml | 14 +-- frontend/appflowy_web/wasm-libs/Cargo.toml | 14 +-- frontend/rust-lib/Cargo.lock | 14 +-- frontend/rust-lib/Cargo.toml | 14 +-- .../rust-lib/flowy-database2/src/manager.rs | 21 +++- .../src/services/database_view/view_editor.rs | 4 +- .../src/services/share/csv/import.rs | 31 +++--- .../rust-lib/flowy-database2/src/template.rs | 96 ++++++++++++------- 9 files changed, 136 insertions(+), 86 deletions(-) diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.lock b/frontend/appflowy_tauri/src-tauri/Cargo.lock index a004673c502eb..2b8fea078363d 100644 --- a/frontend/appflowy_tauri/src-tauri/Cargo.lock +++ b/frontend/appflowy_tauri/src-tauri/Cargo.lock @@ -832,7 +832,7 @@ dependencies = [ [[package]] name = "collab" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ab468ea96a15863d1e792ea4bed3a8769f3ea8a7#ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a0d3c6f8ab5ff45168daf07de09861a0b93e882c#a0d3c6f8ab5ff45168daf07de09861a0b93e882c" dependencies = [ "anyhow", "async-trait", @@ -856,7 +856,7 @@ dependencies = [ [[package]] name = "collab-database" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ab468ea96a15863d1e792ea4bed3a8769f3ea8a7#ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a0d3c6f8ab5ff45168daf07de09861a0b93e882c#a0d3c6f8ab5ff45168daf07de09861a0b93e882c" dependencies = [ "anyhow", "async-trait", @@ -886,7 +886,7 @@ dependencies = [ [[package]] name = "collab-document" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ab468ea96a15863d1e792ea4bed3a8769f3ea8a7#ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a0d3c6f8ab5ff45168daf07de09861a0b93e882c#a0d3c6f8ab5ff45168daf07de09861a0b93e882c" dependencies = [ "anyhow", "collab", @@ -905,7 +905,7 @@ dependencies = [ [[package]] name = "collab-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ab468ea96a15863d1e792ea4bed3a8769f3ea8a7#ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a0d3c6f8ab5ff45168daf07de09861a0b93e882c#a0d3c6f8ab5ff45168daf07de09861a0b93e882c" dependencies = [ "anyhow", "bytes", @@ -920,7 +920,7 @@ dependencies = [ [[package]] name = "collab-folder" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ab468ea96a15863d1e792ea4bed3a8769f3ea8a7#ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a0d3c6f8ab5ff45168daf07de09861a0b93e882c#a0d3c6f8ab5ff45168daf07de09861a0b93e882c" dependencies = [ "anyhow", "chrono", @@ -958,7 +958,7 @@ dependencies = [ [[package]] name = "collab-plugins" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ab468ea96a15863d1e792ea4bed3a8769f3ea8a7#ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a0d3c6f8ab5ff45168daf07de09861a0b93e882c#a0d3c6f8ab5ff45168daf07de09861a0b93e882c" dependencies = [ "anyhow", "async-stream", @@ -1035,7 +1035,7 @@ dependencies = [ [[package]] name = "collab-user" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ab468ea96a15863d1e792ea4bed3a8769f3ea8a7#ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a0d3c6f8ab5ff45168daf07de09861a0b93e882c#a0d3c6f8ab5ff45168daf07de09861a0b93e882c" dependencies = [ "anyhow", "collab", diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.toml b/frontend/appflowy_tauri/src-tauri/Cargo.toml index 4c20268d7a3b8..fde1a488d27a5 100644 --- a/frontend/appflowy_tauri/src-tauri/Cargo.toml +++ b/frontend/appflowy_tauri/src-tauri/Cargo.toml @@ -95,10 +95,10 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "082 # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" } -collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" } -collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" } -collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" } -collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" } -collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" } -collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" } +collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a0d3c6f8ab5ff45168daf07de09861a0b93e882c" } +collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a0d3c6f8ab5ff45168daf07de09861a0b93e882c" } +collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a0d3c6f8ab5ff45168daf07de09861a0b93e882c" } +collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a0d3c6f8ab5ff45168daf07de09861a0b93e882c" } +collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a0d3c6f8ab5ff45168daf07de09861a0b93e882c" } +collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a0d3c6f8ab5ff45168daf07de09861a0b93e882c" } +collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a0d3c6f8ab5ff45168daf07de09861a0b93e882c" } diff --git a/frontend/appflowy_web/wasm-libs/Cargo.toml b/frontend/appflowy_web/wasm-libs/Cargo.toml index f3490d69e60ab..011277d3d23fd 100644 --- a/frontend/appflowy_web/wasm-libs/Cargo.toml +++ b/frontend/appflowy_web/wasm-libs/Cargo.toml @@ -65,10 +65,10 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "082 # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" } -collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" } -collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" } -collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" } -collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" } -collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" } -collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" } +collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a0d3c6f8ab5ff45168daf07de09861a0b93e882c" } +collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a0d3c6f8ab5ff45168daf07de09861a0b93e882c" } +collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a0d3c6f8ab5ff45168daf07de09861a0b93e882c" } +collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a0d3c6f8ab5ff45168daf07de09861a0b93e882c" } +collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a0d3c6f8ab5ff45168daf07de09861a0b93e882c" } +collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a0d3c6f8ab5ff45168daf07de09861a0b93e882c" } +collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a0d3c6f8ab5ff45168daf07de09861a0b93e882c" } diff --git a/frontend/rust-lib/Cargo.lock b/frontend/rust-lib/Cargo.lock index 6669ea24dc69e..f5605238dbd94 100644 --- a/frontend/rust-lib/Cargo.lock +++ b/frontend/rust-lib/Cargo.lock @@ -758,7 +758,7 @@ dependencies = [ [[package]] name = "collab" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ab468ea96a15863d1e792ea4bed3a8769f3ea8a7#ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a0d3c6f8ab5ff45168daf07de09861a0b93e882c#a0d3c6f8ab5ff45168daf07de09861a0b93e882c" dependencies = [ "anyhow", "async-trait", @@ -782,7 +782,7 @@ dependencies = [ [[package]] name = "collab-database" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ab468ea96a15863d1e792ea4bed3a8769f3ea8a7#ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a0d3c6f8ab5ff45168daf07de09861a0b93e882c#a0d3c6f8ab5ff45168daf07de09861a0b93e882c" dependencies = [ "anyhow", "async-trait", @@ -812,7 +812,7 @@ dependencies = [ [[package]] name = "collab-document" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ab468ea96a15863d1e792ea4bed3a8769f3ea8a7#ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a0d3c6f8ab5ff45168daf07de09861a0b93e882c#a0d3c6f8ab5ff45168daf07de09861a0b93e882c" dependencies = [ "anyhow", "collab", @@ -831,7 +831,7 @@ dependencies = [ [[package]] name = "collab-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ab468ea96a15863d1e792ea4bed3a8769f3ea8a7#ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a0d3c6f8ab5ff45168daf07de09861a0b93e882c#a0d3c6f8ab5ff45168daf07de09861a0b93e882c" dependencies = [ "anyhow", "bytes", @@ -846,7 +846,7 @@ dependencies = [ [[package]] name = "collab-folder" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ab468ea96a15863d1e792ea4bed3a8769f3ea8a7#ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a0d3c6f8ab5ff45168daf07de09861a0b93e882c#a0d3c6f8ab5ff45168daf07de09861a0b93e882c" dependencies = [ "anyhow", "chrono", @@ -884,7 +884,7 @@ dependencies = [ [[package]] name = "collab-plugins" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ab468ea96a15863d1e792ea4bed3a8769f3ea8a7#ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a0d3c6f8ab5ff45168daf07de09861a0b93e882c#a0d3c6f8ab5ff45168daf07de09861a0b93e882c" dependencies = [ "anyhow", "async-stream", @@ -961,7 +961,7 @@ dependencies = [ [[package]] name = "collab-user" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ab468ea96a15863d1e792ea4bed3a8769f3ea8a7#ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a0d3c6f8ab5ff45168daf07de09861a0b93e882c#a0d3c6f8ab5ff45168daf07de09861a0b93e882c" dependencies = [ "anyhow", "collab", diff --git a/frontend/rust-lib/Cargo.toml b/frontend/rust-lib/Cargo.toml index 13a1f8c6d4e4c..173f2248edc0f 100644 --- a/frontend/rust-lib/Cargo.toml +++ b/frontend/rust-lib/Cargo.toml @@ -119,10 +119,10 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "082 # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" } -collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" } -collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" } -collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" } -collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" } -collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" } -collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ab468ea96a15863d1e792ea4bed3a8769f3ea8a7" } +collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a0d3c6f8ab5ff45168daf07de09861a0b93e882c" } +collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a0d3c6f8ab5ff45168daf07de09861a0b93e882c" } +collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a0d3c6f8ab5ff45168daf07de09861a0b93e882c" } +collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a0d3c6f8ab5ff45168daf07de09861a0b93e882c" } +collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a0d3c6f8ab5ff45168daf07de09861a0b93e882c" } +collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a0d3c6f8ab5ff45168daf07de09861a0b93e882c" } +collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a0d3c6f8ab5ff45168daf07de09861a0b93e882c" } diff --git a/frontend/rust-lib/flowy-database2/src/manager.rs b/frontend/rust-lib/flowy-database2/src/manager.rs index 4928b42378e9e..d7bd09f9e9273 100644 --- a/frontend/rust-lib/flowy-database2/src/manager.rs +++ b/frontend/rust-lib/flowy-database2/src/manager.rs @@ -274,7 +274,7 @@ impl DatabaseManager { pub async fn duplicate_database(&self, view_id: &str) -> FlowyResult> { let wdb = self.get_workspace_database().await?; - let data = wdb.get_database_duplicated_data(view_id).await?; + let data = wdb.get_database_data(view_id).await?; let json_bytes = data.to_json_bytes()?; Ok(json_bytes) } @@ -286,11 +286,22 @@ impl DatabaseManager { view_id: &str, data: Vec, ) -> FlowyResult<()> { - let mut database_data = DatabaseData::from_json_bytes(data)?; - database_data.view.id = view_id.to_string(); + let database_data = DatabaseData::from_json_bytes(data)?; + + let mut create_database_params = CreateDatabaseParams::from_database_data(database_data); + let old_view_id = create_database_params.inline_view_id.clone(); + create_database_params.inline_view_id = view_id.to_string(); + + if let Some(create_view_params) = create_database_params + .views + .iter_mut() + .find(|view| view.view_id == old_view_id) + { + create_view_params.view_id = view_id.to_string(); + } let wdb = self.get_workspace_database().await?; - let _ = wdb.create_database_with_data(database_data)?; + let _ = wdb.create_database(create_database_params)?; Ok(()) } @@ -338,7 +349,7 @@ impl DatabaseManager { .map_err(internal_error)??; let result = ImportResult { database_id: params.database_id.clone(), - view_id: params.view_id.clone(), + view_id: params.inline_view_id.clone(), }; self.create_database_with_params(params).await?; Ok(result) diff --git a/frontend/rust-lib/flowy-database2/src/services/database_view/view_editor.rs b/frontend/rust-lib/flowy-database2/src/services/database_view/view_editor.rs index 6cef8ccc45f05..cce55e0e25ecb 100644 --- a/frontend/rust-lib/flowy-database2/src/services/database_view/view_editor.rs +++ b/frontend/rust-lib/flowy-database2/src/services/database_view/view_editor.rs @@ -128,6 +128,7 @@ impl DatabaseViewEditor { &self, params: CreateRowPayloadPB, ) -> FlowyResult { + let timestamp = timestamp(); let mut result = CreateRowParams { collab_params: collab_database::rows::CreateRowParams { id: gen_row_id(), @@ -135,7 +136,8 @@ impl DatabaseViewEditor { height: 60, visibility: true, row_position: params.row_position.try_into()?, - timestamp: timestamp(), + created_at: timestamp, + modified_at: timestamp, }, open_after_create: false, }; diff --git a/frontend/rust-lib/flowy-database2/src/services/share/csv/import.rs b/frontend/rust-lib/flowy-database2/src/services/share/csv/import.rs index aaa05fddc52b8..8e39c6e882c0f 100644 --- a/frontend/rust-lib/flowy-database2/src/services/share/csv/import.rs +++ b/frontend/rust-lib/flowy-database2/src/services/share/csv/import.rs @@ -1,9 +1,9 @@ use std::{fs::File, io::prelude::*}; -use collab_database::database::{gen_database_id, gen_field_id, gen_row_id}; +use collab_database::database::{gen_database_id, gen_field_id, gen_row_id, timestamp}; use collab_database::fields::Field; use collab_database::rows::{new_cell_builder, Cell, CreateRowParams}; -use collab_database::views::{CreateDatabaseParams, DatabaseLayout}; +use collab_database::views::{CreateDatabaseParams, CreateViewParams, DatabaseLayout}; use flowy_error::{FlowyError, FlowyResult}; @@ -99,7 +99,7 @@ fn database_from_fields_and_rows( let field_settings = default_field_settings_for_fields(&fields, DatabaseLayout::Grid); - let created_rows = rows + let rows = rows .iter() .map(|cells| { let mut params = CreateRowParams::new(gen_row_id()); @@ -126,18 +126,23 @@ fn database_from_fields_and_rows( }) .collect::>(); + let timestamp = timestamp(); + CreateDatabaseParams { - database_id, - view_id: view_id.to_string(), - view_name: "".to_string(), - layout: DatabaseLayout::Grid, - layout_settings: Default::default(), - filters: vec![], - groups: vec![], - sorts: vec![], - created_rows, + database_id: database_id.clone(), + inline_view_id: view_id.to_string(), + rows, fields, - field_settings, + views: vec![CreateViewParams { + database_id, + view_id: view_id.to_string(), + name: "".to_string(), + layout: DatabaseLayout::Grid, + field_settings, + created_at: timestamp, + modified_at: timestamp, + ..Default::default() + }], } } diff --git a/frontend/rust-lib/flowy-database2/src/template.rs b/frontend/rust-lib/flowy-database2/src/template.rs index d257e02efabd0..3479dfbb97501 100644 --- a/frontend/rust-lib/flowy-database2/src/template.rs +++ b/frontend/rust-lib/flowy-database2/src/template.rs @@ -1,6 +1,8 @@ -use collab_database::database::{gen_database_id, gen_row_id}; +use collab_database::database::{gen_database_id, gen_row_id, timestamp}; use collab_database::rows::CreateRowParams; -use collab_database::views::{CreateDatabaseParams, DatabaseLayout, LayoutSettings}; +use collab_database::views::{ + CreateDatabaseParams, CreateViewParams, DatabaseLayout, LayoutSettings, +}; use crate::entities::FieldType; use crate::services::cell::{insert_select_option_cell, insert_text_cell}; @@ -11,6 +13,9 @@ use crate::services::field_settings::default_field_settings_for_fields; use crate::services::setting::{BoardLayoutSetting, CalendarLayoutSetting}; pub fn make_default_grid(view_id: &str, name: &str) -> CreateDatabaseParams { + let database_id = gen_database_id(); + let timestamp = timestamp(); + let text_field = FieldBuilder::from_field_type(FieldType::RichText) .name("Name") .visibility(true) @@ -32,25 +37,35 @@ pub fn make_default_grid(view_id: &str, name: &str) -> CreateDatabaseParams { let field_settings = default_field_settings_for_fields(&fields, DatabaseLayout::Grid); CreateDatabaseParams { - database_id: gen_database_id(), - view_id: view_id.to_string(), - view_name: name.to_string(), - layout: DatabaseLayout::Grid, - layout_settings: Default::default(), - filters: vec![], - groups: vec![], - sorts: vec![], - created_rows: vec![ + database_id: database_id.clone(), + inline_view_id: view_id.to_string(), + views: vec![CreateViewParams { + database_id, + view_id: view_id.to_string(), + name: name.to_string(), + layout: DatabaseLayout::Grid, + layout_settings: Default::default(), + filters: vec![], + group_settings: vec![], + sorts: vec![], + field_settings, + created_at: timestamp, + modified_at: timestamp, + ..Default::default() + }], + rows: vec![ CreateRowParams::new(gen_row_id()), CreateRowParams::new(gen_row_id()), CreateRowParams::new(gen_row_id()), ], fields, - field_settings, } } pub fn make_default_board(view_id: &str, name: &str) -> CreateDatabaseParams { + let database_id = gen_database_id(); + let timestamp = timestamp(); + // text let text_field = FieldBuilder::from_field_type(FieldType::RichText) .name("Description") @@ -95,21 +110,31 @@ pub fn make_default_board(view_id: &str, name: &str) -> CreateDatabaseParams { layout_settings.insert(DatabaseLayout::Board, BoardLayoutSetting::new().into()); CreateDatabaseParams { - database_id: gen_database_id(), - view_id: view_id.to_string(), - view_name: name.to_string(), - layout: DatabaseLayout::Board, - layout_settings, - filters: vec![], - groups: vec![], - sorts: vec![], - created_rows: rows, + database_id: database_id.clone(), + inline_view_id: view_id.to_string(), + views: vec![CreateViewParams { + database_id, + view_id: view_id.to_string(), + name: name.to_string(), + layout: DatabaseLayout::Board, + layout_settings, + filters: vec![], + group_settings: vec![], + sorts: vec![], + field_settings, + created_at: timestamp, + modified_at: timestamp, + ..Default::default() + }], + rows, fields, - field_settings, } } pub fn make_default_calendar(view_id: &str, name: &str) -> CreateDatabaseParams { + let database_id = gen_database_id(); + let timestamp = timestamp(); + // text let text_field = FieldBuilder::from_field_type(FieldType::RichText) .name("Title") @@ -141,16 +166,23 @@ pub fn make_default_calendar(view_id: &str, name: &str) -> CreateDatabaseParams ); CreateDatabaseParams { - database_id: gen_database_id(), - view_id: view_id.to_string(), - view_name: name.to_string(), - layout: DatabaseLayout::Calendar, - layout_settings, - filters: vec![], - groups: vec![], - sorts: vec![], - created_rows: vec![], + database_id: database_id.clone(), + inline_view_id: view_id.to_string(), + views: vec![CreateViewParams { + database_id, + view_id: view_id.to_string(), + name: name.to_string(), + layout: DatabaseLayout::Calendar, + layout_settings, + filters: vec![], + group_settings: vec![], + sorts: vec![], + field_settings, + created_at: timestamp, + modified_at: timestamp, + ..Default::default() + }], + rows: vec![], fields, - field_settings, } } From 8d12b1bea25628d39823f8dbf6137b4d8867995f Mon Sep 17 00:00:00 2001 From: Richard Shiue <71320345+richardshiue@users.noreply.github.com> Date: Mon, 1 Apr 2024 13:26:35 +0800 Subject: [PATCH 2/3] chore: fix tests --- .../src/services/share/csv/import.rs | 8 ++--- .../tests/database/database_editor.rs | 12 ++++---- .../database/mock_data/board_mock_data.rs | 16 ++++++++-- .../database/mock_data/calendar_mock_data.rs | 15 ++++++++-- .../database/mock_data/grid_mock_data.rs | 30 +++++++++++++++---- 5 files changed, 59 insertions(+), 22 deletions(-) diff --git a/frontend/rust-lib/flowy-database2/src/services/share/csv/import.rs b/frontend/rust-lib/flowy-database2/src/services/share/csv/import.rs index 8e39c6e882c0f..2425ebffd3b04 100644 --- a/frontend/rust-lib/flowy-database2/src/services/share/csv/import.rs +++ b/frontend/rust-lib/flowy-database2/src/services/share/csv/import.rs @@ -184,7 +184,7 @@ mod tests { let result = importer .import_csv_from_string(gen_database_view_id(), s.to_string(), CSVFormat::Original) .unwrap(); - assert_eq!(result.created_rows.len(), 3); + assert_eq!(result.rows.len(), 3); assert_eq!(result.fields.len(), 6); assert_eq!(result.fields[0].name, "Name"); @@ -194,9 +194,9 @@ mod tests { assert_eq!(result.fields[4].name, "Checkbox"); assert_eq!(result.fields[5].name, "URL"); - assert_eq!(result.created_rows[0].cells.len(), 6); - assert_eq!(result.created_rows[1].cells.len(), 6); - assert_eq!(result.created_rows[2].cells.len(), 6); + assert_eq!(result.rows[0].cells.len(), 6); + assert_eq!(result.rows[1].cells.len(), 6); + assert_eq!(result.rows[2].cells.len(), 6); println!("{:?}", result); } diff --git a/frontend/rust-lib/flowy-database2/tests/database/database_editor.rs b/frontend/rust-lib/flowy-database2/tests/database/database_editor.rs index cccaba68fe5b9..6d96c7b46dc65 100644 --- a/frontend/rust-lib/flowy-database2/tests/database/database_editor.rs +++ b/frontend/rust-lib/flowy-database2/tests/database/database_editor.rs @@ -3,8 +3,7 @@ use std::sync::Arc; use collab_database::database::{gen_database_view_id, timestamp}; use collab_database::fields::Field; -use collab_database::rows::{CreateRowParams, RowDetail, RowId}; -use collab_database::views::OrderObjectPosition; +use collab_database::rows::{Row, RowDetail, RowId}; use lib_infra::box_any::BoxAny; use strum::EnumCount; @@ -404,14 +403,15 @@ impl<'a> TestRowBuilder<'a> { .clone() } - pub fn build(self) -> CreateRowParams { - CreateRowParams { + pub fn build(self) -> Row { + let timestamp = timestamp(); + Row { id: self.row_id, cells: self.cell_build.build(), height: 60, visibility: true, - row_position: OrderObjectPosition::End, - timestamp: timestamp(), + modified_at: timestamp, + created_at: timestamp, } } } diff --git a/frontend/rust-lib/flowy-database2/tests/database/mock_data/board_mock_data.rs b/frontend/rust-lib/flowy-database2/tests/database/mock_data/board_mock_data.rs index 318e6579d83b3..33103f1372151 100644 --- a/frontend/rust-lib/flowy-database2/tests/database/mock_data/board_mock_data.rs +++ b/frontend/rust-lib/flowy-database2/tests/database/mock_data/board_mock_data.rs @@ -252,9 +252,12 @@ pub fn make_test_board() -> DatabaseData { let mut layout_settings = LayoutSettings::new(); layout_settings.insert(DatabaseLayout::Board, board_setting); + let database_id = gen_database_id(); + let inline_view_id = gen_database_view_id(); + let view = DatabaseView { - id: gen_database_view_id(), - database_id: gen_database_id(), + id: inline_view_id.clone(), + database_id: database_id.clone(), name: "".to_string(), layout: DatabaseLayout::Board, layout_settings, @@ -267,5 +270,12 @@ pub fn make_test_board() -> DatabaseData { modified_at: 0, field_settings, }; - DatabaseData { view, fields, rows } + + DatabaseData { + database_id, + inline_view_id, + views: vec![view], + fields, + rows, + } } diff --git a/frontend/rust-lib/flowy-database2/tests/database/mock_data/calendar_mock_data.rs b/frontend/rust-lib/flowy-database2/tests/database/mock_data/calendar_mock_data.rs index 7587c8ca4f2b1..4257ee83e8ac6 100644 --- a/frontend/rust-lib/flowy-database2/tests/database/mock_data/calendar_mock_data.rs +++ b/frontend/rust-lib/flowy-database2/tests/database/mock_data/calendar_mock_data.rs @@ -109,9 +109,12 @@ pub fn make_test_calendar() -> DatabaseData { let mut layout_settings = LayoutSettings::new(); layout_settings.insert(DatabaseLayout::Calendar, calendar_setting); + let database_id = gen_database_id(); + let inline_view_id = gen_database_view_id(); + let view = DatabaseView { - id: gen_database_view_id(), - database_id: gen_database_id(), + database_id: database_id.clone(), + id: inline_view_id.clone(), name: "".to_string(), layout: DatabaseLayout::Calendar, layout_settings, @@ -125,5 +128,11 @@ pub fn make_test_calendar() -> DatabaseData { field_settings, }; - DatabaseData { view, fields, rows } + DatabaseData { + database_id, + inline_view_id, + views: vec![view], + fields, + rows, + } } diff --git a/frontend/rust-lib/flowy-database2/tests/database/mock_data/grid_mock_data.rs b/frontend/rust-lib/flowy-database2/tests/database/mock_data/grid_mock_data.rs index 01362d75b47f3..5b7f3e0526cc5 100644 --- a/frontend/rust-lib/flowy-database2/tests/database/mock_data/grid_mock_data.rs +++ b/frontend/rust-lib/flowy-database2/tests/database/mock_data/grid_mock_data.rs @@ -275,16 +275,25 @@ pub fn make_test_grid() -> DatabaseData { rows.push(row); } + let database_id = gen_database_id(); + let inline_view_id = gen_database_view_id(); + let view = DatabaseView { - id: gen_database_id(), - database_id: gen_database_view_id(), + database_id: database_id.clone(), + id: inline_view_id.clone(), name: "".to_string(), layout: DatabaseLayout::Grid, field_settings, ..Default::default() }; - DatabaseData { view, fields, rows } + DatabaseData { + database_id, + inline_view_id, + views: vec![view], + fields, + rows, + } } pub fn make_no_date_test_grid() -> DatabaseData { @@ -356,14 +365,23 @@ pub fn make_no_date_test_grid() -> DatabaseData { rows.push(row); } + let database_id = gen_database_id(); + let inline_view_id = gen_database_view_id(); + let view = DatabaseView { - id: gen_database_view_id(), - database_id: gen_database_id(), + database_id: database_id.clone(), + id: inline_view_id.clone(), name: "".to_string(), layout: DatabaseLayout::Grid, field_settings, ..Default::default() }; - DatabaseData { view, fields, rows } + DatabaseData { + database_id, + inline_view_id, + views: vec![view], + fields, + rows, + } } From d11048e68c8e43a20ffdb459bfba2afc82a1105d Mon Sep 17 00:00:00 2001 From: Richard Shiue <71320345+richardshiue@users.noreply.github.com> Date: Thu, 11 Apr 2024 14:48:39 +0800 Subject: [PATCH 3/3] chore: update collab rev --- frontend/appflowy_tauri/src-tauri/Cargo.lock | 14 +++++++------- frontend/appflowy_tauri/src-tauri/Cargo.toml | 14 +++++++------- frontend/appflowy_web/wasm-libs/Cargo.toml | 14 +++++++------- frontend/appflowy_web_app/src-tauri/Cargo.lock | 14 +++++++------- frontend/appflowy_web_app/src-tauri/Cargo.toml | 14 +++++++------- frontend/rust-lib/Cargo.lock | 14 +++++++------- frontend/rust-lib/Cargo.toml | 14 +++++++------- 7 files changed, 49 insertions(+), 49 deletions(-) diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.lock b/frontend/appflowy_tauri/src-tauri/Cargo.lock index 7f77c16da31ea..2ee66bdd62e20 100644 --- a/frontend/appflowy_tauri/src-tauri/Cargo.lock +++ b/frontend/appflowy_tauri/src-tauri/Cargo.lock @@ -831,7 +831,7 @@ dependencies = [ [[package]] name = "collab" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8a3be96cc854f172c7fddded957d90ed2cd3cbef#8a3be96cc854f172c7fddded957d90ed2cd3cbef" dependencies = [ "anyhow", "async-trait", @@ -855,7 +855,7 @@ dependencies = [ [[package]] name = "collab-database" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8a3be96cc854f172c7fddded957d90ed2cd3cbef#8a3be96cc854f172c7fddded957d90ed2cd3cbef" dependencies = [ "anyhow", "async-trait", @@ -885,7 +885,7 @@ dependencies = [ [[package]] name = "collab-document" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8a3be96cc854f172c7fddded957d90ed2cd3cbef#8a3be96cc854f172c7fddded957d90ed2cd3cbef" dependencies = [ "anyhow", "collab", @@ -904,7 +904,7 @@ dependencies = [ [[package]] name = "collab-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8a3be96cc854f172c7fddded957d90ed2cd3cbef#8a3be96cc854f172c7fddded957d90ed2cd3cbef" dependencies = [ "anyhow", "bytes", @@ -919,7 +919,7 @@ dependencies = [ [[package]] name = "collab-folder" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8a3be96cc854f172c7fddded957d90ed2cd3cbef#8a3be96cc854f172c7fddded957d90ed2cd3cbef" dependencies = [ "anyhow", "chrono", @@ -957,7 +957,7 @@ dependencies = [ [[package]] name = "collab-plugins" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8a3be96cc854f172c7fddded957d90ed2cd3cbef#8a3be96cc854f172c7fddded957d90ed2cd3cbef" dependencies = [ "anyhow", "async-stream", @@ -1035,7 +1035,7 @@ dependencies = [ [[package]] name = "collab-user" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8a3be96cc854f172c7fddded957d90ed2cd3cbef#8a3be96cc854f172c7fddded957d90ed2cd3cbef" dependencies = [ "anyhow", "collab", diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.toml b/frontend/appflowy_tauri/src-tauri/Cargo.toml index 42506f64e0624..254d731ce79d4 100644 --- a/frontend/appflowy_tauri/src-tauri/Cargo.toml +++ b/frontend/appflowy_tauri/src-tauri/Cargo.toml @@ -97,10 +97,10 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "b1c # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } +collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } diff --git a/frontend/appflowy_web/wasm-libs/Cargo.toml b/frontend/appflowy_web/wasm-libs/Cargo.toml index c377d27d43baa..bcff18a2cb835 100644 --- a/frontend/appflowy_web/wasm-libs/Cargo.toml +++ b/frontend/appflowy_web/wasm-libs/Cargo.toml @@ -65,10 +65,10 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "b1c # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } +collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } diff --git a/frontend/appflowy_web_app/src-tauri/Cargo.lock b/frontend/appflowy_web_app/src-tauri/Cargo.lock index 8a9e550a7ab37..ded9ec4f949a7 100644 --- a/frontend/appflowy_web_app/src-tauri/Cargo.lock +++ b/frontend/appflowy_web_app/src-tauri/Cargo.lock @@ -815,7 +815,7 @@ dependencies = [ [[package]] name = "collab" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8a3be96cc854f172c7fddded957d90ed2cd3cbef#8a3be96cc854f172c7fddded957d90ed2cd3cbef" dependencies = [ "anyhow", "async-trait", @@ -839,7 +839,7 @@ dependencies = [ [[package]] name = "collab-database" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8a3be96cc854f172c7fddded957d90ed2cd3cbef#8a3be96cc854f172c7fddded957d90ed2cd3cbef" dependencies = [ "anyhow", "async-trait", @@ -869,7 +869,7 @@ dependencies = [ [[package]] name = "collab-document" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8a3be96cc854f172c7fddded957d90ed2cd3cbef#8a3be96cc854f172c7fddded957d90ed2cd3cbef" dependencies = [ "anyhow", "collab", @@ -888,7 +888,7 @@ dependencies = [ [[package]] name = "collab-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8a3be96cc854f172c7fddded957d90ed2cd3cbef#8a3be96cc854f172c7fddded957d90ed2cd3cbef" dependencies = [ "anyhow", "bytes", @@ -903,7 +903,7 @@ dependencies = [ [[package]] name = "collab-folder" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8a3be96cc854f172c7fddded957d90ed2cd3cbef#8a3be96cc854f172c7fddded957d90ed2cd3cbef" dependencies = [ "anyhow", "chrono", @@ -941,7 +941,7 @@ dependencies = [ [[package]] name = "collab-plugins" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8a3be96cc854f172c7fddded957d90ed2cd3cbef#8a3be96cc854f172c7fddded957d90ed2cd3cbef" dependencies = [ "anyhow", "async-stream", @@ -1019,7 +1019,7 @@ dependencies = [ [[package]] name = "collab-user" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8a3be96cc854f172c7fddded957d90ed2cd3cbef#8a3be96cc854f172c7fddded957d90ed2cd3cbef" dependencies = [ "anyhow", "collab", diff --git a/frontend/appflowy_web_app/src-tauri/Cargo.toml b/frontend/appflowy_web_app/src-tauri/Cargo.toml index 42506f64e0624..254d731ce79d4 100644 --- a/frontend/appflowy_web_app/src-tauri/Cargo.toml +++ b/frontend/appflowy_web_app/src-tauri/Cargo.toml @@ -97,10 +97,10 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "b1c # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } +collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } diff --git a/frontend/rust-lib/Cargo.lock b/frontend/rust-lib/Cargo.lock index c5dc6d15d31f7..3e08b8302da4a 100644 --- a/frontend/rust-lib/Cargo.lock +++ b/frontend/rust-lib/Cargo.lock @@ -757,7 +757,7 @@ dependencies = [ [[package]] name = "collab" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8a3be96cc854f172c7fddded957d90ed2cd3cbef#8a3be96cc854f172c7fddded957d90ed2cd3cbef" dependencies = [ "anyhow", "async-trait", @@ -781,7 +781,7 @@ dependencies = [ [[package]] name = "collab-database" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8a3be96cc854f172c7fddded957d90ed2cd3cbef#8a3be96cc854f172c7fddded957d90ed2cd3cbef" dependencies = [ "anyhow", "async-trait", @@ -811,7 +811,7 @@ dependencies = [ [[package]] name = "collab-document" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8a3be96cc854f172c7fddded957d90ed2cd3cbef#8a3be96cc854f172c7fddded957d90ed2cd3cbef" dependencies = [ "anyhow", "collab", @@ -830,7 +830,7 @@ dependencies = [ [[package]] name = "collab-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8a3be96cc854f172c7fddded957d90ed2cd3cbef#8a3be96cc854f172c7fddded957d90ed2cd3cbef" dependencies = [ "anyhow", "bytes", @@ -845,7 +845,7 @@ dependencies = [ [[package]] name = "collab-folder" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8a3be96cc854f172c7fddded957d90ed2cd3cbef#8a3be96cc854f172c7fddded957d90ed2cd3cbef" dependencies = [ "anyhow", "chrono", @@ -883,7 +883,7 @@ dependencies = [ [[package]] name = "collab-plugins" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8a3be96cc854f172c7fddded957d90ed2cd3cbef#8a3be96cc854f172c7fddded957d90ed2cd3cbef" dependencies = [ "anyhow", "async-stream", @@ -961,7 +961,7 @@ dependencies = [ [[package]] name = "collab-user" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=352c55199449fbe321965fd42d2ff09ff54cf3f1#352c55199449fbe321965fd42d2ff09ff54cf3f1" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=8a3be96cc854f172c7fddded957d90ed2cd3cbef#8a3be96cc854f172c7fddded957d90ed2cd3cbef" dependencies = [ "anyhow", "collab", diff --git a/frontend/rust-lib/Cargo.toml b/frontend/rust-lib/Cargo.toml index d5dc3ec014f23..0a3f7ff2c56b9 100644 --- a/frontend/rust-lib/Cargo.toml +++ b/frontend/rust-lib/Cargo.toml @@ -121,10 +121,10 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "b1c # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } -collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "352c55199449fbe321965fd42d2ff09ff54cf3f1" } +collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" } +collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "8a3be96cc854f172c7fddded957d90ed2cd3cbef" }