-
Notifications
You must be signed in to change notification settings - Fork 19
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
Added restaurant card implementation #1398
base: ui/redesign
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## ui/redesign #1398 +/- ##
===========================================
Coverage 12% 12%
===========================================
Files 271 271
Lines 7341 7341
===========================================
Hits 812 812
Misses 6529 6529 |
@abutuc can you add screenshots of the result? |
Use TabBar in order to build and implement the top bar |
0cdab5d
to
455a59f
Compare
I added the requested changes. After performing the rebase the final look of the card component is: I left the UniIcon implementation on the restaurant_card.dart file, but only for the favorite button icons (the others are being passed as arguments). Maybe in the future it would be nice to have a uni-ui global UniIcon widget so that we can use Duotone Phosphor Icons without needing to save the svg file. I hope I addressed each suggested change and sorry for the delay! |
@abutuc good work here, the card looks pretty neat! Overall, the code looks good, only 2 things are itching my brain. First, in |
@DGoiana what do you think? This is the best I could do to even out, I can't seem to reduce the upper space between the text and the top border of the container. I am not sure if anyone could help me out in this detail. Regarding the UniIcon part, I realized I didn't actually need it in the RestaurantCardHeader widget, so I removed it. I also realized that there's no need for the UniIcon widget overall, since we can just use the PhosphorIcon and pass it a PhosphorDuotoneIconData. |
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.
Nice Work!! ✅ 🛫
Closes #1274
Added the redesign implementation of the restaurant card. The card has as input parameters "restaurantName", "restaurantType", "menuItems", "isFavorite" and "onFavoriteToggle" callback function, which allows us to abstract the logic from the component. Additionally, this card returns a Generic Card whose child is the actual restaurant card content.
Note: the background color and the elevation property are being inherited from the Generic Card implementation, so when the Generic Card implementation has these issues fixed, the Restaurant Card should look like the mock version.
Review checklist
whatsnew/whatsnew-pt-PT
changelog.md
with the change