Skip to content

Commit

Permalink
fix: icon and test
Browse files Browse the repository at this point in the history
  • Loading branch information
Xazin committed Nov 4, 2024
1 parent 98eedf5 commit 1dba983
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,27 +269,27 @@ void main() {
await tester.dismissCellEditor();
await tester.pumpAndSettle();

// Open first row in row detail view then toggle hide file names
// Open first row in row detail view then toggle show file names
await tester.openFirstRowDetailPage();
await tester.pumpAndSettle();

// Expect file names to be shown
expect(find.text('sample.jpeg'), findsOneWidget);
expect(find.text('sample.gif'), findsOneWidget);
// Expect file names to not be shown (hidden)
expect(find.text('sample.jpeg'), findsNothing);
expect(find.text('sample.gif'), findsNothing);

await tester.tapGridFieldWithNameInRowDetailPage('Type');
await tester.pumpAndSettle();

// Toggle hide file names
// Toggle show file names
await tester.tap(find.byType(Toggle));
await tester.pumpAndSettle();

await tester.dismissRowDetailPage();
await tester.pumpAndSettle();

// Expect file names to be hidden
expect(find.text('sample.jpeg'), findsNothing);
expect(find.text('sample.gif'), findsNothing);
// Expect file names to be shown
expect(find.text('sample.jpeg'), findsOneWidget);
expect(find.text('sample.gif'), findsOneWidget);

// Remove the temp files
await Future.wait([firstFile.delete(), secondFile.delete()]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class MediaCellState with _$MediaCellState {
required String fieldName,
@Default([]) List<MediaFilePB> files,
@Default(false) showAllFiles,
@Default(false) hideFileNames,
@Default(true) hideFileNames,
}) = _MediaCellState;

factory MediaCellState.initial(MediaCellController cellController) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ class _FileUploadLocalState extends State<_FileUploadLocal> {
FlowyText(
LocaleKeys.document_plugins_file_dropFileToUpload
.tr(),
fontSize: 16,
fontSize: 14,
fontWeight: FontWeight.w500,
color: Theme.of(context).hintColor,
),
] else ...[
Expand All @@ -205,8 +206,8 @@ class _FileUploadLocalState extends State<_FileUploadLocal> {
.document_plugins_file_fileUploadHint
.tr(),
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 14,
fontWeight: FontWeight.w500,
color: Theme.of(context).hintColor,
),
),
Expand All @@ -215,8 +216,8 @@ class _FileUploadLocalState extends State<_FileUploadLocal> {
.document_plugins_file_fileUploadHintSuffix
.tr(),
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 14,
fontWeight: FontWeight.w500,
color:
Theme.of(context).colorScheme.primary,
),
Expand Down
2 changes: 1 addition & 1 deletion frontend/resources/flowy_icons/16x/ft_text.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 2 additions & 9 deletions frontend/resources/flowy_icons/16x/media.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1dba983

Please sign in to comment.