-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
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.84% 27.86% +0.02%
==========================================
Files 608 617 +9
Lines 41982 42261 +279
==========================================
+ Hits 11688 11778 +90
- Misses 30294 30483 +189
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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
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.
Very Nicee! Most awaited feature which boost-up user engagement. 🚀 🥳
Code is well structured with very good base setup for deep-linking. 👏
Can I have screen-recording for iOS devices deep-link example? I hope apple-app-site-association-json-file related stuff is configured and deep linking on iOS working fine which all the use-cases.
// disabled until we have the proper reading facilities ready, See #2373 | ||
// QrCodeButton( | ||
// qrCodeData: 'matrix:roomid/${spaceId.substring(1)}', | ||
// ), |
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.
Can't we put this when it is ready?
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.
as 2373 is running around at the same time, there is still a chance this can land here. but if not, sure, I can remove this before merging.
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.
removed.
yes, an iOS setup did exist -- though not yet the associated domains, as a) I can't do that on matrix.to and b) we didn't yet take over app.acter.global - this comes in the next step(s). but as I had to redo the certificate signing part, I am not sure this is still the case ... let me confirm this again. |
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_165527734.TS.mp4
refs #2223 :
In particular this PR does:
matrix:
https://matrix.to/
acter:
=> devise a schemespace(disabled, see New Room Preview facilities #2373)