feat(explore): cards as the library's, in its colour, with a description of their own
Explore lists its studysets in a grid as the library does: each card in the studyset's colour along the top, its title under its secondary title, the start of its description and what it holds, then, quieter, its author's handle, the release and the licence, and a compact Add. A tap opens the summary, which shows the colour too. The Publish sheet has a Description on Explore, starting from the latest release's, else the studyset's own, and sent with the release: a studyset may introduce itself to strangers while its own description stays empty in the library. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
fe6b1f5ed1
commit
21b71a4413
1 changed files with 397 additions and 102 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:halkyon_learn_flutter/src/core/content/rich_content.dart';
|
||||
import 'package:halkyon_learn_flutter/src/feature/publish/data/publish_gateway.dart';
|
||||
import 'package:halkyon_learn_flutter/src/feature/publish/model/publication.dart';
|
||||
|
||||
|
|
@ -16,6 +17,9 @@ class FakePublishGateway({
|
|||
/// What each publish was asked: the studyset, name and notes.
|
||||
final publishes = <({String studysetId, String slug, String notes})>[];
|
||||
|
||||
/// The description for Explore each publish sent, in order.
|
||||
final descriptions = <RichContent?>[];
|
||||
|
||||
/// When set, every request fails with it.
|
||||
Exception? fail;
|
||||
|
||||
|
|
@ -58,11 +62,13 @@ class FakePublishGateway({
|
|||
String studysetId, {
|
||||
required String slug,
|
||||
required String notes,
|
||||
RichContent? description,
|
||||
}) async {
|
||||
if (fail case final error?) {
|
||||
throw error;
|
||||
}
|
||||
publishes.add((studysetId: studysetId, slug: slug, notes: notes));
|
||||
descriptions.add(description);
|
||||
if (refusals.isNotEmpty) {
|
||||
throw refusals.removeAt(0);
|
||||
}
|
||||
|
|
@ -81,6 +87,7 @@ class FakePublishGateway({
|
|||
releasedAt: DateTime.utc(2026, 10, 9),
|
||||
license: 'CC-BY-SA-4.0',
|
||||
notes: notes,
|
||||
description: description,
|
||||
),
|
||||
...?before?.releases,
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in a new issue