implemented foreign timetable support for students, teachers, rooms, and classes, including a searchable element picker with favorites support, introduced a capabilities system for feature gating, refactored the timetable UI into a reusable TimetableCalendarView component, and redesigned the chat input field with a unified emoji picker and integrated attachment actions.

This commit is contained in:
2026-05-31 21:29:16 +02:00
parent 6e12da08c0
commit b6d06dd3b4
41 changed files with 2325 additions and 290 deletions
+64
View File
@@ -0,0 +1,64 @@
import 'package:emoji_picker_flutter/emoji_picker_flutter.dart' as emojis;
import 'package:flutter/material.dart';
import 'emoji_text.dart';
/// Shows the app-wide emoji picker and resolves with the chosen emoji, or
/// `null` if the dialog was dismissed without a selection.
///
/// Single source of truth for the picker styling so every entry point (message
/// reactions, the compose field, …) looks and behaves the same.
Future<String?> showEmojiPicker(
BuildContext context, {
String title = 'Emoji wählen',
}) {
return showDialog<String>(
context: context,
builder: (pickerCtx) => AlertDialog(
contentPadding: const EdgeInsets.all(15),
titlePadding: const EdgeInsets.only(left: 6, top: 15),
title: Row(
children: [
IconButton(
onPressed: () => Navigator.of(pickerCtx).pop(),
icon: const Icon(Icons.arrow_back),
),
const SizedBox(width: 10),
Text(title),
],
),
content: SizedBox(
width: double.maxFinite,
height: 360,
child: emojis.EmojiPicker(
config: emojis.Config(
height: 360,
emojiViewConfig: emojis.EmojiViewConfig(
backgroundColor: Theme.of(pickerCtx).canvasColor,
recentsLimit: 67,
emojiSizeMax: EmojiText.sizeLarge,
noRecents: const Text('Keine zuletzt verwendeten Emojis'),
columns: 7,
),
bottomActionBarConfig: const emojis.BottomActionBarConfig(
enabled: false,
),
categoryViewConfig: emojis.CategoryViewConfig(
backgroundColor: Theme.of(pickerCtx).hoverColor,
iconColorSelected: Theme.of(pickerCtx).primaryColor,
indicatorColor: Theme.of(pickerCtx).primaryColor,
),
searchViewConfig: emojis.SearchViewConfig(
backgroundColor: Theme.of(pickerCtx).dividerColor,
hintText: 'Suchen',
buttonIconColor: Colors.white,
),
),
onEmojiSelected: (_, emoji) {
Navigator.of(pickerCtx).pop(emoji.emoji);
},
),
),
),
);
}
+36
View File
@@ -0,0 +1,36 @@
import 'package:flutter/material.dart';
/// Central place for rendering emoji glyphs (reactions, pickers, …).
///
/// Emojis used to be drawn as bare `Text(emoji)` widgets all over the Talk UI,
/// which meant they inherited the small default body text size and looked
/// inconsistent. [EmojiText] gives every emoji a uniform, comfortably large
/// size and forces the platform's color-emoji font so the rendering is the same
/// everywhere.
class EmojiText extends StatelessWidget {
/// Size for emojis shown inline next to other text, e.g. reaction chips.
static const double sizeInline = 15;
/// Default size for standalone emojis, e.g. list leadings.
static const double sizeStandard = 20;
/// Size for primary tap targets, e.g. the quick-reaction buttons.
static const double sizeLarge = 24;
final String emoji;
final double size;
const EmojiText(this.emoji, {this.size = sizeStandard, super.key});
@override
Widget build(BuildContext context) => Text(
emoji,
style: TextStyle(
fontSize: size,
height: 1.0,
// Render emojis with the platform color-emoji font instead of the app
// font, so they look identical across all usages and devices.
fontFamilyFallback: const ['Noto Color Emoji', 'Apple Color Emoji'],
),
);
}