Skip to content
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

Add cookbook support. #2281

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion .cspell/dart_flutter.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
arrowshape
autofocus
checkmark
cupertino
Expand All @@ -10,6 +11,7 @@ goldens
lerp
pubspec
qrcode
Relayout
steb
sublist
todos
Expand All @@ -18,4 +20,3 @@ unawaited
unfocus
writeln
xmark
arrowshape
1 change: 1 addition & 0 deletions commitlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ rules:
- always
- - ci
- account_repository
- cookbook_app
- cookie_store
- cookie_store_conformance_tests
- dashboard_app
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/background_gradient"/>
<foreground>
<inset android:drawable="@drawable/cookbook_app_outline" android:inset="25%"/>
</foreground>
<monochrome>
<inset android:drawable="@drawable/cookbook_app_outline" android:inset="25%"/>
</monochrome>
</adaptive-icon>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions packages/neon_framework/example/lib/apps.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:built_collection/built_collection.dart';
import 'package:cookbook_app/neon_cookbook.dart';
import 'package:dashboard_app/dashboard_app.dart';
import 'package:files_app/files_app.dart';
import 'package:flutter/foundation.dart';
Expand All @@ -16,4 +17,5 @@ final BuiltSet<AppImplementation> appImplementations = BuiltSet({
NotesApp(),
NotificationsApp(),
if (kDebugMode) TalkApp(),
if (kDebugMode) CookbookApp(),
});
74 changes: 44 additions & 30 deletions packages/neon_framework/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,20 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.1.1"
cookbook_app:
dependency: "direct main"
description:
path: "../packages/cookbook_app"
relative: true
source: path
version: "1.0.0"
cookbook_recipe_repository:
dependency: "direct overridden"
description:
path: "../packages/cookbook_recipe_repository"
relative: true
source: path
version: "1.0.0"
cookie_store:
dependency: "direct overridden"
description:
Expand Down Expand Up @@ -311,10 +325,10 @@ packages:
dependency: transitive
description:
name: dev_build
sha256: "23677f8577ecd4a438171015d2477ef61fba5d17596c3292faf23bdbba68a316"
sha256: "4683bc149176b86a8124e938ca85004cce44db0644972ddb7f5bff7831ce7fbe"
url: "https://pub.dev"
source: hosted
version: "1.0.0+13"
version: "1.0.0+14"
dynamic_color:
dependency: transitive
description:
Expand All @@ -334,10 +348,10 @@ packages:
dependency: transitive
description:
name: emoji_picker_flutter
sha256: "3bf6d4cadc188215570a15c80fd7aeecec312b1cb3168ab08394e0faa4161fcb"
sha256: "08567e6f914d36c32091a96cf2f51d2558c47aa2bd47a590dc4f50e42e0965f6"
url: "https://pub.dev"
source: hosted
version: "3.0.0"
version: "3.1.0"
equatable:
dependency: transitive
description:
Expand Down Expand Up @@ -390,10 +404,10 @@ packages:
dependency: transitive
description:
name: file_selector_macos
sha256: f42eacb83b318e183b1ae24eead1373ab1334084404c8c16e0354f9a3e55d385
sha256: cb284e267f8e2a45a904b5c094d2ba51d0aabfc20b1538ab786d9ef7dc2bf75c
url: "https://pub.dev"
source: hosted
version: "0.9.4"
version: "0.9.4+1"
file_selector_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -543,10 +557,10 @@ packages:
dependency: transitive
description:
name: flutter_markdown
sha256: a23c41ee57573e62fc2190a1f36a0480c4d90bde3a8a8d7126e5d5992fb53fb7
sha256: e17575ca576a34b46c58c91f9948891117a1bd97815d2e661813c7f90c647a78
url: "https://pub.dev"
source: hosted
version: "0.7.3+1"
version: "0.7.3+2"
flutter_material_design_icons:
dependency: transitive
description:
Expand Down Expand Up @@ -625,10 +639,10 @@ packages:
dependency: transitive
description:
name: go_router
sha256: "2ddb88e9ad56ae15ee144ed10e33886777eb5ca2509a914850a5faa7b52ff459"
sha256: "5cf5fdcf853b0629deb35891c7af643be900c3dcaed7489009f9e7dbcfe55ab6"
url: "https://pub.dev"
source: hosted
version: "14.2.7"
version: "14.2.8"
hotreloader:
dependency: transitive
description:
Expand Down Expand Up @@ -1137,10 +1151,10 @@ packages:
dependency: transitive
description:
name: process_run
sha256: "112a77da35be50617ed9e2230df68d0817972f225e7f97ce8336f76b4e601606"
sha256: "36166b6e33a8056e3b368f20504bd5ff70f2439d75a8da90e4926c1195e32b4a"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.2.0+1"
provider:
dependency: transitive
description:
Expand Down Expand Up @@ -1177,18 +1191,18 @@ packages:
dependency: transitive
description:
name: quick_actions
sha256: b17da113df7a7005977f64adfa58ccc49c829d3ccc6e8e770079a8c7fbf2da9e
sha256: "2c1d9a91f3218b4e987a7e1e95ba0415b7f48a2cb3ffacc027a1e3d3c117223f"
url: "https://pub.dev"
source: hosted
version: "1.0.7"
version: "1.0.8"
quick_actions_android:
dependency: transitive
description:
name: quick_actions_android
sha256: "54a581491b90ff2e1be94af84a40c05e806e232184bb32afa2df57b07c4d6882"
sha256: "6932eeb970c6f7aed60708faf0ecea7068af84ee642c3bf308a0629abe90399b"
url: "https://pub.dev"
source: hosted
version: "1.0.15"
version: "1.0.16"
quick_actions_ios:
dependency: transitive
description:
Expand Down Expand Up @@ -1341,26 +1355,26 @@ packages:
dependency: transitive
description:
name: sqflite
sha256: a43e5a27235518c03ca238e7b4732cf35eabe863a369ceba6cbefa537a66f16d
sha256: ff5a2436ef8ebdfda748fbfe957f9981524cb5ff11e7bafa8c42771840e8a788
url: "https://pub.dev"
source: hosted
version: "2.3.3+1"
version: "2.3.3+2"
sqflite_common:
dependency: transitive
description:
name: sqflite_common
sha256: "4058172e418eb7e7f2058dcb7657d451a8fc264afa0dea4dbd0f304a57131611"
sha256: "2d8e607db72e9cb7748c9c6e739e2c9618320a5517de693d5a24609c4671b1a4"
url: "https://pub.dev"
source: hosted
version: "2.5.4+3"
version: "2.5.4+4"
sqflite_common_ffi:
dependency: transitive
description:
name: sqflite_common_ffi
sha256: "4d6137c29e930d6e4a8ff373989dd9de7bac12e3bc87bce950f6e844e8ad3bb5"
sha256: a6057d4c87e9260ba1ec436ebac24760a110589b9c0a859e128842eb69a7ef04
url: "https://pub.dev"
source: hosted
version: "2.3.3"
version: "2.3.3+1"
sqflite_common_ffi_web:
dependency: transitive
description:
Expand Down Expand Up @@ -1413,10 +1427,10 @@ packages:
dependency: transitive
description:
name: synchronized
sha256: "51b08572b9f091f8c3eb4d9d4be253f196ff0075d5ec9b10a884026d5b55d7bc"
sha256: "69fe30f3a8b04a0be0c15ae6490fc859a78ef4c43ae2dd5e8a623d45bfcf9225"
url: "https://pub.dev"
source: hosted
version: "3.3.0+2"
version: "3.3.0+3"
talk_app:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1532,10 +1546,10 @@ packages:
dependency: transitive
description:
name: url_launcher_macos
sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de"
sha256: "769549c999acdb42b8bcfa7c43d72bf79a382ca7441ab18a808e101149daf672"
url: "https://pub.dev"
source: hosted
version: "3.2.0"
version: "3.2.1"
url_launcher_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -1564,10 +1578,10 @@ packages:
dependency: transitive
description:
name: uuid
sha256: f33d6bb662f0e4f79dcd7ada2e6170f3b3a2530c28fc41f49a411ddedd576a77
sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff
url: "https://pub.dev"
source: hosted
version: "4.5.0"
version: "4.5.1"
vector_graphics:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1644,10 +1658,10 @@ packages:
dependency: transitive
description:
name: web
sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062
sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb
url: "https://pub.dev"
source: hosted
version: "1.0.0"
version: "1.1.0"
webview_flutter:
dependency: transitive
description:
Expand Down
4 changes: 4 additions & 0 deletions packages/neon_framework/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ environment:

