Skip to content

Commit

Permalink
style: merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
zoli committed Sep 8, 2024
2 parents 7057439 + a1793b5 commit ec9bcca
Show file tree
Hide file tree
Showing 412 changed files with 14,657 additions and 3,193 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/flutter_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,26 @@ jobs:
- name: Run Docker-Compose
working-directory: AppFlowy-Cloud
env:
BACKEND_VERSION: 0.3.24-amd64
APPFLOWY_CLOUD_VERSION: 0.6.4-amd64
run: |
if [ "$(docker ps --filter name=appflowy-cloud -q)" == "" ]; then
container_id=$(docker ps --filter name=appflowy-cloud-appflowy_cloud-1 -q)
if [ -z "$container_id" ]; then
echo "AppFlowy-Cloud container is not running. Pulling and starting the container..."
docker compose pull
docker compose up -d
echo "Waiting for the container to be ready..."
sleep 10
else
echo "Docker container 'appflowy-cloud' is already running."
running_image=$(docker inspect --format='{{index .Config.Image}}' "$container_id")
if [ "$running_image" != "appflowy-cloud:$APPFLOWY_CLOUD_VERSION" ]; then
echo "AppFlowy-Cloud is running with an incorrect version. Pulling the correct version..."
docker compose pull
docker compose up -d
echo "Waiting for the container to be ready..."
sleep 10
else
echo "AppFlowy-Cloud is running with the correct version."
fi
fi
- name: Checkout source code
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ios_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:

env:
FLUTTER_VERSION: "3.22.0"
RUST_TOOLCHAIN: "1.77.2"
RUST_TOOLCHAIN: "1.80.1"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -45,12 +45,12 @@ jobs:
- uses: futureware-tech/simulator-action@v3
id: simulator-action
with:
model: 'iPhone 15'
model: "iPhone 15"
shutdown_after_job: false

build-macos:
if: github.event.pull_request.head.repo.full_name != github.repository
runs-on: macos-latest
runs-on: macos-13

steps:
- name: Checkout source code
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
- uses: davidB/rust-cargo-make@v1
with:
version: "0.36.6"
version: "0.37.15"

- name: Install prerequisites
working-directory: frontend
Expand All @@ -99,7 +99,7 @@ jobs:
- uses: futureware-tech/simulator-action@v3
id: simulator-action
with:
model: 'iPhone 15'
model: "iPhone 15"
shutdown_after_job: false

# - name: Run AppFlowy on simulator
Expand Down
45 changes: 42 additions & 3 deletions .github/workflows/rust_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,31 @@ jobs:
sed -i '' 's|RUST_LOG=.*|RUST_LOG=trace|' .env
sed -i '' 's|API_EXTERNAL_URL=.*|API_EXTERNAL_URL=http://localhost|' .env
- name: Ensure AppFlowy-Cloud is Running with Correct Version
working-directory: AppFlowy-Cloud
env:
APPFLOWY_CLOUD_VERSION: 0.6.4-amd64
run: |
container_id=$(docker ps --filter name=appflowy-cloud-appflowy_cloud-1 -q)
if [ -z "$container_id" ]; then
echo "AppFlowy-Cloud container is not running. Pulling and starting the container..."
docker compose pull
docker compose up -d
echo "Waiting for the container to be ready..."
sleep 10
else
running_image=$(docker inspect --format='{{index .Config.Image}}' "$container_id")
if [ "$running_image" != "appflowy-cloud:$APPFLOWY_CLOUD_VERSION" ]; then
echo "AppFlowy-Cloud is running with an incorrect version. Pulling the correct version..."
docker compose pull
docker compose up -d
echo "Waiting for the container to be ready..."
sleep 10
else
echo "AppFlowy-Cloud is running with the correct version."
fi
fi
- name: Run rust-lib tests
working-directory: frontend/rust-lib
env:
Expand Down Expand Up @@ -104,15 +129,29 @@ jobs:
sed -i 's|RUST_LOG=.*|RUST_LOG=trace|' .env
sed -i 's|API_EXTERNAL_URL=.*|API_EXTERNAL_URL=http://localhost|' .env
- name: Run Docker-Compose
- name: Ensure AppFlowy-Cloud is Running with Correct Version
working-directory: AppFlowy-Cloud
env:
APPFLOWY_CLOUD_VERSION: 0.6.4-amd64
run: |
if [ "$(docker ps --filter name=appflowy-cloud -q)" == "" ]; then
container_id=$(docker ps --filter name=appflowy-cloud-appflowy_cloud-1 -q)
if [ -z "$container_id" ]; then
echo "AppFlowy-Cloud container is not running. Pulling and starting the container..."
docker compose pull
docker compose up -d
echo "Waiting for the container to be ready..."
sleep 10
else
echo "Docker container 'appflowy-cloud' is already running."
running_image=$(docker inspect --format='{{index .Config.Image}}' "$container_id")
if [ "$running_image" != "appflowy-cloud:$APPFLOWY_CLOUD_VERSION" ]; then
echo "AppFlowy-Cloud is running with an incorrect version. Pulling the correct version..."
docker compose pull
docker compose up -d
echo "Waiting for the container to be ready..."
sleep 10
else
echo "AppFlowy-Cloud is running with the correct version."
fi
fi
- name: Run rust-lib tests
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
### Bug Fixes
- Removed Wayland header from AppImage build
- Fixed the issue where pasting web image on mobile failed.
- Fixed the issue where the name of newly created card in board view didn't show up.

