-
Notifications
You must be signed in to change notification settings - Fork 0
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
Split PirateCoinsPage
into 2 Pages
#244
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for pattonville-wallet ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
ba7409e
to
31d93eb
Compare
PirateCoinsPage
into 2 Pages
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.
See #192 (comment).
# start of code generated by package:dart_define, DO NOT modify or remove these comments | ||
dart_define.json | ||
# end of code generated by package:dart_define, DO NOT modify or remove these comments | ||
|
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.
Why were these changed?
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.
nothing I did purposely
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.
I'm removing it in #256 anyway, so it's not a big deal.
page: PirateCoinsTeacherRoute.page, | ||
path: "pirate-coins-teacher", | ||
children: [ | ||
AutoRoute( | ||
page: StatsRoute.page, | ||
path: "stats", | ||
title: (context, route) => "Stats", | ||
), | ||
], | ||
title: (context, route) => "Pirate Coins", | ||
), | ||
AutoRoute( | ||
page: PirateCoinsStudentRoute.page, | ||
path: "pirate-coins-student", |
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.
It would be better for these to be nested and the difference in routes invisible, at least to students.
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.
alr
@@ -35,7 +35,8 @@ List<AppletEntity> get _applets { | |||
image: appletsFolder.pirateCoins.path, | |||
color: const Color.fromARGB(255, 122, 194, 129), | |||
// TODO(lishaduck): figure out how to use routes to keep this type-safe. | |||
location: "/pirate-coins", | |||
location: | |||
"/pirate-coins-student", //not sure how to make this dynamic based on account type |
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.
Using route guards should remove to need to hardcode to student. And yes, I know it's not possible right now, which is why I'm working on #253.
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.
While you're at it, could you write some more tests to verify everything works here? I usually use Copilot to generate a basic test, and enhance it from there which makes it easier.
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.
Yeah was kinda planning to do that since the old ones were failing
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.
Thanks!
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.
Oh, and it's the router tests failing, by the way. That's why, we should a) use go_router
,1 b) nest the routes.
Footnotes
-
I think it supports extracting the URL from a route, which is also needed for type-safe routing in the dashboard. ↩
Are you willing to take another go at this, @ParkerH27 / @PetalCat? |
maybe... i gotta try and figure out what is going on |
@PetalCat? You still wanna finish this? |
I assume this can be closed, @ParkerH27? |
bb68a12
to
e5e9b68
Compare
Description
This PR splits the user views for the Pirate Coins feature.
Closes: #192
Type of Change