Skip to content

79 fix widgetbook error and deploy to firebase #89

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

Merged
merged 19 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4a1207b
feat: add assets package and update dependencies
jjoonleo Jan 18, 2025
0eb4ca2
feat: add GitHub Actions workflow for Firebase Hosting deployment on …
jjoonleo Jan 19, 2025
cd7e9d6
feat: install npm packages before Firebase Hosting deployment
jjoonleo Jan 19, 2025
4e5d9b3
fix: change npm install command to npm init in GitHub Actions workflow
jjoonleo Jan 19, 2025
e0bc084
feat: add initial package.json for Flutter project setup
jjoonleo Jan 19, 2025
575e578
feat: update GitHub Actions workflow to set Node.js version before np…
jjoonleo Jan 19, 2025
58bf60a
refactor: remove Node.js setup and npm install steps from Firebase Ho…
jjoonleo Jan 19, 2025
1f375d5
feat: add npm ci step for widgetbook directory in Firebase Hosting wo…
jjoonleo Jan 19, 2025
e4df775
fix: update Firebase Hosting workflow to set entry point for widgetbo…
jjoonleo Jan 19, 2025
caff2ec
feat: update Firebase Hosting workflow to include Flutter build steps…
jjoonleo Jan 19, 2025
5d0fd15
feat: update Flutter version to 3.27.1 in Firebase Hosting workflow
jjoonleo Jan 19, 2025
4dafc9d
refactor: remove unused dart run commands from Firebase Hosting workflow
jjoonleo Jan 19, 2025
074e185
feat: add flutter version check step in Firebase Hosting workflow
jjoonleo Jan 19, 2025
039ba62
fix: simplify Flutter build command in Firebase Hosting workflow
jjoonleo Jan 19, 2025
67fbcfe
fix: update project ID in Firebase Hosting workflow configuration
jjoonleo Jan 19, 2025
33260cd
feat: update permissions in Firebase Hosting workflow for pull requests
jjoonleo Jan 19, 2025
d220adb
feat: add Firebase Hosting deployment workflow for main branch merges
jjoonleo Jan 19, 2025
ad49065
fix: update Firebase Hosting workflows to include FIREBASE_CLI_EXPERI…
jjoonleo Jan 19, 2025
dfb9906
feat: update Firebase Hosting workflow to set permissions and include…
jjoonleo Jan 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on PR
'on': pull_request
permissions:
checks: write
contents: read
pull-requests: write
jobs:
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest
env:
working-directory: ./widgetbook
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v1
with:
java-version: "12.x"
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.27.1"
channel: "stable"

- run: flutter --version

- run: flutter pub get
working-directory: ${{ env.working-directory }}

- run: dart run build_runner build
working-directory: ${{ env.working-directory }}

- run: flutter build web
working-directory: ${{ env.working-directory }}

- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_ON_TIME_FRONT_WIDGETBOOK }}'
projectId: on-time-front-widgetbook
entryPoint: ${{ env.working-directory }}
env:
FIREBASE_CLI_EXPERIMENTS: webframeworks
46 changes: 46 additions & 0 deletions .github/workflows/firebase_hosting_merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
'on':
push:
branches:
- main
permissions:
checks: write
contents: read
pull-requests: write
jobs:
build_and_deploy:
runs-on: ubuntu-latest
env:
working-directory: ./widgetbook
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v1
with:
java-version: "12.x"
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.27.1"
channel: "stable"
- run: flutter pub get
working-directory: ${{ env.working-directory }}

- run: dart run build_runner build
working-directory: ${{ env.working-directory }}

- run: flutter test
working-directory: ${{ env.working-directory }}

- run: flutter build web
working-directory: ${{ env.working-directory }}
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_ON_TIME_FRONT_WIDGETBOOK }}'
channelId: live
projectId: on-time-front-widgetbook
entryPoint: ${{ env.working-directory }}
env:
FIREBASE_CLI_EXPERIMENTS: webframeworks
14 changes: 14 additions & 0 deletions assets/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: assets
description: >
Holds the assets for the app. The assets are included in a
separate package, to be able to share it with Widgetbook app.

