Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into kumar/refactor-pin-de…
Browse files Browse the repository at this point in the history
…tails
  • Loading branch information
gnunicorn committed Aug 14, 2024
2 parents 0bd3846 + a50283e commit 79071c5
Show file tree
Hide file tree
Showing 131 changed files with 3,001 additions and 593 deletions.
1 change: 1 addition & 0 deletions .changes/2060-spanish-and-arabic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Acter is now available in Spanish (thanks to Sandra) and in Arabic (thanks, Omar!)
2 changes: 1 addition & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
run: ls -ltas packages/rust_sdk/lib/

- name: Build Dart SDK
run: flutter pub global run dartdoc --output ../../../docs/api/main/dart-sdk/
run: flutter pub global run dartdoc --output ../../docs/api/main/dart-sdk/
working-directory: packages/rust_sdk

- name: Upload artifact
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/deploy-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
schedule:
- cron: 0 1 * * 0-3,5-6

permissions:
contents: write

jobs:
run_checker:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -277,7 +280,7 @@ jobs:
###### #### ## ## ## ####### ######## ## ####### ######## ######## #### ###### ## ##

publish:
environment: nightly
environment: release
runs-on: ubuntu-latest
name: Publish
if: ${{ github.event.schedule }}
Expand All @@ -288,7 +291,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/download-artifact@v3
with:
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.target || 'all' }}
cancel-in-progress: true

permissions:
contents: write

on:
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -66,9 +69,8 @@ jobs:
tag: v${{ inputs.new_version || steps.version.outputs.version }}
version: ${{ inputs.new_version || steps.version.outputs.version }}
build_num: ${{ steps.build_num.outputs.build_num }}
prev_tag: ${{ inputs.prev_tag || 'release-latest' }}
targets: ${{ inputs.target || 'all' }}
release_title: ${{ inputs.custom_title || 'Release'}}
release_title_prefix: ${{ inputs.custom_title || 'Release'}}
steps:
- id: version
# the suffix 0 allows us to provide up to 9 more hotfixes on the same day
Expand All @@ -83,7 +85,7 @@ jobs:
with:
build_num: ${{ needs.tags.outputs.build_num }}
version: ${{ needs.tags.outputs.version }}
release_title: ${{ needs.tags.outputs.release_title }} ${{ needs.tags.outputs.tag }}
release_title: "${{ needs.tags.outputs.release_title_prefix }} ${{ needs.tags.outputs.tag }}"
release_tag: ${{ needs.tags.outputs.tag }}
targets: ${{ needs.tags.outputs.targets }}
release: true
Expand Down Expand Up @@ -354,7 +356,7 @@ jobs:
###### #### ## ## ## ####### ######## ## ####### ######## ######## #### ###### ## ##

publish:
environment: nightly
environment: release
runs-on: ubuntu-latest
name: Publish
# if: ${{ github.event.schedule }}
Expand All @@ -365,7 +367,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -413,7 +415,7 @@ jobs:
# publish this full release now
draft: true
generate_release_notes: false
name: ${{ needs.tags.outputs.release_title }} ${{ needs.tags.outputs.tag }}
name: "${{ needs.tags.outputs.release_title_prefix }} ${{ needs.tags.outputs.tag }}"
tag_name: ${{ needs.tags.outputs.tag }}
body_path: CHANGELOG.md
prerelease: false
Expand Down
1 change: 0 additions & 1 deletion app/lib/common/actions/close_room.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import 'package:acter/common/providers/sdk_provider.dart';
import 'package:acter/common/providers/space_providers.dart';
import 'package:acter/common/toolkit/buttons/danger_action_button.dart';
import 'package:acter/common/utils/routes.dart';

import 'package:acter/common/widgets/room/room_profile_header.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
Expand Down
1 change: 0 additions & 1 deletion app/lib/common/actions/report_content.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:acter/common/providers/chat_providers.dart';
import 'package:acter/common/providers/room_providers.dart';
import 'package:acter/common/providers/space_providers.dart';

import 'package:acter/common/toolkit/buttons/primary_action_button.dart';
import 'package:acter/common/widgets/default_dialog.dart';
import 'package:acter/common/widgets/input_text_field.dart';
Expand Down
2 changes: 1 addition & 1 deletion app/lib/common/providers/common_providers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:flutter/material.dart';
import 'package:logging/logging.dart';
import 'package:riverpod/riverpod.dart';

