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

feat: add same delete design in database #6620

Merged
merged 3 commits into from
Dec 9, 2024

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
@LucasXu0 LucasXu0 changed the title add same delete design in database feat: add same delete design in database Nov 14, 2024
@richardshiue richardshiue added v0.7.7 and removed v0.7.4 labels Dec 3, 2024
@LucasXu0 LucasXu0 merged commit d21c0c0 into AppFlowy-IO:main Dec 9, 2024
18 of 19 checks passed
LucasXu0 pushed a commit to LucasXu0/AppFlowy that referenced this pull request Dec 9, 2024
* add same delete design in database

* fix: remove padding when widget is null or function is null
LucasXu0 added a commit that referenced this pull request Dec 9, 2024
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FR] Delete a property to adopt the same design for the delete button
3 participants