mirror of
				https://github.com/AppFlowy-IO/AppFlowy.git
				synced 2025-10-31 18:15:09 +00:00 
			
		
		
		
	 a63a7ea611
			
		
	
	
		a63a7ea611
		
			
		
	
	
	
	
		
			
			* feat: hide/unhide ui * chore: implement collapsible side bar and adjust group header (#2) * refactor: hidden columns into own file * chore: adjust new group button position * fix: flowy icon buton secondary color bleed * chore: some UI adjustments * fix: some regressions * chore: proper group is_visible fetching * chore: use a bloc to manage hidden groups * fix: hiding groups not working * chore: implement hidden group popups * chore: proper ungrouped item column management * chore: remove ungrouped items button * chore: flowy hover build * fix: clean up code * test: integration tests * fix: not null promise on null value * fix: hide and unhide multiple groups * chore: i18n and code review * chore: missed review * fix: rust-lib-test * fix: dont completely remove flowyiconhovercolor * chore: apply suggest * fix: number of rows inside hidden groups not updating properly * fix: hidden groups disappearing after collapse * fix: hidden group title alignment * fix: insert newly unhidden groups into the correct position * chore: adjust padding all around * feat: reorder hidden groups * chore: adjust padding * chore: collapse hidden groups section persist * chore: no status group at beginning * fix: hiding groups when grouping with other types * chore: disable rename groups that arent supported * chore: update appflowy board ref * chore: better naming * test: fix tests --------- Co-authored-by: Mathias Mogensen <mathias@appflowy.io>
		
			
				
	
	
		
			59 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			59 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Rust
		
	
	
	
	
	
| use collab_database::views::DatabaseLayout;
 | |
| use flowy_database2::services::setting::BoardLayoutSetting;
 | |
| use flowy_database2::services::setting::CalendarLayoutSetting;
 | |
| 
 | |
| use crate::database::layout_test::script::DatabaseLayoutTest;
 | |
| use crate::database::layout_test::script::LayoutScript::*;
 | |
| 
 | |
| #[tokio::test]
 | |
| async fn board_layout_setting_test() {
 | |
|   let mut test = DatabaseLayoutTest::new_board().await;
 | |
|   let default_board_setting = BoardLayoutSetting::new();
 | |
|   let new_board_setting = BoardLayoutSetting {
 | |
|     hide_ungrouped_column: true,
 | |
|     ..default_board_setting
 | |
|   };
 | |
|   let scripts = vec![
 | |
|     AssertBoardLayoutSetting {
 | |
|       expected: default_board_setting,
 | |
|     },
 | |
|     UpdateBoardLayoutSetting {
 | |
|       new_setting: new_board_setting.clone(),
 | |
|     },
 | |
|     AssertBoardLayoutSetting {
 | |
|       expected: new_board_setting,
 | |
|     },
 | |
|   ];
 | |
|   test.run_scripts(scripts).await;
 | |
| }
 | |
| 
 | |
| #[tokio::test]
 | |
| async fn calendar_initial_layout_setting_test() {
 | |
|   let mut test = DatabaseLayoutTest::new_calendar().await;
 | |
|   let date_field = test.get_first_date_field().await;
 | |
|   let default_calendar_setting = CalendarLayoutSetting::new(date_field.id.clone());
 | |
|   let scripts = vec![AssertCalendarLayoutSetting {
 | |
|     expected: default_calendar_setting,
 | |
|   }];
 | |
|   test.run_scripts(scripts).await;
 | |
| }
 | |
| 
 | |
| #[tokio::test]
 | |
| async fn calendar_get_events_test() {
 | |
|   let mut test = DatabaseLayoutTest::new_calendar().await;
 | |
|   let scripts = vec![AssertDefaultAllCalendarEvents];
 | |
|   test.run_scripts(scripts).await;
 | |
| }
 | |
| 
 | |
| #[tokio::test]
 | |
| async fn grid_to_calendar_layout_test() {
 | |
|   let mut test = DatabaseLayoutTest::new_no_date_grid().await;
 | |
|   let scripts = vec![
 | |
|     UpdateDatabaseLayout {
 | |
|       layout: DatabaseLayout::Calendar,
 | |
|     },
 | |
|     AssertAllCalendarEventsCount { expected: 3 },
 | |
|   ];
 | |
|   test.run_scripts(scripts).await;
 | |
| }
 |