diff --git a/.github/labeler.yml b/.github/labeler.yml index 4fca91ccd05..0000fd33d44 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -284,5 +284,6 @@ Prices: - any-glob-to-any-file: 'packages/smooth_app/lib/pages/onboarding/currency_selector.dart' - any-glob-to-any-file: 'packages/smooth_app/lib/pages/onboarding/currency_selector_helper.dart' - - +router: +- changed-files: + - any-glob-to-any-file: 'packages/smooth_app/lib/pages/navigator/app_navigator.dart' diff --git a/.github/workflows/dartdoc.yml b/.github/workflows/dartdoc.yml new file mode 100644 index 00000000000..25b8000db46 --- /dev/null +++ b/.github/workflows/dartdoc.yml @@ -0,0 +1,36 @@ + name: GitHub Pages Deploy Action + on: + push: + branches: + - "develop" + #- "dartdoc-smoothie" + jobs: + deploy-pages: + name: Deploy to GitHub Pages + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./packages/smooth_app + steps: + + - name: Chekout code + uses: actions/checkout@v4 + + - name: Setup Flutter + uses: actions/cache@v4 + with: + path: ${{ runner.tool_cache }}/flutter + key: flutter-2.5.0-stable + - uses: subosito/flutter-action@v2 + with: + channel: stable + flutter-version: 2.5.0 + + - name: Run Dartdoc + run: pub global activate dartdoc && dartdoc + + - name: Deploy API documentation to Github Pages + uses: JamesIves/github-pages-deploy-action@v4.6.8 + with: + BRANCH: gh-pages + FOLDER: packages/smooth_app/doc/api/ diff --git a/.github/workflows/github-projects-for-openfoodfacts-design.yml b/.github/workflows/github-projects-for-openfoodfacts-design.yml index 6744bb6b919..72f2ef027c1 100644 --- a/.github/workflows/github-projects-for-openfoodfacts-design.yml +++ b/.github/workflows/github-projects-for-openfoodfacts-design.yml @@ -1,4 +1,4 @@ -name: 🎨 Add mockup-required and mockup-available issues to the openfoodfacts-design project +name: Add issues to the relevant GitHub projects on: issues: @@ -8,7 +8,7 @@ on: - edited jobs: add-to-project: - name: Add issue to the openfoodfacts-design project + name: Add issues to the relevant GitHub projects runs-on: ubuntu-latest steps: - uses: actions/add-to-project@main @@ -41,3 +41,9 @@ jobs: github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} labeled: 🎯 P0, 🎯 P1 label-operator: OR + - uses: actions/add-to-project@main + with: + project-url: https://github.com/orgs/openfoodfacts/projects/42 # Add issue to the Knowledge Panels issues board + github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} + labeled: 📖 Knowledge panels + label-operator: OR diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 00000000000..a95314760b6 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,26 @@ +# Where to find documentation +docs_dir: doc + +# Link to Github on every page +repo_url: https://github.com/openfoodfacts/smooth-app +edit_uri: blob/develop/docs/ + +site_name: Open Food Facts mobile app +site_dir: gh_pages + +theme: + name: material + palette: + primary: beige + text: black + logo: assets/app/logo_text_black.svg + +markdown_extensions: + - footnotes + - mdx_truly_sane_lists + - pymdownx.highlight + - pymdownx.superfences + +plugins: + - awesome-pages + - search diff --git a/packages/smooth_app/lib/pages/navigator/app_navigator.dart b/packages/smooth_app/lib/pages/navigator/app_navigator.dart index e28f03f64e2..34e3b65682d 100644 --- a/packages/smooth_app/lib/pages/navigator/app_navigator.dart +++ b/packages/smooth_app/lib/pages/navigator/app_navigator.dart @@ -228,18 +228,18 @@ class _SmoothGoRouter { } }, ), - GoRoute( - path: _InternalAppRoutes.EXTERNAL_PAGE, - builder: (BuildContext context, GoRouterState state) { - return ExternalPage(path: state.uri.queryParameters['path']!); - }, - ), GoRoute( path: _InternalAppRoutes.SIGNUP_PAGE, builder: (_, __) => const SignUpPage(), ) ], ), + GoRoute( + path: '/${_InternalAppRoutes.EXTERNAL_PAGE}/:page', + builder: (BuildContext context, GoRouterState state) { + return ExternalPage(path: state.pathParameters['page']!); + }, + ), ], redirect: (BuildContext context, GoRouterState state) { final String path = state.matchedLocation; @@ -460,5 +460,5 @@ class AppRoutes { // Open an external link (where path is relative to the OFF website) static String EXTERNAL(String path) => - '/${_InternalAppRoutes.EXTERNAL_PAGE}/?path=$path'; + '/${_InternalAppRoutes.EXTERNAL_PAGE}/$path'; } diff --git a/packages/smooth_app/pubspec.lock b/packages/smooth_app/pubspec.lock index 6aaa7c3e581..7d12b448aa9 100644 --- a/packages/smooth_app/pubspec.lock +++ b/packages/smooth_app/pubspec.lock @@ -807,10 +807,10 @@ packages: dependency: "direct main" description: name: image - sha256: "2237616a36c0d69aef7549ab439b833fb7f9fb9fc861af2cc9ac3eedddd69ca8" + sha256: f31d52537dc417fdcde36088fdf11d191026fd5e4fae742491ebd40e5a8bea7d url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "4.3.0" image_picker: dependency: "direct main" description: @@ -1317,18 +1317,18 @@ packages: dependency: "direct main" description: name: rive - sha256: cd45b071b288e4bef05f25423e1001a9b3218b81745deae18c9b4d2a2952cc56 + sha256: "468f0880d49c513e09fdfba26e4abd9d50433c2cf398210b62948d8de3837dd5" url: "https://pub.dev" source: hosted - version: "0.13.14" + version: "0.13.15" rive_common: dependency: transitive description: name: rive_common - sha256: c7bf0781b1621629361579c300ac2f8aa1a238227a242202a596e82becc244d7 + sha256: a3e5786f8d85c89977062b9ceeb3b72a7c28f81e32fb68497744042ce20bee2f url: "https://pub.dev" source: hosted - version: "0.4.11" + version: "0.4.12" scanner_ml_kit: dependency: "direct main" description: @@ -1511,10 +1511,10 @@ packages: dependency: "direct main" description: name: sqflite_common_ffi - sha256: "4d6137c29e930d6e4a8ff373989dd9de7bac12e3bc87bce950f6e844e8ad3bb5" + sha256: d316908f1537725427ff2827a5c5f3b2c1bc311caed985fe3c9b10939c9e11ca url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.3.4" sqflite_darwin: dependency: transitive description: diff --git a/packages/smooth_app/pubspec.yaml b/packages/smooth_app/pubspec.yaml index 54afb2981a2..f609be58f4c 100644 --- a/packages/smooth_app/pubspec.yaml +++ b/packages/smooth_app/pubspec.yaml @@ -39,7 +39,7 @@ dependencies: provider: 6.1.2 sentry_flutter: 8.9.0 sqflite: 2.4.0 - sqflite_common_ffi: 2.3.3 + sqflite_common_ffi: 2.3.4 url_launcher: 6.3.0 visibility_detector: 0.4.0+2 app_settings: 5.1.1 @@ -49,7 +49,7 @@ dependencies: audioplayers: 6.1.0 flutter_email_sender: 6.0.3 flutter_native_splash: 2.4.1 - image: 4.2.0 + image: 4.3.0 auto_size_text: 3.0.0 crop_image: 1.0.13 shared_preferences: 2.3.2 @@ -60,7 +60,7 @@ dependencies: share_plus: 10.0.0 fimber: 0.7.0 shimmer: ^3.0.0 - rive: 0.13.14 + rive: 0.13.15 webview_flutter: 4.10.0 webview_flutter_android: 4.0.0 webview_flutter_wkwebview: 3.16.0