Skip to content

Commit

Permalink
Add issue templates and Help page
Browse files Browse the repository at this point in the history
  • Loading branch information
isaaclyman committed Feb 15, 2024
1 parent 20e6a57 commit 9a777c9
Show file tree
Hide file tree
Showing 9 changed files with 225 additions and 5 deletions.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/1_opds_bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: OPDS feed bug
about: An OPDS feed isn't parsing correctly
title: ''
labels: 'OPDS'
assignees: isaaclyman
---

**Description**

<!-- Explain what's happening and why it's wrong. -->

**Feed**

<!--
REQUIRED: Provide one or both of the following:
- Publicly accessible link to your OPDS feed
- Upload(s) of the OPDS endpoint(s) that won't parse correctly.
-->
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/2_bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: General bug report
about: Other bugs in the Bookoscope mobile app
title: ''
labels: 'bug'
assignees: isaaclyman

---

**Description**

<!-- Explain what's happening and why it's wrong. -->

**Device**

<!-- Is this happening on Windows, Mac, iOS, Android, or something else? If you've tried it on multiple platforms, does it happen on all of them? -->
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/3_feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Feature request
about: Suggest a new feature for the mobile app
title: ''
labels: 'feature request'
assignees: isaaclyman

---

**Problem**

<!-- What problem would your idea solve? How do you currently manage this problem? -->

**Idea**

<!-- Describe the feature you want to suggest. -->
20 changes: 18 additions & 2 deletions lib/navigation/nav_config.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:bookoscope/events/event_handler.dart';
import 'package:bookoscope/navigation/nav_manager.dart';
import 'package:bookoscope/navigation/providers.dart';
import 'package:bookoscope/pages/page_help.dart';
import 'package:bookoscope/pages/page_search.dart';
import 'package:bookoscope/pages/page_sources.dart';
import 'package:bookoscope/search/full_entry.dart';
Expand Down Expand Up @@ -63,6 +64,14 @@ class BKRouterConfig {
),
],
),
GoRoute(
path: '/help',
name: BKPageHelp.name,
builder: (context, state) => BKPageShell(
routerState: state,
child: const BKPageHelp(),
),
),
],
)
],
Expand Down Expand Up @@ -119,15 +128,22 @@ class _NavbarState extends State<_Navbar> {
icon: Icon(Icons.shelves),
label: "Browse",
),
BKPageBrowse.name
BKPageBrowse.name,
),
(
const NavigationDestination(
icon: Icon(Icons.device_hub),
label: "Sources",
),
BKPageSources.name
BKPageSources.name,
),
(
const NavigationDestination(
icon: Icon(Icons.bug_report),
label: "Help",
),
BKPageHelp.name,
)
];

@override
Expand Down
53 changes: 53 additions & 0 deletions lib/pages/page_help.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import 'package:bookoscope/theme/colors.dart';
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';

