-
Notifications
You must be signed in to change notification settings - Fork 1
phui backend #9
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
Open
darionco
wants to merge
14
commits into
main
Choose a base branch
from
dario/phui_backend
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
phui backend #9
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
f6dc516
[PICKER] Consolidated pickers into single `layout_picker`
b185946
[TESTER] Updated macos build files
944d270
[TESTER] Wraps PhenoDataEntry to expose picker list properties
46789b7
[TESTER] Use layout picker
5728cfa
[TESTER] Layout picker can render layouts or navigate tags
842a671
[TESTER] Render layout uses tagid instead of category
aea3a3c
[TESTER] Deleted unused screen picker
a91057b
[TESTER] Top bar title scales to always display the full text
7cb02c6
[DEPS] Updated dependencies
7dd0f81
[DATA] Pheno data entry holds the result of the query and gets its va…
e1aa15d
[PROVIDER] Uses strings for ids and renamed `path` to `id`
dccaa60
[SCREEN] Spec uses string for `id` and loads data from the new phui b…
f759da1
[SCREENS] Screen interface saves screens by name rather than uid
5b36daf
[STRAPI] Hacked strapi and strapi provider to connect to phui backend…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:pheno_ui/interface/strapi.dart'; | ||
import 'package:pheno_ui_tester/widgets/picker_state.dart'; | ||
|
||
import 'render_layout.dart'; | ||
|
||
class LayoutPicker extends PickerWidget { | ||
@override | ||
get getList => _getList; | ||
|
||
@override | ||
get builder => _builder; | ||
|
||
@override | ||
get title => entry != null ? entry!.path : 'Category'; | ||
|
||
final PickerEntry? entry; | ||
|
||
const LayoutPicker({ super.key, this.entry }); | ||
|
||
Widget _builder(PickerEntry entry, BuildContext context, _) { | ||
if (entry.type == PickerEntryType.tag) { | ||
return LayoutPicker(entry: entry); | ||
} | ||
return RenderLayout( | ||
tagId: this.entry!.id, | ||
initialRoute: entry.name, | ||
); | ||
} | ||
|
||
Future<List<PickerEntry>> _getList() async { | ||
List<PickerEntry> entries = []; | ||
final tagList = await Strapi().getCategoryList(entry?.id); | ||
for (var tagEntry in tagList) { | ||
entries.add(PickerEntry(tagEntry, PickerEntryType.tag)); | ||
} | ||
|
||
if (entry != null) { | ||
final layoutList = await Strapi().getScreenList(entry!.id); | ||
for (var layoutEntry in layoutList) { | ||
entries.add(PickerEntry(layoutEntry, PickerEntryType.layout)); | ||
} | ||
} | ||
|
||
return entries; | ||
} | ||
|
||
@override | ||
State<LayoutPicker> createState() => PickerState(); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what's the purpose of these webview changes exactly? webviews seemed to work on iOS and I thought (although maybe I am misremembering) they worked on macOS as well? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
class PhenoDataEntry { | ||
final int id; | ||
final String uid; | ||
const PhenoDataEntry(this.id, this.uid); | ||
String get name => uid; | ||
final Map<String, dynamic> data; | ||
const PhenoDataEntry(this.data); | ||
String get id => data['id']; | ||
String get uid => data['path']; | ||
String get name => data['name']; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super nitpicky but if this isn't strapi anymore should we rename the dataprovider to a more generic naming convention?