version: 0.0.0
publish_to: none

environment:
sdk: ">=3.1.0 <4.0.0"

flutter:
assets:
- .
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "on_time_front",
"version": "1.0.0",
"description": "A new Flutter project.",
"main": "index.js",
"directories": {
"lib": "lib",
"test": "test"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
3 changes: 3 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ environment:
dependencies:
flutter:
sdk: flutter

assets:
path: assets


drift: ^2.21.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ void main() {

final scheduleEntityId = uuid.v7();
final preparationStepEntityId = uuid.v7();
final userEntityId = uuid.v7();

final tPreparationStepList = [
PreparationStepEntity(
Expand Down
2 changes: 2 additions & 0 deletions widgetbook/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/

# IntelliJ related
Expand Down
1 change: 1 addition & 0 deletions widgetbook/assets
100 changes: 88 additions & 12 deletions widgetbook/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,49 +1,125 @@
PODS:
- AppAuth (1.7.6):
- AppAuth/Core (= 1.7.6)
- AppAuth/ExternalUserAgent (= 1.7.6)
- AppAuth/Core (1.7.6)
- AppAuth/ExternalUserAgent (1.7.6):
- AppAuth/Core
- Flutter (1.0.0)
- flutter_appauth (0.0.1):
- AppAuth (= 1.7.6)
- Flutter
- flutter_web_auth (0.6.0):
- Flutter
- google_sign_in_ios (0.0.1):
- AppAuth (>= 1.7.4)
- Flutter
- FlutterMacOS
- GoogleSignIn (~> 7.1)
- GTMSessionFetcher (>= 3.4.0)
- GoogleSignIn (7.1.0):
- AppAuth (< 2.0, >= 1.7.3)
- GTMAppAuth (< 5.0, >= 4.1.1)
- GTMSessionFetcher/Core (~> 3.3)
- GTMAppAuth (4.1.1):
- AppAuth/Core (~> 1.7)
- GTMSessionFetcher/Core (< 4.0, >= 3.3)
- GTMSessionFetcher (3.5.0):
- GTMSessionFetcher/Full (= 3.5.0)
- GTMSessionFetcher/Core (3.5.0)
- GTMSessionFetcher/Full (3.5.0):
- GTMSessionFetcher/Core
- kakao_flutter_sdk_common (1.9.6):
- Flutter
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- sqlite3 (3.47.0):
- sqlite3/common (= 3.47.0)
- sqlite3/common (3.47.0)
- sqlite3/dbstatvtab (3.47.0):
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- sqlite3 (3.47.1):
- sqlite3/common (= 3.47.1)
- sqlite3/common (3.47.1)
- sqlite3/dbstatvtab (3.47.1):
- sqlite3/common
- sqlite3/fts5 (3.47.0):
- sqlite3/fts5 (3.47.1):
- sqlite3/common
- sqlite3/perf-threadsafe (3.47.0):
- sqlite3/perf-threadsafe (3.47.1):
- sqlite3/common
- sqlite3/rtree (3.47.0):
- sqlite3/rtree (3.47.1):
- sqlite3/common
- sqlite3_flutter_libs (0.0.1):
- Flutter
- sqlite3 (~> 3.47.0)
- FlutterMacOS
- sqlite3 (~> 3.47.1)
- sqlite3/dbstatvtab
- sqlite3/fts5
- sqlite3/perf-threadsafe
- sqlite3/rtree
- url_launcher_ios (0.0.1):
- Flutter
- webview_flutter_wkwebview (0.0.1):
- Flutter
- FlutterMacOS

DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_appauth (from `.symlinks/plugins/flutter_appauth/ios`)
- flutter_web_auth (from `.symlinks/plugins/flutter_web_auth/ios`)
- google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`)
- kakao_flutter_sdk_common (from `.symlinks/plugins/kakao_flutter_sdk_common/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/darwin`)

SPEC REPOS:
trunk:
- AppAuth
- GoogleSignIn
- GTMAppAuth
- GTMSessionFetcher
- sqlite3

EXTERNAL SOURCES:
Flutter:
:path: Flutter
flutter_appauth:
:path: ".symlinks/plugins/flutter_appauth/ios"
flutter_web_auth:
:path: ".symlinks/plugins/flutter_web_auth/ios"
google_sign_in_ios:
:path: ".symlinks/plugins/google_sign_in_ios/darwin"
kakao_flutter_sdk_common:
:path: ".symlinks/plugins/kakao_flutter_sdk_common/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
sqlite3_flutter_libs:
:path: ".symlinks/plugins/sqlite3_flutter_libs/ios"
:path: ".symlinks/plugins/sqlite3_flutter_libs/darwin"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
webview_flutter_wkwebview:
:path: ".symlinks/plugins/webview_flutter_wkwebview/darwin"

SPEC CHECKSUMS:
AppAuth: d4f13a8fe0baf391b2108511793e4b479691fb73
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_appauth: aff60f61e4a80b8b5c051615f00bf8f3b54fc5e8
flutter_web_auth: acc15a8fd7bba796a933c724a6dffc3d00f07c27
google_sign_in_ios: 07375bfbf2620bc93a602c0e27160d6afc6ead38
GoogleSignIn: d4281ab6cf21542b1cfaff85c191f230b399d2db
GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de
GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6
kakao_flutter_sdk_common: 4f10f98226da5d0f7cbdeeaed5cc21f144515209
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
sqlite3: 0aa20658a9b238a3b1ff7175eb7bdd863b0ab4fd
sqlite3_flutter_libs: b55ef23cfafea5318ae5081e0bf3fbbce8417c94
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
sqlite3: 1e522f0938463e44b7faf50393b40bdc1e1e456d
sqlite3_flutter_libs: 1b4e98da20ebd4e9b1240269b78cdcf492dbe9f3
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
webview_flutter_wkwebview: 0982481e3d9c78fd5c6f62a002fcd24fc791f1e4

PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796

Expand Down
18 changes: 18 additions & 0 deletions widgetbook/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
997A6D7B5D7BB88E519EB28C /* [CP] Embed Pods Frameworks */,
6521A2BE52EA95EAC49B9CCB /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -308,6 +309,23 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
6521A2BE52EA95EAC49B9CCB /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
Expand Down
2 changes: 1 addition & 1 deletion widgetbook/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:on_time_front/shared/theme/theme.dart';
import 'package:on_time_front/presentation/shared/theme/theme.dart';
import 'package:widgetbook/widgetbook.dart';
import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook;

Expand Down
15 changes: 14 additions & 1 deletion widgetbook/lib/reorderable_list.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
import 'package:flutter/material.dart';
import 'package:on_time_front/presentation/onboarding/onboarding_screen.dart';
import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook;
import 'package:on_time_front/presentation/onboarding/preparation_reordarable_list.dart';

@widgetbook.UseCase(name: 'Default', type: PreparationReorderableList)
Widget buildTileUseCase(BuildContext context) {
return const Scaffold(body: PreparationReorderableList());
return Scaffold(
body: PreparationReorderableList(
preparationOrderingList: [
PreparationStepWithOriginalIndex(
originalIndex: 0,
preparationStep: PreparationStepWithNameAndId(
id: '1',
preparationName: 'Preparation 1',
),
),
],
onReorder: (int oldIndex, int newIndex) {},
));
}
6 changes: 3 additions & 3 deletions widgetbook/lib/tile.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:on_time_front/shared/components/tile.dart';
import 'package:on_time_front/shared/components/check_button.dart';
import 'package:on_time_front/shared/theme/tile_style.dart';
import 'package:on_time_front/presentation/shared/components/check_button.dart';
import 'package:on_time_front/presentation/shared/components/tile.dart';
import 'package:on_time_front/presentation/shared/theme/tile_style.dart';
import 'package:widgetbook/widgetbook.dart';
import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook;

Expand Down
4 changes: 4 additions & 0 deletions widgetbook/macos/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ class AppDelegate: FlutterAppDelegate {
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
}

override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
return true
}
}
Loading
Loading