class BKPageHelp extends StatelessWidget {
static const name = "Help";

const BKPageHelp({super.key});

@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 16,
),
child: Column(
children: [
Card(
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 24,
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const Text("Got a feature request? Found a bug? "
"OPDS feed not parsing correctly? "
"File an issue in Bookoscope's GitHub repository."),
Padding(
padding: const EdgeInsets.only(top: 16),
child: ElevatedButton(
onPressed: () async {
await launchUrl(Uri.parse(
"https://github.com/isaaclyman/bookoscope/issues"));
},
style: ElevatedButton.styleFrom(
backgroundColor: context.colors.accent.withAlpha(180),
foregroundColor: context.colors.accentContrast,
),
child: const Text("File an issue"),
),
),
],
),
),
),
],
),
);
}
}
7 changes: 4 additions & 3 deletions lib/search/book_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:bookoscope/format/opds/opds_crawler.dart';
import 'package:bookoscope/render/link.dart';
import 'package:bookoscope/search/search_manager.dart';
import 'package:bookoscope/util/menu.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
Expand Down Expand Up @@ -39,10 +40,10 @@ class _BKBookTileState extends State<BKBookTile> {
children: [
Expanded(
child: imageUrl != null
? Image.network(
imageUrl,
? CachedNetworkImage(
imageUrl: imageUrl,
fit: BoxFit.contain,
errorBuilder: (_, err, ___) {
errorWidget: (_, __, err) {
debugPrint(err.toString());
return _DefaultBookCover(
title: widget.result.title,
Expand Down
2 changes: 2 additions & 0 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ import Foundation

import isar_flutter_libs
import path_provider_foundation
import sqflite
import url_launcher_macos

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
IsarFlutterLibsPlugin.register(with: registry.registrar(forPlugin: "IsarFlutterLibsPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
}
96 changes: 96 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "8.8.1"
cached_network_image:
dependency: "direct main"
description:
name: cached_network_image
sha256: "28ea9690a8207179c319965c13cd8df184d5ee721ae2ce60f398ced1219cea1f"
url: "https://pub.dev"
source: hosted
version: "3.3.1"
cached_network_image_platform_interface:
dependency: transitive
description:
name: cached_network_image_platform_interface
sha256: "9e90e78ae72caa874a323d78fa6301b3fb8fa7ea76a8f96dc5b5bf79f283bf2f"
url: "https://pub.dev"
source: hosted
version: "4.0.0"
cached_network_image_web:
dependency: transitive
description:
name: cached_network_image_web
sha256: "42a835caa27c220d1294311ac409a43361088625a4f23c820b006dd9bffb3316"
url: "https://pub.dev"
source: hosted
version: "1.1.1"
characters:
dependency: transitive
description:
Expand Down Expand Up @@ -261,6 +285,14 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_cache_manager:
dependency: transitive
description:
name: flutter_cache_manager
sha256: "8207f27539deb83732fdda03e259349046a39a4c767269285f449ade355d54ba"
url: "https://pub.dev"
source: hosted
version: "3.3.1"
flutter_driver:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -337,6 +369,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.3.1"
http:
dependency: transitive
description:
name: http
sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba
url: "https://pub.dev"
source: hosted
version: "1.2.0"
http_multi_server:
dependency: transitive
description:
Expand Down Expand Up @@ -486,6 +526,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.0"
octo_image:
dependency: transitive
description:
name: octo_image
sha256: "45b40f99622f11901238e18d48f5f12ea36426d8eced9f4cbf58479c7aa2430d"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
package_config:
dependency: transitive
description:
Expand Down Expand Up @@ -622,6 +670,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.3"
rxdart:
dependency: transitive
description:
name: rxdart
sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb"
url: "https://pub.dev"
source: hosted
version: "0.27.7"
scroll_to_index:
dependency: transitive
description:
Expand Down Expand Up @@ -675,6 +731,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.10.0"
sprintf:
dependency: transitive
description:
name: sprintf
sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23"
url: "https://pub.dev"
source: hosted
version: "7.0.0"
sqflite:
dependency: transitive
description:
name: sqflite
sha256: a9016f495c927cb90557c909ff26a6d92d9bd54fc42ba92e19d4e79d61e798c6
url: "https://pub.dev"
source: hosted
version: "2.3.2"
sqflite_common:
dependency: transitive
description:
name: sqflite_common
sha256: "28d8c66baee4968519fb8bd6cdbedad982d6e53359091f0b74544a9f32ec72d5"
url: "https://pub.dev"
source: hosted
version: "2.5.3"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -715,6 +795,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.3.1"
synchronized:
dependency: transitive
description:
name: synchronized
sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558"
url: "https://pub.dev"
source: hosted
version: "3.1.0+1"
term_glyph:
dependency: transitive
description:
Expand Down Expand Up @@ -819,6 +907,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.1.1"
uuid:
dependency: transitive
description:
name: uuid
sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8
url: "https://pub.dev"
source: hosted
version: "4.3.3"
vector_math:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ environment:
dependencies:
accordion: ^2.6.0
auto_size_text: ^3.0.0
cached_network_image: ^3.3.1
collection: ^1.18.0
csv: ^5.1.1
flutter:
Expand Down

0 comments on commit 9a777c9

Please sign in to comment.