dependencies:
built_collection: ^5.0.0
cookbook_app:
git:
url: https://github.com/nextcloud/neon
path: packages/neon_framework/packages/cookbook_app
dashboard_app:
git:
url: https://github.com/nextcloud/neon
Expand Down
6 changes: 5 additions & 1 deletion packages/neon_framework/example/pubspec_overrides.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# melos_managed_dependency_overrides: account_repository,cookie_store,dashboard_app,dynamite_runtime,files_app,interceptor_http_client,neon_framework,neon_http_client,neon_lints,news_app,nextcloud,notes_app,notifications_app,sort_box,talk_app
# melos_managed_dependency_overrides: account_repository,cookbook_app,cookbook_recipe_repository,cookie_store,dashboard_app,dynamite_runtime,files_app,interceptor_http_client,neon_framework,neon_http_client,neon_lints,news_app,nextcloud,notes_app,notifications_app,sort_box,talk_app
dependency_overrides:
account_repository:
path: ../packages/account_repository
cookbook_app:
path: ../packages/cookbook_app
cookbook_recipe_repository:
path: ../packages/cookbook_recipe_repository
cookie_store:
path: ../../cookie_store
dashboard_app:
Expand Down
2 changes: 1 addition & 1 deletion packages/neon_framework/lib/l10n/en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"@@locale": "en",
"nextcloud": "Nextcloud",
"nextcloudLogo": "Nextcloud logo",
"appImplementationName": "{app, select, nextcloud{Nextcloud} core{Server} dashboard{Dashboard} files{Files} news{News} notes{Notes} notifications{Notifications} talk{Talk} other{}}",
"appImplementationName": "{app, select, nextcloud{Nextcloud} core{Server} dashboard{Dashboard} files{Files} news{News} notes{Notes} notifications{Notifications} talk{Talk} cookbook{Cookbook} other{}}",
"@appImplementationName": {
"placeholders": {
"app": {}
Expand Down
2 changes: 1 addition & 1 deletion packages/neon_framework/lib/l10n/localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ abstract class NeonLocalizations {
/// No description provided for @appImplementationName.
///
/// In en, this message translates to:
/// **'{app, select, nextcloud{Nextcloud} core{Server} dashboard{Dashboard} files{Files} news{News} notes{Notes} notifications{Notifications} talk{Talk} other{}}'**
/// **'{app, select, nextcloud{Nextcloud} core{Server} dashboard{Dashboard} files{Files} news{News} notes{Notes} notifications{Notifications} talk{Talk} cookbook{Cookbook} other{}}'**
String appImplementationName(String app);

/// No description provided for @loginAgain.
Expand Down
1 change: 1 addition & 0 deletions packages/neon_framework/lib/l10n/localizations_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class NeonLocalizationsEn extends NeonLocalizations {
'notes': 'Notes',
'notifications': 'Notifications',
'talk': 'Talk',
'cookbook': 'Cookbook',
'other': '',
},
);
Expand Down
1 change: 1 addition & 0 deletions packages/neon_framework/packages/cookbook_app/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
include: package:neon_lints/flutter.yaml

analyzer:
exclude:
- lib/l10n/cookbook_*
- '**/routes.g.dart'

custom_lint:
rules:
- avoid_exports: false
Binary file not shown.
Empty file.
7 changes: 7 additions & 0 deletions packages/neon_framework/packages/cookbook_app/l10n.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
arb-dir: lib/l10n/arb
template-arb-file: cookbook_en.arb
output-localization-file: cookbook_localizations.dart
synthetic-package: false
output-class: CookbookLocalizations
output-dir: lib/l10n
nullable-getter: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"@@locale": "en",
"recipeCreateButton": "Create Recipe",
"@recipeCreateButton": {
"type": "text",
"description": "Button to open the create recipe screen"
},
"recipeListTitle": "Category: {name}",
"@recipeListTitle": {
"type": "text",
"description": "Title of the category view.",
"placeholders": {
"name": {
"description": "The name of the category.",
"type": "String",
"example": "Vegan"
}
}
},
"noRecipes": "No recipes available.",
"errorLoadFailed": "Failed to load Recipe!",
"@errorLoadFailed": {
"type": "text",
"description": "Error message when fetching the recipes failed."
},
"categoryAll": "All Recipes",
"categoryUncategorized": "Uncategorized",
"categoryItems": "{count, plural, =0{no items} =1 {1 item} other {{count} items}}",
"@categoryItems": {
"type": "text",
"description": "Number of recipes in a category.",
"placeholders": {
"count": {
"description": "The number of recipes.",
"type": "int",
"example": "4"
}
}
}
}
Loading
Loading