## Version 0.6.7 - 13/08/2024
### New Features
Expand Down
2 changes: 1 addition & 1 deletion frontend/Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
CARGO_MAKE_CRATE_FS_NAME = "dart_ffi"
CARGO_MAKE_CRATE_NAME = "dart-ffi"
LIB_NAME = "dart_ffi"
APPFLOWY_VERSION = "0.6.8"
APPFLOWY_VERSION = "0.6.9"
FLUTTER_DESKTOP_FEATURES = "dart"
PRODUCT_NAME = "AppFlowy"
MACOSX_DEPLOYMENT_TARGET = "11.0"
Expand Down
7 changes: 7 additions & 0 deletions frontend/appflowy_flutter/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ android {
path "src/main/CMakeLists.txt"
}
}

// only support arm64-v8a
defaultConfig {
ndk {
abiFilters "arm64-v8a"
}
}
}

flutter {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
import 'dart:io';
import 'dart:ui';

import 'package:flutter/material.dart';

import 'package:appflowy/env/cloud_env.dart';
import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/startup/startup.dart';
import 'package:appflowy/user/application/auth/af_cloud_mock_auth_service.dart';
import 'package:appflowy/user/application/auth/auth_service.dart';
import 'package:appflowy/workspace/application/settings/prelude.dart';
import 'package:appflowy/workspace/presentation/settings/pages/account/account.dart';
import 'package:appflowy/workspace/presentation/settings/pages/settings_account_view.dart';
import 'package:appflowy/workspace/presentation/settings/shared/settings_body.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/setting_appflowy_cloud.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/uuid.dart';
import 'package:flowy_infra_ui/style_widget/text_field.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:intl/intl.dart';
Expand Down Expand Up @@ -51,12 +51,12 @@ void main() {

// Scroll to sign-in
await tester.scrollUntilVisible(
find.byType(SignInOutButton),
find.byType(AccountSignInOutButton),
100,
scrollable: find.findSettingsScrollable(),
);

await tester.tapButton(find.byType(SignInOutButton));
await tester.tapButton(find.byType(AccountSignInOutButton));

// sign up with Google
await tester.tapGoogleLoginInButton();
Expand All @@ -68,7 +68,7 @@ void main() {

// Scroll to sign-out
await tester.scrollUntilVisible(
find.byType(SignInOutButton),
find.byType(AccountSignInOutButton),
100,
scrollable: find.findSettingsScrollable(),
);
Expand All @@ -85,7 +85,7 @@ void main() {
await tester.openSettings();
await tester.openSettingsPage(SettingsPage.account);
final userNameInput =
tester.widget(find.byType(UserProfileSetting)) as UserProfileSetting;
tester.widget(find.byType(AccountUserProfile)) as AccountUserProfile;
expect(userNameInput.name, 'Me');
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:appflowy/startup/startup.dart';
import 'package:appflowy/user/application/auth/af_cloud_mock_auth_service.dart';
import 'package:appflowy/user/application/auth/auth_service.dart';
import 'package:appflowy/workspace/application/settings/prelude.dart';
import 'package:appflowy/workspace/presentation/settings/pages/account/account.dart';
import 'package:appflowy/workspace/presentation/settings/pages/settings_account_view.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/setting_appflowy_cloud.dart';
import 'package:easy_localization/easy_localization.dart';
Expand Down Expand Up @@ -41,11 +42,11 @@ void main() {

// Scroll to sign-out
await tester.scrollUntilVisible(
find.byType(SignInOutButton),
find.byType(AccountSignInOutButton),
100,
scrollable: find.findSettingsScrollable(),
);
await tester.tapButton(find.byType(SignInOutButton));
await tester.tapButton(find.byType(AccountSignInOutButton));

tester.expectToSeeText(LocaleKeys.button_ok.tr());
await tester.tapButtonWithName(LocaleKeys.button_ok.tr());
Expand All @@ -67,11 +68,11 @@ void main() {

// Scroll to sign-in
await tester.scrollUntilVisible(
find.byType(SignInOutButton),
find.byType(AccountSignInOutButton),
100,
scrollable: find.findSettingsScrollable(),
);
await tester.tapButton(find.byType(SignInOutButton));
await tester.tapButton(find.byType(AccountSignInOutButton));

tester.expectToSeeGoogleLoginButton();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@

import 'dart:io';

import 'package:flutter/material.dart';

import 'package:appflowy/env/cloud_env.dart';
import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/startup/startup.dart';
import 'package:appflowy/user/application/auth/af_cloud_mock_auth_service.dart';
import 'package:appflowy/user/application/auth/auth_service.dart';
import 'package:appflowy/workspace/application/settings/prelude.dart';
import 'package:appflowy/workspace/presentation/settings/pages/account/account_user_profile.dart';
import 'package:appflowy/workspace/presentation/settings/pages/settings_account_view.dart';
import 'package:appflowy/workspace/presentation/settings/widgets/setting_appflowy_cloud.dart';
import 'package:appflowy/workspace/presentation/widgets/user_avatar.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/uuid.dart';
import 'package:flowy_infra_ui/style_widget/text_field.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:path/path.dart' as p;
Expand Down Expand Up @@ -67,7 +67,7 @@ void main() {

// Verify name
final profileSetting =
tester.widget(find.byType(UserProfileSetting)) as UserProfileSetting;
tester.widget(find.byType(AccountUserProfile)) as AccountUserProfile;

expect(profileSetting.name, name);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void main() {
const fieldName = "test change field";
await tester.createField(
FieldType.RichText,
fieldName,
name: fieldName,
layout: ViewLayoutPB.Board,
);
await tester.tapButton(card1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:appflowy/util/field_type_extension.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pbenum.dart';
import 'package:appflowy_backend/protobuf/flowy-folder/protobuf.dart';
import 'package:flutter_test/flutter_test.dart';
Expand Down Expand Up @@ -41,7 +42,7 @@ void main() {
name: 'my grid',
layout: ViewLayoutPB.Grid,
);
await tester.createField(FieldType.RichText, 'description');
await tester.createField(FieldType.RichText, name: 'description');

await tester.editCell(
rowIndex: 0,
Expand Down Expand Up @@ -81,7 +82,7 @@ void main() {
const fieldType = FieldType.Number;

// Create a number field
await tester.createField(fieldType, fieldType.name);
await tester.createField(fieldType);

await tester.editCell(
rowIndex: 0,
Expand Down Expand Up @@ -157,7 +158,7 @@ void main() {
const fieldType = FieldType.CreatedTime;
// Create a create time field
// The create time field is not editable
await tester.createField(fieldType, fieldType.name);
await tester.createField(fieldType);

await tester.tapCellInGrid(rowIndex: 0, fieldType: fieldType);

Expand All @@ -175,7 +176,7 @@ void main() {
const fieldType = FieldType.LastEditedTime;
// Create a last time field
// The last time field is not editable
await tester.createField(fieldType, fieldType.name);
await tester.createField(fieldType);

await tester.tapCellInGrid(rowIndex: 0, fieldType: fieldType);

Expand All @@ -191,7 +192,7 @@ void main() {
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);

const fieldType = FieldType.DateTime;
await tester.createField(fieldType, fieldType.name);
await tester.createField(fieldType);

// Tap the cell to invoke the field editor
await tester.tapCellInGrid(rowIndex: 0, fieldType: fieldType);
Expand Down Expand Up @@ -366,7 +367,7 @@ void main() {
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);

const fieldType = FieldType.MultiSelect;
await tester.createField(fieldType, fieldType.name);
await tester.createField(fieldType, name: fieldType.i18n);

// Tap the cell to invoke the selection option editor
await tester.tapSelectOptionCellInGrid(rowIndex: 0, fieldType: fieldType);
Expand Down Expand Up @@ -449,7 +450,7 @@ void main() {
await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);

const fieldType = FieldType.Checklist;
await tester.createField(fieldType, fieldType.name);
await tester.createField(fieldType);

// assert that there is no progress bar in the grid
tester.assertChecklistCellInGrid(rowIndex: 0, percent: null);
Expand Down
Loading

0 comments on commit ec9bcca

Please sign in to comment.