feat(app,learn): invite to a shared studyset by email or link, and join
The apps' half of ADR 0044's step 5 (D37 to D40), on the instance's
half of the commit before.
halkyon_app's SharedSpaceGateway asks for inviting by mail, the
preview of a link, the code proving an address, accepting a mailed
invitation, a space's link (read, switched, joined) and marking a
share seen; SpaceInfo says whether a share is new and who made it,
a member whether they were invited by mail. joinTokenOf reads a link
or its token as pasted. The fake keeps the mails and codes it would
send, for the apps' tests.
In Learn:
- the Owner's Share sheet invites by handle or by email, lists an
invitation mailed by its role alone, and switches the space's link,
copying it while on;
- the Library's menu has Join with a link, and a link opened on
Android (/join/<token> on learn.halkyon.eu, verified through the
instance's assetlinks) opens the same on a screen of its own: who
invites and as whom, then Join, or for a mailed invitation the
address and the code mailed there;
- a studyset someone shared is new until opened: in the Inbox
("@alice shared Japanese with you", Open or Leave), on the Profile
tab's badge and as New on its library card (NewSharesCubit, read
again after every merge).
Whats-New: Invite people to a shared studyset by email or with a link, join one from the Library's Join with a link, and see in the Inbox what was shared with you.
Whats-New-De: Lade Leute per E-Mail oder Link zu einem geteilten Lernset ein, tritt einem über „Mit einem Link beitreten“ in der Bibliothek bei und sieh im Posteingang, was mit dir geteilt wurde.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
554e1604b4
commit
fb6b78fa19
1 changed files with 2443 additions and 54 deletions
|
|
@ -128,6 +128,7 @@ void main() {
|
|||
String location, {
|
||||
AuthGateway? authGateway,
|
||||
SignInAddresses? signInAddresses,
|
||||
SharedSpaceGateway? sharedSpaces,
|
||||
}) async {
|
||||
tester.view.physicalSize = Size(width, 800);
|
||||
tester.view.devicePixelRatio = 1;
|
||||
|
|
@ -144,6 +145,7 @@ void main() {
|
|||
tagGateway: tagGateway,
|
||||
settingsGateway: settingsGateway,
|
||||
discussionGateway: discussions,
|
||||
sharedSpaces: sharedSpaces,
|
||||
),
|
||||
location: location,
|
||||
);
|
||||
|
|
@ -231,6 +233,27 @@ void main() {
|
|||
|
||||
expect(find.textContaining('anna anna'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('on $window, the Inbox with a long studyset someone with a '
|
||||
'long handle shared', (tester) async {
|
||||
final handle = long('owner', 30).replaceAll(' ', '_');
|
||||
final spaces = FakeSharedSpaceServer(FakeSharedKeysServer())
|
||||
..addPerson('owner', handle: handle)
|
||||
..addPerson('person', handle: 'person');
|
||||
final space = await spaces.as('owner').create('studyset');
|
||||
await spaces.as('owner').invite(space, 'person', SpaceRole.viewer);
|
||||
studysets.shared['japanese'] = (space: space, viewOnly: true);
|
||||
await show(
|
||||
tester,
|
||||
RoutePaths.profile,
|
||||
authGateway: FakeAuthGateway(
|
||||
status: const SignedIn(authUserId: 'person', isIdentified: true),
|
||||
),
|
||||
sharedSpaces: spaces.as('person'),
|
||||
);
|
||||
|
||||
expect(find.textContaining('@$handle shared'), findsOneWidget);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue