mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: bump up yrs to 0.17.1 (#4078)
* chore: bump yrs * chore: update rev
This commit is contained in:
parent
d4cef2e866
commit
0d776a9294
@ -229,8 +229,8 @@ Future<AppFlowyCloudConfiguration> configurationFromUri(
|
||||
} else {
|
||||
return AppFlowyCloudConfiguration(
|
||||
base_url: baseUrl,
|
||||
ws_base_url: await _getAppFlowyCloudWSUrl(Env.afCloudUrl),
|
||||
gotrue_url: await _getAppFlowyCloudGotrueUrl(Env.afCloudUrl),
|
||||
ws_base_url: await _getAppFlowyCloudWSUrl(baseUrl),
|
||||
gotrue_url: await _getAppFlowyCloudGotrueUrl(baseUrl),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
67
frontend/appflowy_tauri/src-tauri/Cargo.lock
generated
67
frontend/appflowy_tauri/src-tauri/Cargo.lock
generated
@ -139,7 +139,7 @@ checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"
|
||||
[[package]]
|
||||
name = "app-error"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=208a353fefe08ff2521d4be72be936329f5c0256#208a353fefe08ff2521d4be72be936329f5c0256"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=f13a03beada8b7c3991f98016ccc0b708b22090c#f13a03beada8b7c3991f98016ccc0b708b22090c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"reqwest",
|
||||
@ -786,7 +786,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "client-api"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=208a353fefe08ff2521d4be72be936329f5c0256#208a353fefe08ff2521d4be72be936329f5c0256"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=f13a03beada8b7c3991f98016ccc0b708b22090c#f13a03beada8b7c3991f98016ccc0b708b22090c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -799,7 +799,6 @@ dependencies = [
|
||||
"futures-util",
|
||||
"gotrue",
|
||||
"gotrue-entity",
|
||||
"lib0",
|
||||
"mime",
|
||||
"mime_guess",
|
||||
"parking_lot",
|
||||
@ -882,13 +881,12 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e5c8f4a9a095f7a453e5ced42888bdf248c55358#e5c8f4a9a095f7a453e5ced42888bdf248c55358"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
"bincode",
|
||||
"bytes",
|
||||
"lib0",
|
||||
"parking_lot",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@ -902,7 +900,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-database"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e5c8f4a9a095f7a453e5ced42888bdf248c55358#e5c8f4a9a095f7a453e5ced42888bdf248c55358"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -932,7 +930,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-derive"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e5c8f4a9a095f7a453e5ced42888bdf248c55358#e5c8f4a9a095f7a453e5ced42888bdf248c55358"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -944,13 +942,12 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-document"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e5c8f4a9a095f7a453e5ced42888bdf248c55358#e5c8f4a9a095f7a453e5ced42888bdf248c55358"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"collab",
|
||||
"collab-derive",
|
||||
"collab-persistence",
|
||||
"lib0",
|
||||
"nanoid",
|
||||
"parking_lot",
|
||||
"serde",
|
||||
@ -964,7 +961,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e5c8f4a9a095f7a453e5ced42888bdf248c55358#e5c8f4a9a095f7a453e5ced42888bdf248c55358"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
@ -978,7 +975,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-folder"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e5c8f4a9a095f7a453e5ced42888bdf248c55358#e5c8f4a9a095f7a453e5ced42888bdf248c55358"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
@ -1020,7 +1017,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-persistence"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e5c8f4a9a095f7a453e5ced42888bdf248c55358#e5c8f4a9a095f7a453e5ced42888bdf248c55358"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -1028,7 +1025,6 @@ dependencies = [
|
||||
"chrono",
|
||||
"collab",
|
||||
"lazy_static",
|
||||
"lib0",
|
||||
"parking_lot",
|
||||
"rocksdb",
|
||||
"serde",
|
||||
@ -1042,7 +1038,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-plugins"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e5c8f4a9a095f7a453e5ced42888bdf248c55358#e5c8f4a9a095f7a453e5ced42888bdf248c55358"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -1051,7 +1047,6 @@ dependencies = [
|
||||
"collab-entity",
|
||||
"collab-persistence",
|
||||
"futures-util",
|
||||
"lib0",
|
||||
"parking_lot",
|
||||
"rand 0.8.5",
|
||||
"serde",
|
||||
@ -1069,7 +1064,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-user"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e5c8f4a9a095f7a453e5ced42888bdf248c55358#e5c8f4a9a095f7a453e5ced42888bdf248c55358"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"collab",
|
||||
@ -1474,7 +1469,7 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
|
||||
[[package]]
|
||||
name = "database-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=208a353fefe08ff2521d4be72be936329f5c0256#208a353fefe08ff2521d4be72be936329f5c0256"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=f13a03beada8b7c3991f98016ccc0b708b22090c#f13a03beada8b7c3991f98016ccc0b708b22090c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -2833,7 +2828,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gotrue"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=208a353fefe08ff2521d4be72be936329f5c0256#208a353fefe08ff2521d4be72be936329f5c0256"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=f13a03beada8b7c3991f98016ccc0b708b22090c#f13a03beada8b7c3991f98016ccc0b708b22090c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"futures-util",
|
||||
@ -2849,7 +2844,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gotrue-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=208a353fefe08ff2521d4be72be936329f5c0256#208a353fefe08ff2521d4be72be936329f5c0256"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=f13a03beada8b7c3991f98016ccc0b708b22090c#f13a03beada8b7c3991f98016ccc0b708b22090c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -3271,7 +3266,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "infra"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=208a353fefe08ff2521d4be72be936329f5c0256#208a353fefe08ff2521d4be72be936329f5c0256"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=f13a03beada8b7c3991f98016ccc0b708b22090c#f13a03beada8b7c3991f98016ccc0b708b22090c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"reqwest",
|
||||
@ -3528,17 +3523,6 @@ dependencies = [
|
||||
"tracing-subscriber",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lib0"
|
||||
version = "0.16.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "49d27ae71668a38ad135d463703ce0c5d9cf5a29f9a02add7a0dac6ebb523196"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.150"
|
||||
@ -5042,7 +5026,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "realtime-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=208a353fefe08ff2521d4be72be936329f5c0256#208a353fefe08ff2521d4be72be936329f5c0256"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=f13a03beada8b7c3991f98016ccc0b708b22090c#f13a03beada8b7c3991f98016ccc0b708b22090c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
@ -5795,7 +5779,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "shared_entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=208a353fefe08ff2521d4be72be936329f5c0256#208a353fefe08ff2521d4be72be936329f5c0256"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=f13a03beada8b7c3991f98016ccc0b708b22090c#f13a03beada8b7c3991f98016ccc0b708b22090c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -5891,18 +5875,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "smallstr"
|
||||
version = "0.2.0"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e922794d168678729ffc7e07182721a14219c65814e66e91b839a272fe5ae4f"
|
||||
checksum = "63b1aefdf380735ff8ded0b15f31aab05daf1f70216c01c02a12926badd1df9d"
|
||||
dependencies = [
|
||||
"smallvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "1.10.0"
|
||||
version = "1.11.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
|
||||
checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970"
|
||||
|
||||
[[package]]
|
||||
name = "smartstring"
|
||||
@ -7685,7 +7669,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "workspace-template"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=208a353fefe08ff2521d4be72be936329f5c0256#208a353fefe08ff2521d4be72be936329f5c0256"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=f13a03beada8b7c3991f98016ccc0b708b22090c#f13a03beada8b7c3991f98016ccc0b708b22090c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -7790,13 +7774,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "yrs"
|
||||
version = "0.16.5"
|
||||
version = "0.17.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4c2aef2bf89b4f7c003f9c73f1c8097427ca32e1d006443f3f607f11e79a797b"
|
||||
checksum = "86f2fbea97ed32722d4f09fcf1aace9daf36e8b2e72b1f605d5a1bee575fa0da"
|
||||
dependencies = [
|
||||
"atomic_refcell",
|
||||
"lib0",
|
||||
"rand 0.7.3",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"smallstr",
|
||||
"smallvec",
|
||||
"thiserror",
|
||||
|
@ -57,7 +57,7 @@ custom-protocol = ["tauri/custom-protocol"]
|
||||
# Run the script:
|
||||
# scripts/tool/update_client_api_rev.sh new_rev_id
|
||||
# ⚠️⚠️⚠️️
|
||||
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "208a353fefe08ff2521d4be72be936329f5c0256" }
|
||||
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "f13a03beada8b7c3991f98016ccc0b708b22090c" }
|
||||
# Please use the following script to update collab.
|
||||
# Working directory: frontend
|
||||
#
|
||||
@ -67,14 +67,14 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "208
|
||||
# To switch to the local path, run:
|
||||
# scripts/tool/update_collab_source.sh
|
||||
# ⚠️⚠️⚠️️
|
||||
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "22e11ebb490039736cb2a81d9fe7dfe96782bc8b" }
|
||||
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "22e11ebb490039736cb2a81d9fe7dfe96782bc8b" }
|
||||
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "22e11ebb490039736cb2a81d9fe7dfe96782bc8b" }
|
||||
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "22e11ebb490039736cb2a81d9fe7dfe96782bc8b" }
|
||||
collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "22e11ebb490039736cb2a81d9fe7dfe96782bc8b" }
|
||||
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "22e11ebb490039736cb2a81d9fe7dfe96782bc8b" }
|
||||
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "22e11ebb490039736cb2a81d9fe7dfe96782bc8b" }
|
||||
collab-persistence = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "22e11ebb490039736cb2a81d9fe7dfe96782bc8b" }
|
||||
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e5c8f4a9a095f7a453e5ced42888bdf248c55358" }
|
||||
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e5c8f4a9a095f7a453e5ced42888bdf248c55358" }
|
||||
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e5c8f4a9a095f7a453e5ced42888bdf248c55358" }
|
||||
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e5c8f4a9a095f7a453e5ced42888bdf248c55358" }
|
||||
collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e5c8f4a9a095f7a453e5ced42888bdf248c55358" }
|
||||
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e5c8f4a9a095f7a453e5ced42888bdf248c55358" }
|
||||
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e5c8f4a9a095f7a453e5ced42888bdf248c55358" }
|
||||
collab-persistence = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e5c8f4a9a095f7a453e5ced42888bdf248c55358" }
|
||||
|
||||
|
||||
|
||||
|
63
frontend/rust-lib/Cargo.lock
generated
63
frontend/rust-lib/Cargo.lock
generated
@ -125,7 +125,7 @@ checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"
|
||||
[[package]]
|
||||
name = "app-error"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=208a353fefe08ff2521d4be72be936329f5c0256#208a353fefe08ff2521d4be72be936329f5c0256"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=f13a03beada8b7c3991f98016ccc0b708b22090c#f13a03beada8b7c3991f98016ccc0b708b22090c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"reqwest",
|
||||
@ -667,7 +667,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "client-api"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=208a353fefe08ff2521d4be72be936329f5c0256#208a353fefe08ff2521d4be72be936329f5c0256"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=f13a03beada8b7c3991f98016ccc0b708b22090c#f13a03beada8b7c3991f98016ccc0b708b22090c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -680,7 +680,6 @@ dependencies = [
|
||||
"futures-util",
|
||||
"gotrue",
|
||||
"gotrue-entity",
|
||||
"lib0",
|
||||
"mime",
|
||||
"mime_guess",
|
||||
"parking_lot",
|
||||
@ -732,13 +731,12 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e5c8f4a9a095f7a453e5ced42888bdf248c55358#e5c8f4a9a095f7a453e5ced42888bdf248c55358"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
"bincode",
|
||||
"bytes",
|
||||
"lib0",
|
||||
"parking_lot",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@ -752,7 +750,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-database"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e5c8f4a9a095f7a453e5ced42888bdf248c55358#e5c8f4a9a095f7a453e5ced42888bdf248c55358"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -782,7 +780,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-derive"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e5c8f4a9a095f7a453e5ced42888bdf248c55358#e5c8f4a9a095f7a453e5ced42888bdf248c55358"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -794,13 +792,12 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-document"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e5c8f4a9a095f7a453e5ced42888bdf248c55358#e5c8f4a9a095f7a453e5ced42888bdf248c55358"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"collab",
|
||||
"collab-derive",
|
||||
"collab-persistence",
|
||||
"lib0",
|
||||
"nanoid",
|
||||
"parking_lot",
|
||||
"serde",
|
||||
@ -814,7 +811,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e5c8f4a9a095f7a453e5ced42888bdf248c55358#e5c8f4a9a095f7a453e5ced42888bdf248c55358"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
@ -828,7 +825,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-folder"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e5c8f4a9a095f7a453e5ced42888bdf248c55358#e5c8f4a9a095f7a453e5ced42888bdf248c55358"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
@ -870,7 +867,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-persistence"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e5c8f4a9a095f7a453e5ced42888bdf248c55358#e5c8f4a9a095f7a453e5ced42888bdf248c55358"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -878,7 +875,6 @@ dependencies = [
|
||||
"chrono",
|
||||
"collab",
|
||||
"lazy_static",
|
||||
"lib0",
|
||||
"parking_lot",
|
||||
"rocksdb",
|
||||
"serde",
|
||||
@ -892,7 +888,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-plugins"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e5c8f4a9a095f7a453e5ced42888bdf248c55358#e5c8f4a9a095f7a453e5ced42888bdf248c55358"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -901,7 +897,6 @@ dependencies = [
|
||||
"collab-entity",
|
||||
"collab-persistence",
|
||||
"futures-util",
|
||||
"lib0",
|
||||
"parking_lot",
|
||||
"rand 0.8.5",
|
||||
"serde",
|
||||
@ -919,7 +914,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "collab-user"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=22e11ebb490039736cb2a81d9fe7dfe96782bc8b#22e11ebb490039736cb2a81d9fe7dfe96782bc8b"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=e5c8f4a9a095f7a453e5ced42888bdf248c55358#e5c8f4a9a095f7a453e5ced42888bdf248c55358"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"collab",
|
||||
@ -1280,7 +1275,7 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
|
||||
[[package]]
|
||||
name = "database-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=208a353fefe08ff2521d4be72be936329f5c0256#208a353fefe08ff2521d4be72be936329f5c0256"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=f13a03beada8b7c3991f98016ccc0b708b22090c#f13a03beada8b7c3991f98016ccc0b708b22090c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -2474,7 +2469,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gotrue"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=208a353fefe08ff2521d4be72be936329f5c0256#208a353fefe08ff2521d4be72be936329f5c0256"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=f13a03beada8b7c3991f98016ccc0b708b22090c#f13a03beada8b7c3991f98016ccc0b708b22090c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"futures-util",
|
||||
@ -2490,7 +2485,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gotrue-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=208a353fefe08ff2521d4be72be936329f5c0256#208a353fefe08ff2521d4be72be936329f5c0256"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=f13a03beada8b7c3991f98016ccc0b708b22090c#f13a03beada8b7c3991f98016ccc0b708b22090c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -2851,7 +2846,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "infra"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=208a353fefe08ff2521d4be72be936329f5c0256#208a353fefe08ff2521d4be72be936329f5c0256"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=f13a03beada8b7c3991f98016ccc0b708b22090c#f13a03beada8b7c3991f98016ccc0b708b22090c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"reqwest",
|
||||
@ -3022,17 +3017,6 @@ dependencies = [
|
||||
"tracing-subscriber",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lib0"
|
||||
version = "0.16.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "29dc19a026a0d45fc391898c6d4a6d0a5aab5ae6a826ebddc0f33572ffdae8dc"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.150"
|
||||
@ -4331,7 +4315,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "realtime-entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=208a353fefe08ff2521d4be72be936329f5c0256#208a353fefe08ff2521d4be72be936329f5c0256"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=f13a03beada8b7c3991f98016ccc0b708b22090c#f13a03beada8b7c3991f98016ccc0b708b22090c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bincode",
|
||||
@ -4997,7 +4981,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "shared_entity"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=208a353fefe08ff2521d4be72be936329f5c0256#208a353fefe08ff2521d4be72be936329f5c0256"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=f13a03beada8b7c3991f98016ccc0b708b22090c#f13a03beada8b7c3991f98016ccc0b708b22090c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"app-error",
|
||||
@ -5087,9 +5071,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "smallstr"
|
||||
version = "0.2.0"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e922794d168678729ffc7e07182721a14219c65814e66e91b839a272fe5ae4f"
|
||||
checksum = "63b1aefdf380735ff8ded0b15f31aab05daf1f70216c01c02a12926badd1df9d"
|
||||
dependencies = [
|
||||
"smallvec",
|
||||
]
|
||||
@ -6335,7 +6319,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "workspace-template"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=208a353fefe08ff2521d4be72be936329f5c0256#208a353fefe08ff2521d4be72be936329f5c0256"
|
||||
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=f13a03beada8b7c3991f98016ccc0b708b22090c#f13a03beada8b7c3991f98016ccc0b708b22090c"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -6372,13 +6356,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "yrs"
|
||||
version = "0.16.5"
|
||||
version = "0.17.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4c2aef2bf89b4f7c003f9c73f1c8097427ca32e1d006443f3f607f11e79a797b"
|
||||
checksum = "86f2fbea97ed32722d4f09fcf1aace9daf36e8b2e72b1f605d5a1bee575fa0da"
|
||||
dependencies = [
|
||||
"atomic_refcell",
|
||||
"lib0",
|
||||
"rand 0.7.3",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"smallstr",
|
||||
"smallvec",
|
||||
"thiserror",
|
||||
|
@ -99,7 +99,7 @@ incremental = false
|
||||
# Run the script:
|
||||
# scripts/tool/update_client_api_rev.sh new_rev_id
|
||||
# ⚠️⚠️⚠️️
|
||||
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "208a353fefe08ff2521d4be72be936329f5c0256" }
|
||||
client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "f13a03beada8b7c3991f98016ccc0b708b22090c" }
|
||||
# Please use the following script to update collab.
|
||||
# Working directory: frontend
|
||||
#
|
||||
@ -109,11 +109,11 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "208
|
||||
# To switch to the local path, run:
|
||||
# scripts/tool/update_collab_source.sh
|
||||
# ⚠️⚠️⚠️️
|
||||
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "22e11ebb490039736cb2a81d9fe7dfe96782bc8b" }
|
||||
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "22e11ebb490039736cb2a81d9fe7dfe96782bc8b" }
|
||||
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "22e11ebb490039736cb2a81d9fe7dfe96782bc8b" }
|
||||
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "22e11ebb490039736cb2a81d9fe7dfe96782bc8b" }
|
||||
collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "22e11ebb490039736cb2a81d9fe7dfe96782bc8b" }
|
||||
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "22e11ebb490039736cb2a81d9fe7dfe96782bc8b" }
|
||||
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "22e11ebb490039736cb2a81d9fe7dfe96782bc8b" }
|
||||
collab-persistence = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "22e11ebb490039736cb2a81d9fe7dfe96782bc8b" }
|
||||
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e5c8f4a9a095f7a453e5ced42888bdf248c55358" }
|
||||
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e5c8f4a9a095f7a453e5ced42888bdf248c55358" }
|
||||
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e5c8f4a9a095f7a453e5ced42888bdf248c55358" }
|
||||
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e5c8f4a9a095f7a453e5ced42888bdf248c55358" }
|
||||
collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e5c8f4a9a095f7a453e5ced42888bdf248c55358" }
|
||||
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e5c8f4a9a095f7a453e5ced42888bdf248c55358" }
|
||||
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e5c8f4a9a095f7a453e5ced42888bdf248c55358" }
|
||||
collab-persistence = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "e5c8f4a9a095f7a453e5ced42888bdf248c55358" }
|
||||
|
@ -1501,10 +1501,10 @@ impl DatabaseViewOperation for DatabaseViewOperationImpl {
|
||||
.map(|field_id| {
|
||||
if !field_settings_map.contains_key(field_id) {
|
||||
let field_settings =
|
||||
FieldSettings::from_anymap(field_id, layout_type, &default_field_settings);
|
||||
FieldSettings::from_any_map(field_id, layout_type, &default_field_settings);
|
||||
(field_id.clone(), field_settings)
|
||||
} else {
|
||||
let field_settings = FieldSettings::from_anymap(
|
||||
let field_settings = FieldSettings::from_any_map(
|
||||
field_id,
|
||||
layout_type,
|
||||
field_settings_map.get(field_id).unwrap(),
|
||||
@ -1539,7 +1539,7 @@ impl DatabaseViewOperation for DatabaseViewOperationImpl {
|
||||
.unwrap()
|
||||
.to_owned();
|
||||
let field_settings =
|
||||
FieldSettings::from_anymap(field_id, layout_type, &default_field_settings);
|
||||
FieldSettings::from_any_map(field_id, layout_type, &default_field_settings);
|
||||
FieldSettings {
|
||||
field_id: field_settings.field_id.clone(),
|
||||
visibility: visibility.unwrap_or(field_settings.visibility),
|
||||
|
@ -59,7 +59,7 @@ pub(crate) fn database_view_setting_pb_from_view(view: DatabaseView) -> Database
|
||||
.into_inner()
|
||||
.into_iter()
|
||||
.map(|(field_id, field_settings)| {
|
||||
FieldSettings::from_anymap(&field_id, view.layout, &field_settings)
|
||||
FieldSettings::from_any_map(&field_id, view.layout, &field_settings)
|
||||
})
|
||||
.map(FieldSettingsPB::from)
|
||||
.collect::<Vec<FieldSettingsPB>>();
|
||||
|
@ -18,7 +18,7 @@ pub const WIDTH: &str = "width";
|
||||
pub const DEFAULT_WIDTH: i32 = 150;
|
||||
|
||||
impl FieldSettings {
|
||||
pub fn from_anymap(
|
||||
pub fn from_any_map(
|
||||
field_id: &str,
|
||||
layout_type: DatabaseLayout,
|
||||
field_settings: &FieldSettingsMap,
|
||||
|
@ -3,24 +3,6 @@ use flowy_database2::services::field_settings::FieldSettingsChangesetParams;
|
||||
|
||||
use crate::database::database_editor::DatabaseEditorTest;
|
||||
|
||||
#[allow(clippy::enum_variant_names)]
|
||||
pub enum FieldSettingsScript {
|
||||
AssertFieldSettings {
|
||||
field_ids: Vec<String>,
|
||||
visibility: FieldVisibility,
|
||||
width: i32,
|
||||
},
|
||||
AssertAllFieldSettings {
|
||||
visibility: FieldVisibility,
|
||||
width: i32,
|
||||
},
|
||||
UpdateFieldSettings {
|
||||
field_id: String,
|
||||
visibility: Option<FieldVisibility>,
|
||||
width: Option<i32>,
|
||||
},
|
||||
}
|
||||
|
||||
pub struct FieldSettingsTest {
|
||||
inner: DatabaseEditorTest,
|
||||
}
|
||||
@ -41,60 +23,54 @@ impl FieldSettingsTest {
|
||||
Self { inner }
|
||||
}
|
||||
|
||||
pub async fn run_scripts(&mut self, scripts: Vec<FieldSettingsScript>) {
|
||||
for script in scripts {
|
||||
self.run_script(script).await;
|
||||
pub async fn assert_field_settings(
|
||||
&mut self,
|
||||
field_ids: Vec<String>,
|
||||
visibility: FieldVisibility,
|
||||
width: i32,
|
||||
) {
|
||||
let field_settings = self
|
||||
.editor
|
||||
.get_field_settings(&self.view_id, field_ids)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
for field_setting in field_settings {
|
||||
assert_eq!(field_setting.width, width);
|
||||
assert_eq!(field_setting.visibility, visibility);
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn run_script(&mut self, script: FieldSettingsScript) {
|
||||
match script {
|
||||
FieldSettingsScript::AssertFieldSettings {
|
||||
field_ids,
|
||||
visibility,
|
||||
width,
|
||||
} => {
|
||||
let field_settings = self
|
||||
.editor
|
||||
.get_field_settings(&self.view_id, field_ids)
|
||||
.await
|
||||
.unwrap();
|
||||
pub async fn assert_all_field_settings(&mut self, visibility: FieldVisibility, width: i32) {
|
||||
let field_settings = self
|
||||
.editor
|
||||
.get_all_field_settings(&self.view_id)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
for field_settings in field_settings.into_iter() {
|
||||
assert_eq!(field_settings.width, width);
|
||||
assert_eq!(field_settings.visibility, visibility);
|
||||
}
|
||||
},
|
||||
FieldSettingsScript::AssertAllFieldSettings { visibility, width } => {
|
||||
let field_settings = self
|
||||
.editor
|
||||
.get_all_field_settings(&self.view_id)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
for field_settings in field_settings.into_iter() {
|
||||
assert_eq!(field_settings.width, width);
|
||||
assert_eq!(field_settings.visibility, visibility);
|
||||
}
|
||||
},
|
||||
FieldSettingsScript::UpdateFieldSettings {
|
||||
field_id,
|
||||
visibility,
|
||||
width,
|
||||
} => {
|
||||
let params = FieldSettingsChangesetParams {
|
||||
view_id: self.view_id.clone(),
|
||||
field_id,
|
||||
visibility,
|
||||
width,
|
||||
};
|
||||
let _ = self
|
||||
.editor
|
||||
.update_field_settings_with_changeset(params)
|
||||
.await;
|
||||
},
|
||||
for field_setting in field_settings {
|
||||
assert_eq!(field_setting.width, width);
|
||||
assert_eq!(field_setting.visibility, visibility);
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn update_field_settings(
|
||||
&mut self,
|
||||
field_id: String,
|
||||
visibility: Option<FieldVisibility>,
|
||||
width: Option<i32>,
|
||||
) {
|
||||
let params = FieldSettingsChangesetParams {
|
||||
view_id: self.view_id.clone(),
|
||||
field_id,
|
||||
visibility,
|
||||
width,
|
||||
};
|
||||
let _ = self
|
||||
.editor
|
||||
.update_field_settings_with_changeset(params)
|
||||
.await;
|
||||
}
|
||||
}
|
||||
|
||||
impl std::ops::Deref for FieldSettingsTest {
|
||||
|
@ -2,19 +2,21 @@ use flowy_database2::entities::FieldType;
|
||||
use flowy_database2::entities::FieldVisibility;
|
||||
use flowy_database2::services::field_settings::DEFAULT_WIDTH;
|
||||
|
||||
use crate::database::field_settings_test::script::FieldSettingsScript::*;
|
||||
use crate::database::field_settings_test::script::FieldSettingsTest;
|
||||
|
||||
/// Check default field settings for grid, kanban and calendar
|
||||
#[tokio::test]
|
||||
async fn get_default_field_settings() {
|
||||
async fn get_default_grid_field_settings() {
|
||||
// grid
|
||||
let mut test = FieldSettingsTest::new_grid().await;
|
||||
let scripts = vec![AssertAllFieldSettings {
|
||||
visibility: FieldVisibility::AlwaysShown,
|
||||
width: DEFAULT_WIDTH,
|
||||
}];
|
||||
test.run_scripts(scripts).await;
|
||||
test
|
||||
.assert_all_field_settings(FieldVisibility::AlwaysShown, DEFAULT_WIDTH)
|
||||
.await;
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn get_default_board_field_settings() {
|
||||
// board
|
||||
let mut test = FieldSettingsTest::new_board().await;
|
||||
let non_primary_field_ids: Vec<String> = test
|
||||
.get_fields()
|
||||
@ -23,20 +25,25 @@ async fn get_default_field_settings() {
|
||||
.map(|field| field.id)
|
||||
.collect();
|
||||
let primary_field_id = test.get_first_field(FieldType::RichText).id;
|
||||
let scripts = vec![
|
||||
AssertFieldSettings {
|
||||
field_ids: non_primary_field_ids.clone(),
|
||||
visibility: FieldVisibility::HideWhenEmpty,
|
||||
width: DEFAULT_WIDTH,
|
||||
},
|
||||
AssertFieldSettings {
|
||||
field_ids: vec![primary_field_id.clone()],
|
||||
visibility: FieldVisibility::AlwaysShown,
|
||||
width: DEFAULT_WIDTH,
|
||||
},
|
||||
];
|
||||
test.run_scripts(scripts).await;
|
||||
test
|
||||
.assert_field_settings(
|
||||
non_primary_field_ids.clone(),
|
||||
FieldVisibility::HideWhenEmpty,
|
||||
DEFAULT_WIDTH,
|
||||
)
|
||||
.await;
|
||||
test
|
||||
.assert_field_settings(
|
||||
vec![primary_field_id.clone()],
|
||||
FieldVisibility::AlwaysShown,
|
||||
DEFAULT_WIDTH,
|
||||
)
|
||||
.await;
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn get_default_calendar_field_settings() {
|
||||
// calendar
|
||||
let mut test = FieldSettingsTest::new_calendar().await;
|
||||
let non_primary_field_ids: Vec<String> = test
|
||||
.get_fields()
|
||||
@ -45,19 +52,20 @@ async fn get_default_field_settings() {
|
||||
.map(|field| field.id)
|
||||
.collect();
|
||||
let primary_field_id = test.get_first_field(FieldType::RichText).id;
|
||||
let scripts = vec![
|
||||
AssertFieldSettings {
|
||||
field_ids: non_primary_field_ids.clone(),
|
||||
visibility: FieldVisibility::HideWhenEmpty,
|
||||
width: DEFAULT_WIDTH,
|
||||
},
|
||||
AssertFieldSettings {
|
||||
field_ids: vec![primary_field_id.clone()],
|
||||
visibility: FieldVisibility::AlwaysShown,
|
||||
width: DEFAULT_WIDTH,
|
||||
},
|
||||
];
|
||||
test.run_scripts(scripts).await;
|
||||
test
|
||||
.assert_field_settings(
|
||||
non_primary_field_ids.clone(),
|
||||
FieldVisibility::HideWhenEmpty,
|
||||
DEFAULT_WIDTH,
|
||||
)
|
||||
.await;
|
||||
test
|
||||
.assert_field_settings(
|
||||
vec![primary_field_id.clone()],
|
||||
FieldVisibility::AlwaysShown,
|
||||
DEFAULT_WIDTH,
|
||||
)
|
||||
.await;
|
||||
}
|
||||
|
||||
/// Update field settings for a field
|
||||
@ -72,26 +80,40 @@ async fn update_field_settings_test() {
|
||||
.collect();
|
||||
let primary_field_id = test.get_first_field(FieldType::RichText).id;
|
||||
|
||||
let scripts = vec![
|
||||
AssertFieldSettings {
|
||||
field_ids: non_primary_field_ids,
|
||||
visibility: FieldVisibility::HideWhenEmpty,
|
||||
width: DEFAULT_WIDTH,
|
||||
},
|
||||
AssertFieldSettings {
|
||||
field_ids: vec![primary_field_id.clone()],
|
||||
visibility: FieldVisibility::AlwaysShown,
|
||||
width: DEFAULT_WIDTH,
|
||||
},
|
||||
UpdateFieldSettings {
|
||||
field_id: primary_field_id,
|
||||
visibility: Some(FieldVisibility::HideWhenEmpty),
|
||||
width: None,
|
||||
},
|
||||
AssertAllFieldSettings {
|
||||
visibility: FieldVisibility::HideWhenEmpty,
|
||||
width: DEFAULT_WIDTH,
|
||||
},
|
||||
];
|
||||
test.run_scripts(scripts).await;
|
||||
test
|
||||
.assert_field_settings(
|
||||
non_primary_field_ids.clone(),
|
||||
FieldVisibility::HideWhenEmpty,
|
||||
DEFAULT_WIDTH,
|
||||
)
|
||||
.await;
|
||||
test
|
||||
.assert_field_settings(
|
||||
vec![primary_field_id.clone()],
|
||||
FieldVisibility::AlwaysShown,
|
||||
DEFAULT_WIDTH,
|
||||
)
|
||||
.await;
|
||||
|
||||
test
|
||||
.update_field_settings(
|
||||
primary_field_id.clone(),
|
||||
Some(FieldVisibility::HideWhenEmpty),
|
||||
None,
|
||||
)
|
||||
.await;
|
||||
test
|
||||
.assert_field_settings(
|
||||
non_primary_field_ids.clone(),
|
||||
FieldVisibility::HideWhenEmpty,
|
||||
DEFAULT_WIDTH,
|
||||
)
|
||||
.await;
|
||||
test
|
||||
.assert_field_settings(
|
||||
vec![primary_field_id.clone()],
|
||||
FieldVisibility::HideWhenEmpty,
|
||||
DEFAULT_WIDTH,
|
||||
)
|
||||
.await;
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ lib-dispatch = { workspace = true }
|
||||
uuid.workspace = true
|
||||
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }
|
||||
dotenv = "0.15.0"
|
||||
yrs = "0.16.5"
|
||||
yrs = "0.17.1"
|
||||
assert-json-diff = "2.0.2"
|
||||
serde_json.workspace = true
|
||||
client-api = { version = "0.1.0" }
|
||||
|
Loading…
Reference in New Issue
Block a user