final _log = Logger('a3::common::providers');
final _log = Logger('a3::common::common_providers');

// Loading Providers
final loadingProvider = StateProvider<bool>((ref) => false);
Expand Down
2 changes: 1 addition & 1 deletion app/lib/common/providers/notifiers/chat_notifiers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:flutter/widgets.dart';
import 'package:logging/logging.dart';
import 'package:riverpod/riverpod.dart';

final _log = Logger('a3::common::chat');
final _log = Logger('a3::common::chat_notifiers');

class AsyncConvoNotifier extends FamilyAsyncNotifier<Convo?, String> {
late Stream<bool> _listener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:acter_flutter_sdk/acter_flutter_sdk_ffi.dart';
import 'package:logging/logging.dart';
import 'package:riverpod/riverpod.dart';

final _log = Logger('a3::common::notification_settings');
final _log = Logger('a3::common::notification_settings_notifier');

class AsyncNotificationSettingsNotifier
extends AsyncNotifier<NotificationSettings> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:acter_flutter_sdk/acter_flutter_sdk_ffi.dart';
import 'package:logging/logging.dart';
import 'package:riverpod/riverpod.dart';

final _log = Logger('a3::common::reactions');
final _log = Logger('a3::common::reactions_notifiers');

class ReactionManagerNotifier
extends FamilyNotifier<ReactionManager, ReactionManager> {
Expand Down
4 changes: 2 additions & 2 deletions app/lib/common/providers/notifiers/room_notifiers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import 'package:acter/features/home/providers/client_providers.dart';
import 'package:acter_avatar/acter_avatar.dart';
import 'package:acter_flutter_sdk/acter_flutter_sdk_ffi.dart';
import 'package:flutter/material.dart';
import 'package:riverpod/riverpod.dart';
import 'package:logging/logging.dart';
import 'package:riverpod/riverpod.dart';

final _log = Logger('a3::common::room');
final _log = Logger('a3::common::room_notifiers');

class AsyncMaybeRoomNotifier extends FamilyAsyncNotifier<Room?, String> {
late Stream<bool> _listener;
Expand Down
4 changes: 2 additions & 2 deletions app/lib/common/providers/notifiers/space_notifiers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import 'dart:async';

import 'package:acter/features/home/providers/client_providers.dart';
import 'package:acter_flutter_sdk/acter_flutter_sdk_ffi.dart';
import 'package:riverpod/riverpod.dart';
import 'package:logging/logging.dart';
import 'package:riverpod/riverpod.dart';

final _log = Logger('a3::common::space');
final _log = Logger('a3::common::space_notifiers');

class AsyncMaybeSpaceNotifier extends FamilyAsyncNotifier<Space?, String> {
late Stream<bool> _listener;
Expand Down
3 changes: 2 additions & 1 deletion app/lib/common/utils/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import 'dart:async';
import 'dart:convert';
import 'dart:math';

import 'package:acter/common/providers/room_providers.dart';
import 'package:acter/common/utils/routes.dart';
import 'package:acter_flutter_sdk/acter_flutter_sdk.dart';
Expand All @@ -13,9 +14,9 @@ import 'package:flutter_chat_types/flutter_chat_types.dart' as types;
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import 'package:intl/intl.dart';
import 'package:jiffy/jiffy.dart';
import 'package:go_router/go_router.dart';
import 'package:logging/logging.dart';
import 'package:url_launcher/url_launcher.dart';

Expand Down
4 changes: 2 additions & 2 deletions app/lib/common/widgets/chat/edit_room_description_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import 'package:acter/common/providers/room_providers.dart';
import 'package:acter/common/toolkit/buttons/primary_action_button.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:logging/logging.dart';

final _log = Logger('a3::chat::room_description_edit_sheet');
final _log = Logger('a3::common::chat::room_description');

void showEditRoomDescriptionBottomSheet({
required BuildContext context,
Expand Down
40 changes: 0 additions & 40 deletions app/lib/common/widgets/download_button.dart

This file was deleted.

30 changes: 17 additions & 13 deletions app/lib/common/widgets/event/event_selector_drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import 'package:acter/features/events/widgets/event_item.dart';
import 'package:acter/features/events/widgets/skeletons/event_list_skeleton_widget.dart';
import 'package:atlas_icons/atlas_icons.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:logging/logging.dart';

final _log = Logger('a3::common::cal_event::select_drawer');

const Key selectEventDrawerKey = Key('event-widgets-select-event-drawer');

Expand Down Expand Up @@ -56,28 +60,28 @@ Future<String?> selectEventDrawer({
: ListView.builder(
padding: const EdgeInsets.all(8),
itemCount: eventsList.length,
itemBuilder: (context, index) {
final event = eventsList[index];
return EventItem(
event: event,
isShowRsvp: false,
onTapEventItem: (event) {
Navigator.pop(context, event);
},
);
},
itemBuilder: (context, index) => EventItem(
event: eventsList[index],
isShowRsvp: false,
onTapEventItem: (event) {
Navigator.pop(context, event);
},
),
),
),
],
);
},
error: (error, stack) {
_log.severe('Failed to load all cal events', error, stack);
return Center(
child: Text('Failed to load: $error'),
child: Text(L10n.of(context).failedToLoadEventsDueTo(error)),
);
},
loading: () =>
const SizedBox(height: 500, child: EventListSkeleton()),
loading: () => const SizedBox(
height: 500,
child: EventListSkeleton(),
),
);
},
),
Expand Down
14 changes: 2 additions & 12 deletions app/lib/common/widgets/image_dialog.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import 'dart:io';
import 'package:acter/common/themes/app_theme.dart';
import 'package:acter/common/widgets/download_button.dart';
import 'package:acter/features/files/widgets/share_file_button.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:share_plus/share_plus.dart';
import 'package:zoom_hover_pinch_image/zoom_hover_pinch_image.dart';

class ImageDialog extends ConsumerWidget {
Expand All @@ -19,7 +17,6 @@ class ImageDialog extends ConsumerWidget {

@override
Widget build(BuildContext context, WidgetRef ref) {
final canShare = !isDesktop;
return Dialog(
insetPadding: EdgeInsets.zero,
child: Scaffold(
Expand All @@ -32,14 +29,7 @@ class ImageDialog extends ConsumerWidget {
overflow: TextOverflow.ellipsis,
),
actions: [
if (canShare)
IconButton(
onPressed: () {
Share.shareXFiles([XFile(imageFile.path)]);
},
icon: const Icon(Icons.share),
),
DownloadButton(file: imageFile),
ShareFileButton(file: imageFile),
IconButton(
onPressed: () => Navigator.pop(context),
icon: const Icon(Icons.close),
Expand Down
17 changes: 12 additions & 5 deletions app/lib/common/widgets/room/select_room_drawer.dart
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import 'package:acter/common/providers/chat_providers.dart';
import 'package:acter/common/providers/room_providers.dart';
import 'package:acter/common/providers/space_providers.dart';

import 'package:acter/common/widgets/room/brief_room_list_entry.dart';
import 'package:acter_avatar/acter_avatar.dart';
import 'package:atlas_icons/atlas_icons.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:logging/logging.dart';
import 'package:path/path.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';

final _log = Logger('a3::common::room::select_drawer');

// ChildRoomType configures the sub child type of the `Spaces`
enum RoomType {
Expand Down Expand Up @@ -143,14 +145,14 @@ class _SelectRoomDrawerState extends ConsumerState<SelectRoomDrawer> {

//Show space list based on the search term
Widget searchedRoomsList(BuildContext context) {
final searchedrooms = ref.watch(
final searched = ref.watch(
switch (widget.roomType) {
RoomType.space => searchedSpacesProvider,
RoomType.groupChat => roomSearchedChatsProvider,
},
);

return searchedrooms.when(
return searched.when(
data: (rooms) {
if (rooms.isEmpty) {
return Center(
Expand All @@ -164,7 +166,12 @@ class _SelectRoomDrawerState extends ConsumerState<SelectRoomDrawer> {
heightFactor: 10,
child: CircularProgressIndicator(),
),
error: (e, s) => Center(child: Text(L10n.of(context).searchingFailed(e))),
error: (e, s) {
_log.severe('Failed to search space or convo', e, s);
return Center(
child: Text(L10n.of(context).searchingFailed(e)),
);
},
);
}

Expand Down
Loading

0 comments on commit 79071c5

Please sign in to comment.