Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into ben-desktop-tray
Browse files Browse the repository at this point in the history
  • Loading branch information
gnunicorn committed Aug 15, 2024
2 parents 4e807f4 + 704a16e commit 50d95fa
Show file tree
Hide file tree
Showing 459 changed files with 4,852 additions and 6,282 deletions.
2 changes: 0 additions & 2 deletions .changes/2044-event-fixes.md

This file was deleted.

1 change: 0 additions & 1 deletion .changes/2050-rageshake.md

This file was deleted.

39 changes: 11 additions & 28 deletions .github/workflows/docs.yml → .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
name: Docs
name: Reusable Docs Build

on:
push:
branches:
- main
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

workflow_call:

jobs:
docs:
runs-on: ubuntu-20.04
name: Build Latest API Docs
steps:
- uses: actions/checkout@v3
with:
submodules: true

# ---- setup of systems

- uses: actions/checkout@v4
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
Expand Down Expand Up @@ -52,25 +39,21 @@ jobs:
run: |
cargo doc -p acter -p acter-core -p matrix-sdk-store-media-cache-wrapper
echo --- Moving docs
mv target/doc/ docs/static/api/main/rust
mv target/doc/ docs/api/main/rust
- name: Build Dart App
run: flutter pub global run dartdoc --include-external integration_test/main_test.dart --output ../docs/static/api/main/app/
run: flutter pub global run dartdoc --include-external integration_test/main_test.dart --output ../docs/api/main/app/
working-directory: app

- name: Checking for bindings
run: ls -ltas packages/rust_sdk/lib/

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

# ---- Finalisation for github pages

- name: build zola
uses: shalzz/[email protected]
if: ${{ github.ref == 'refs/heads/main' }}
env:
BUILD_DIR: docs
PAGES_BRANCH: "gh-pages"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload the docs
path: 'docs/'
26 changes: 26 additions & 0 deletions .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Docs

on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

docs:
uses: ./.github/workflows/build-docs.yml
secrets: inherit

deploy:
runs-on: ubuntu-20.04
if: ${{ github.ref == 'refs/heads/main' }}
needs:
- docs
name: Build Latest API Docs
steps:
- name: Deploy to GitHub Pages
if: ${{ github.ref == 'refs/heads/main' }}
id: deployment
uses: actions/deploy-pages@v4
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Demo builds

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy Docs

on:
push:
branches: ["main"]

workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:

docs:
uses: ./.github/workflows/build-docs.yml
secrets: inherit

deploy:
runs-on: ubuntu-20.04
if: ${{ github.ref == 'refs/heads/main' }}
needs:
- docs
name: Build Latest API Docs
steps:
- name: Deploy to GitHub Pages
if: ${{ github.ref == 'refs/heads/main' }}
id: deployment
uses: actions/deploy-pages@v4
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
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 All @@ -377,21 +379,10 @@ jobs:
git config --global user.name 'Sari'
git config --global user.email '[email protected]'
- name: "Generate docs"
run: |
echo "+++" > docs/content/releases/${{ needs.tags.outputs.version }}.md
echo "title = \" ${{ needs.tags.outputs.tag }}\"" >> docs/content/releases/${{ needs.tags.outputs.version }}.md
echo "template = \"releases/release.html\"" >> docs/content/releases/${{ needs.tags.outputs.version }}.md
echo "date = `date +%Y-%m-%d`" >> docs/content/releases/${{ needs.tags.outputs.version }}.md
echo "+++" >> docs/content/releases/${{ needs.tags.outputs.version }}.md
echo "" >> docs/content/releases/${{ needs.tags.outputs.version }}.md
cat CHANGELOG.md >> docs/content/releases/${{ needs.tags.outputs.version }}.md
- name: Clear old docs
continue-on-error: true
run: |
git rm .changes/*.md
git commit -m "Clearing .changes for ${{ needs.tags.outputs.version }}"
- name: "Update flatpack version"
run : |
Expand All @@ -400,7 +391,6 @@ jobs:
- name: Tag for release
run: |
git add "docs/content/releases/${{ needs.tags.outputs.version }}.md"
echo "Add release ${{ needs.tags.outputs.tag }}"
git commit -m "Releasing ${{ needs.tags.outputs.tag }}"
git tag ${{ needs.tags.outputs.tag }}
Expand All @@ -413,7 +403,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
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "docs/themes/adidoks"]
path = docs/themes/adidoks
url = https://github.com/aaranxu/adidoks.git
12 changes: 4 additions & 8 deletions app/integration_test/tests/pins.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'package:acter/common/utils/constants.dart';
import 'package:acter/common/widgets/html_editor.dart';
import 'package:acter/common/widgets/spaces/select_space_form_field.dart';
import 'package:acter/features/home/data/keys.dart';
import 'package:acter/features/pins/pages/create_pin.dart';
import 'package:acter/features/pins/pages/pin_page.dart';
import 'package:acter/features/pins/pages/create_pin_page.dart';
import 'package:acter/features/pins/widgets/pin_item.dart';
import 'package:acter/features/search/model/keys.dart';
import 'package:appflowy_editor/appflowy_editor.dart';
Expand Down Expand Up @@ -56,23 +56,19 @@ extension ActerNews on ConvenientTest {
await pinActionKey.should(findsOneWidget);
await pinActionKey.tap();

final titleField = find.byKey(CreatePinPage.titleFieldKey);
final titleField = find.byKey(CreatePin.titleFieldKey);
await titleField.should(findsOneWidget);
await titleField.enterTextWithoutReplace(title);

final urlField = find.byKey(CreatePinPage.urlFieldKey);
await urlField.should(findsOneWidget);
await urlField.enterTextWithoutReplace(url);

final descriptionField = find.byKey(CreatePinPage.descriptionFieldKey);
final descriptionField = find.byKey(CreatePin.descriptionFieldKey);
await descriptionField.should(findsOneWidget);
final textEditorState =
(tester.firstState(descriptionField) as HtmlEditorState).editorState;
await textEditorState.insertText(0, content, path: [0]);
textEditorState.service.keyboardService!.closeKeyboard();
await selectSpace(spaceId, SelectSpaceFormField.openKey);

final submit = find.byKey(CreatePinPage.submitBtn);
final submit = find.byKey(CreatePin.submitBtn);
await tester.ensureVisible(submit);
await submit.tap();
}
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
10 changes: 9 additions & 1 deletion app/lib/common/models/types.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ typedef MemberInfo = ({String userId, String roomId});
typedef ChatMessageInfo = ({String messageId, String roomId});
typedef RoomQuery = ({String roomId, String query});

enum AttachmentType { camera, image, audio, video, location, file }
enum AttachmentType {
camera,
image,
audio,
video,
location,
file,
link,
}

typedef AttachmentInfo = ({AttachmentType type, File file});

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
Loading

0 comments on commit 50d95fa

Please sign in to comment.