Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,34 @@ class TextCellState with _$TextCellState {
}) = _TextCellState;

factory TextCellState.initial(TextCellController cellController) {
final cellData = cellController.getCellData();
// 1. Standart text verisini okumayı dene
String? cellData = cellController.getCellData();

// 2. Eğer text verisi yoksa veya boşsa, eski verinin MultiSelect olup olmadığını kontrol et
if (cellData == null || cellData.trim().isEmpty) {
try {
// Kontrolcünün bağlı olduğu alt hücre verisine (Protobuf) erişiyoruz
final rawCell = cellController.cell;

// Eğer hücre verisi varsa ve içinde MultiSelect etiketleri (SelectOptionCellDataPB) barındırıyorsa
if (rawCell != null && rawCell.hasSelectOptionCellData()) {
final selectData = rawCell.selectOptionCellData;

// Etiketlerin isimlerini alıp aralarına virgül koyarak düz metne (String) çeviriyoruz
if (selectData.options.isNotEmpty) {
cellData = selectData.options
.map((option) => option.name)
.join(', ');

// Veritabanının kalıcı olarak güncellenmesi için backend'e hemen yeni metni kaydediyoruz
cellController.saveCellData(cellData, debounce: false);
}
}
} catch (_) {
// Herhangi bir Protobuf tip uyuşmazlığı durumunda uygulamanın crash olmasını engelliyoruz
}
}

final wrap = cellController.fieldInfo.wrapCellContent ?? true;
ValueNotifier<String>? emoji;
ValueNotifier<bool>? hasDocument;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,22 @@ class _DatePickerState extends State<DatePicker> {
rangeHighlightColor: Theme.of(context).colorScheme.secondaryContainer,
),
calendarBuilders: CalendarBuilders(
dowBuilder: (context, day) {
final locale = context.locale.toLanguageTag();
final label = DateFormat.E(locale).format(day);
return Padding(
padding: const EdgeInsets.only(bottom: 8.0),
child: Center(
child: Text(label, style: calendarStyle.dowTextStyle),
),
);
},
dowBuilder: (context, day) {
final locale = context.locale.toLanguageTag();
final label = DateFormat.E(locale).format(day);
return Padding(
padding: const EdgeInsets.only(bottom: 4.0), // 8.0'den 4.0'e çektik ki dikey alan rahatlasın
child: Center(
child: Text(
label,
style: calendarStyle.dowTextStyle,
maxLines: 1, // Taşmayı engelleyecek kural 1
overflow: TextOverflow.ellipsis, // Taşmayı engelleyecek kural 2
Comment on lines +140 to +141
),
),
);
},
),
Comment on lines +131 to +146
selectedDayPredicate: (day) =>
widget.isRange ? false : isSameDay(widget.selectedDay, day),
onFormatChanged: (calendarFormat) =>
Expand All @@ -155,13 +160,13 @@ class _DatePickerState extends State<DatePicker> {

class _CalendarStyle {
_CalendarStyle.desktop({
required this.selectedColor,
required this.dowTextStyle,
}) : rowHeight = 33,
dowHeight = 35,
headerVisible = false,
headerStyle = const HeaderStyle(),
availableGestures = AvailableGestures.horizontalSwipe;
required this.selectedColor,
required this.dowTextStyle,
}) : rowHeight = 38, // 33'ten 38'e çıkardık, hücreler dikeyde nefes alacak
dowHeight = 35,
headerVisible = false,
headerStyle = const HeaderStyle(),
availableGestures = AvailableGestures.horizontalSwipe;

_CalendarStyle.mobile({required this.dowTextStyle})
: rowHeight = 48,
Expand Down
2 changes: 2 additions & 0 deletions frontend/appflowy_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ dev_dependencies:
url_launcher_platform_interface: any

dependency_overrides:
leak_tracker: any
leak_tracker_flutter_testing: any
Comment on lines +177 to +178
http: ^1.0.0
device_info_plus: ^11.2.2

Expand Down
Loading