-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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 same delete design in database #6620
base: main
Are you sure you want to change the base?
Conversation
@@ -229,7 +237,7 @@ enum FieldAction { | |||
delete, | |||
wrap; | |||
|
|||
Widget? leading(FieldInfo fieldInfo, Color? color) { | |||
Widget leading(FieldInfo fieldInfo, Color? color) { |
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.
Please revert to returning Widget?
. This adds unexpected, extra padding to the end of the row in the button. Otherwise, looks good to me.
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.
@richardshiue I don't think it will add padding, I have attached video and screenshot of the same, are you referring to this file https://github.com/Ahad-patel/AppFlowy/blob/e66835297a2dc84febf8d4f1517aa64252fc4624/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/view/view_more_action_button.dart#L257, as explicit padding is added in it.
Or I am referring at wrong place, I don't know 🤷 ?.
Rahul.Bhatnagar.s.Video.-.Oct.25.2024-VEED.mp4
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.
Yes that's it. Do you see that whereas edit property there is no extra padding at the end, the others have it? For languages where the string becomes too long, or we have another action that has a longer name, the right end will not line up
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 got your point. But since in FlowyIconTextButton , the leftIconBuilder and rightIconBuilder have a return type of Widget, so I have updated to Widget? and added a conditon that will check if resutant widget is nullable or not final Widget? leftIcon = leftIconBuilder?.call(onHover);
similar for the rightIconBuilder. So the extra padding will be avoided. Please let me know if any more changes needed for this PR.
No test case needed |
@Ahad-patel Can you merge the latest main branch to re-trigger the CI actions? |
LGTM |
closes : #6608
Feature Preview
I have updated FlowyButton with FlowyIconTextButton. I have also added resetHoverOnRebuild in FlowyIconTextButton. Since leftIconBuilder and rightIconBuilder require non-nullable widget, I have updated action.leading and action.trailing to return Sizedbox.shrink() instead of null and made return type Widget in pace of Widget?.
One question though, is any where else this delete design needed to be added? and does it require test cases? @richardshiue @annieappflowy
Screen.Recording.2024-10-24.at.7.08.21.PM.mov
PR Checklist