Skip to content

Commit c43d079

Browse files
committed
chore: enable create board
1 parent 9fe7c91 commit c43d079

File tree

6 files changed

+34
-7
lines changed

6 files changed

+34
-7
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Release Notes
22

3+
## Version 0.0.5 - beta.1 - 2022-08-25
4+
5+
New features
6+
- Board-view database
7+
- Group by single select
8+
- drag and drop cards
9+
- insert / delete cards
10+
11+
12+
313
## Version 0.0.4 - 2022-06-06
414
- Drag to adjust the width of a column
515
- Upgrade to Flutter 3.0

frontend/app_flowy/lib/plugins/board/board.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class BoardPluginBuilder implements PluginBuilder {
3131

3232
class BoardPluginConfig implements PluginConfig {
3333
@override
34-
bool get creatable => false;
34+
bool get creatable => true;
3535
}
3636

3737
class BoardPlugin extends Plugin {

frontend/app_flowy/lib/plugins/board/presentation/card/board_select_option_cell.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ class _BoardSelectOptionCellState extends State<BoardSelectOptionCell> {
4545
)
4646
.toList();
4747
return Padding(
48-
padding:
49-
EdgeInsets.symmetric(vertical: BoardSizes.cardCellVPadding),
48+
padding: EdgeInsets.only(top: BoardSizes.cardCellVPadding),
5049
child: Align(
5150
alignment: Alignment.centerLeft,
5251
child: AbsorbPointer(
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
class BoardSizes {
2-
static double get cardCellVPadding => 4;
2+
static double get cardCellVPadding => 6;
33
}

frontend/rust-lib/flowy-grid/src/services/field/type_options/selection_type_option/select_option.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ pub fn select_option_color_from_index(index: usize) -> SelectOptionColorPB {
157157
pub struct SelectOptionIds(Vec<String>);
158158

159159
impl SelectOptionIds {
160+
pub fn new() -> Self {
161+
Self(vec![])
162+
}
160163
pub fn into_inner(self) -> Vec<String> {
161164
self.0
162165
}
@@ -181,6 +184,12 @@ impl std::convert::From<String> for SelectOptionIds {
181184
}
182185
}
183186

187+
impl ToString for SelectOptionIds {
188+
fn to_string(&self) -> String {
189+
self.0.join(SELECTION_IDS_SEPARATOR)
190+
}
191+
}
192+
184193
impl std::convert::From<Option<String>> for SelectOptionIds {
185194
fn from(s: Option<String>) -> Self {
186195
match s {

frontend/rust-lib/flowy-grid/src/util.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ pub fn make_default_board() -> BuildGridContext {
8686
}
8787
1 => {
8888
row_builder.insert_text_cell(&text_field_id, "Learn French".to_string());
89-
row_builder.insert_select_option_cell(&multi_select_field_id, travel_option.id.clone());
89+
let mut options = SelectOptionIds::new();
90+
options.push(fun_option.id.clone());
91+
options.push(travel_option.id.clone());
92+
row_builder.insert_select_option_cell(&multi_select_field_id, options.to_string());
9093
}
9194

9295
2 => {
@@ -114,7 +117,10 @@ pub fn make_default_board() -> BuildGridContext {
114117

115118
2 => {
116119
row_builder.insert_text_cell(&text_field_id, "Write atomic essays ".to_string());
117-
row_builder.insert_select_option_cell(&multi_select_field_id, fun_option.id.clone());
120+
let mut options = SelectOptionIds::new();
121+
options.push(fun_option.id.clone());
122+
options.push(work_option.id.clone());
123+
row_builder.insert_select_option_cell(&multi_select_field_id, options.to_string());
118124
}
119125
_ => {}
120126
}
@@ -132,7 +138,10 @@ pub fn make_default_board() -> BuildGridContext {
132138
}
133139
1 => {
134140
row_builder.insert_text_cell(&text_field_id, "Visit Chicago".to_string());
135-
row_builder.insert_select_option_cell(&multi_select_field_id, travel_option.id.clone());
141+
let mut options = SelectOptionIds::new();
142+
options.push(travel_option.id.clone());
143+
options.push(fun_option.id.clone());
144+
row_builder.insert_select_option_cell(&multi_select_field_id, options.to_string());
136145
}
137146

138147
_ => {}

0 commit comments

Comments
 (0)