feat: row document (#2792)

* chore: create orphan view handler

* feat: save icon url and cover url in view

* feat: implement emoji picker UI

* chore: config ui

* chore: config ui again

* chore: replace RowPB with RowMetaPB to exposing more row information

* fix: compile error

* feat: show emoji in row

* chore: update

* test: insert emoji test

* test: add update emoji test

* test: add remove emoji test

* test: add create field tests

* test: add create row and delete row integration tests

* test: add create row from row menu

* test: document in row detail page

* test: delete, duplicate row in row detail page

* test: check the row count displayed in grid page

* test: rename existing field in grid page

* test: update field type of exisiting field in grid page

* test: delete field test

* test: add duplicate field test

* test: add hide field test

* test: add edit text cell test

* test: add insert text to text cell test

* test: add edit number cell test

* test: add edit multiple number cells

* test: add edit checkbox cell test

* feat: integrate editor into database row

* test: add edit create time and last edit time cell test

* test: add edit date cell by selecting a date test

* chore: remove unused code

* chore: update checklist bg color

* test: add update database layout test

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
This commit is contained in:
Nathan.fooo
2023-06-14 22:16:33 +08:00
committed by GitHub
parent b8983e4466
commit 27dd719aa8
145 changed files with 4414 additions and 1366 deletions

View File

@ -1,10 +1,10 @@
use crate::database::database_editor::DatabaseEditorTest;
use flowy_database2::entities::FieldType;
use flowy_database2::services::cell::stringify_cell_data;
use flowy_database2::services::field::CHECK;
use flowy_database2::services::share::csv::CSVFormat;
use crate::database::database_editor::DatabaseEditorTest;
#[tokio::test]
async fn export_meta_csv_test() {
let test = DatabaseEditorTest::new_grid().await;
@ -63,8 +63,8 @@ async fn export_and_then_import_meta_csv_test() {
assert_eq!(fields[9].field_type, 9);
for field in fields {
for (index, row) in rows.iter().enumerate() {
if let Some(cell) = row.cells.get(&field.id) {
for (index, row_detail) in rows.iter().enumerate() {
if let Some(cell) = row_detail.row.cells.get(&field.id) {
let field_type = FieldType::from(field.field_type);
let s = stringify_cell_data(cell, &field_type, &field_type, &field);
match &field_type {
@ -102,7 +102,7 @@ async fn export_and_then_import_meta_csv_test() {
} else {
panic!(
"Can not found the cell with id: {} in {:?}",
field.id, row.cells
field.id, row_detail.row.cells
);
}
}
@ -136,8 +136,8 @@ async fn history_database_import_test() {
assert_eq!(fields[7].field_type, 7);
for field in fields {
for (index, row) in rows.iter().enumerate() {
if let Some(cell) = row.cells.get(&field.id) {
for (index, row_detail) in rows.iter().enumerate() {
if let Some(cell) = row_detail.row.cells.get(&field.id) {
let field_type = FieldType::from(field.field_type);
let s = stringify_cell_data(cell, &field_type, &field_type, &field);
match &field_type {
@ -183,7 +183,7 @@ async fn history_database_import_test() {
} else {
panic!(
"Can not found the cell with id: {} in {:?}",
field.id, row.cells
field.id, row_detail.row.cells
);
}
}