Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Ahad-patel
Copy link
Contributor

@Ahad-patel Ahad-patel commented Oct 24, 2024

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

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.
@@ -229,7 +237,7 @@ enum FieldAction {
delete,
wrap;

Widget? leading(FieldInfo fieldInfo, Color? color) {
Widget leading(FieldInfo fieldInfo, Color? color) {
Copy link
Collaborator

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.

Copy link
Contributor Author

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
Screenshot 2024-10-25 at 2 53 44 PM Screenshot 2024-10-25 at 2 54 09 PM
Copy link
Collaborator

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

Copy link
Contributor Author

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.

Screenshot 2024-10-25 at 6 59 56 PM
@richardshiue
Copy link
Collaborator

No test case needed

@LucasXu0
Copy link
Collaborator

@Ahad-patel Can you merge the latest main branch to re-trigger the CI actions?

@richardshiue
Copy link
Collaborator

LGTM

@LucasXu0 LucasXu0 added the v0.7.4 label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants