-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deep linking setup #2360
base: main
Are you sure you want to change the base?
Deep linking setup #2360
Conversation
1c9a95c
to
34e9130
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2360 +/- ##
==========================================
+ Coverage 27.34% 27.37% +0.02%
==========================================
Files 604 613 +9
Lines 41888 42167 +279
==========================================
+ Hits 11455 11543 +88
- Misses 30433 30624 +191
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Currently translated at 100.0% (1135 of 1135 strings) Translation: Acter/App Translate-URL: http://weblate.acter.global/projects/acter-app/flutter-app/de/
|
||
class ParsingFailed extends UriParseError {} | ||
|
||
UriParseResult parseUri(Uri uri) => switch (uri.scheme) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Highly wrapped code, but just check the unit tests to understand the formats and what it does ...
import 'package:flutter_riverpod/flutter_riverpod.dart'; | ||
|
||
final quickActionVisibilityProvider = | ||
StateProvider.autoDispose<bool>((ref) => false); | ||
|
||
final appLinks = AppLinks(); // AppLinks is singleton |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
global setup according to applinks plugin
@@ -41,7 +41,7 @@ class BottomNavigationWidget extends ConsumerWidget { | |||
bottomNavNar(ref), | |||
AnimatedContainer( | |||
duration: const Duration(milliseconds: 300), | |||
height: showQuickActions ? 150 : 0, | |||
height: showQuickActions ? 180 : 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slightly more space for our new bottom bar.
return InkWell( | ||
onTap: () => shouldGoReplacement | ||
? context.pushReplacementNamed(Routes.myProfile.name) | ||
: context.pushNamed(Routes.myProfile.name), | ||
child: Card( | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(16), | ||
), | ||
child: Column( | ||
children: [ | ||
ListTile( | ||
leading: ActerAvatar( | ||
options: AvatarOptions.DM(accountInfo), | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactorted the UserHeader card a bit for usability:
- trailing now has the QR-code button
- the entire area is now clickable to get into the profile edit
import 'package:acter/features/users/widgets/user_info_drawer.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
const Key userInfoDrawer = Key('users-widgets-user-info-drawer'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly copy of the member-info-drawer section but adapted to our profile (which might even be missing) and doesn't have any room.
final globalUserProfileProvider = | ||
FutureProvider.family<UserProfile?, String>((ref, userId) async { | ||
final client = ref.watch(alwaysClientProvider); | ||
return (await client.searchUsers(userId)).toList().firstOrNull; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trying to find a user-id without any additional info goes over the search.
@@ -10,18 +10,20 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; | |||
import 'package:go_router/go_router.dart'; | |||
|
|||
class MessageUserButton extends ConsumerWidget { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved and simplified to work in both room-member and global-user-scenarios ...
|
||
final _log = Logger('a3::user::user_info_drawer'); | ||
|
||
class _UserInfoDrawerInner extends ConsumerWidget { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly a copy of the member_info_drawer. Just simplified and removed a few things we never have here.
import 'package:acter/features/deep_linking/utils.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
|
||
void main() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are all the parsing tests
This PR brings the infrastructure for deep-linking -- aka opening the App with custom provided links -- to Acter. Additionally, these links can also be shared via QR-Code and a corresponding QR-parsing facility is included.
Here as if a link was clicked:
PXL_20241122_164942060.TS.mp4
With QR code reader:
PXL_20241122_165422382.TS.mp4
Opening super invite via QR code:
PXL_20241122_165549728.TS.mp4
refs #2223 :
In particular this PR does:
matrix:
https://matrix.to/
acter:
=> devise a schemespace(disabled, see New Room Preview facilities #2373)