-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat: add same delete design in database #6620
feat: add same delete design in database #6620
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 |
* add same delete design in database * fix: remove padding when widget is null or function is null
* feat: add same delete design in database (#6620) * add same delete design in database * fix: remove padding when widget is null or function is null * fix(desktop): resize sidebar menu regression (#6897) * fix: initial ai chat load (#6920) * fix: unable to open local file using afLaunchUrl function (#6927) * fix: unable to open local file using afLaunchUrl function * chore: use the latest api to open the local file * chore: use the latest api to open the local file * chore: use the latest api to open the local file * test: add local paht regex test * fix(flutter): implement mention date transaction handler (#6933) * fix: implement mention date transaction handler * test: add integration tests * chore: code cleanup * chore: early return if null delta * fix(flutter_desktop): clicking on empty space when editing a cell sho… (#6949) * fix(flutter_desktop): clicking on empty space when editing a cell shouldn't close event card * test: fix integration tests * chore: bump version 0.7.7 * fix: hotfix issues for v0.7.7 (#6948) * fix: include link preview block and file block in exported markdown * test: include link preview block and file block in exported markdown * chore: remove unused logs * chore: update editor version * fix: "+" menu should be close after pressing space * test: cancel inline page reference menu by space * chore: update editor version * chore: remove unused logs --------- Co-authored-by: Ahad Patel <69256193+Ahad-patel@users.noreply.github.com> Co-authored-by: Richard Shiue <71320345+richardshiue@users.noreply.github.com>
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