Skip to content

feat: double tab edit side panel #5000

Merged
LucasXu0 merged 3 commits intoAppFlowy-IO:mainfrom
Omegaviv:direct_edit_side_panel
Apr 11, 2024
Merged

feat: double tab edit side panel #5000
LucasXu0 merged 3 commits intoAppFlowy-IO:mainfrom
Omegaviv:direct_edit_side_panel

Conversation

@Omegaviv
Copy link
Contributor

This PR is for issue #4968, to edit side panel title with double click.

I directly used GestureDetector of SingleInnerViewItem, I could have also passed it as function call back but it will require having MultiBlocProvider.

I am new here, any feedback @annieappflowy ?

Feature Preview


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.

@CLAassistant
Copy link

CLAassistant commented Mar 28, 2024

CLA assistant check
All committers have signed the CLA.

@LucasXu0
Copy link
Collaborator

@Omegaviv I suggest supporting renaming only through a double-tap when the view is selected. This is because there's a minimum waiting time for the double-click gesture, which could cause a delay when opening another view with a single click.

@Omegaviv
Copy link
Contributor Author

@LucasXu0 If we just let them use double click edit option only to select views, it won't be of much use as a user will have to do three clicks to edit other than the selected view. How about a long press?

@LucasXu0
Copy link
Collaborator

LucasXu0 commented Apr 1, 2024

@Omegaviv The long press action for renaming is not user-friendly. You can refer to the implementation of the gesture conflict handler for a solution. This widget triggers the onTap event immediately, without waiting for the doubleTap timeout.

@Omegaviv
Copy link
Contributor Author

Omegaviv commented Apr 1, 2024

@Omegaviv I suggest supporting renaming only through a double-tap when the view is selected. This is because there's a minimum waiting time for the double-click gesture, which could cause a delay when opening another view with a single click.

@LucasXu0 I have added a simple check

Comment on lines +358 to +368
onDoubleTap: isSelected ? (){
NavigatorTextFieldDialog(
title: LocaleKeys.disclosureAction_rename.tr(),
autoSelectAllText: true,
value: widget.view.name,
maxLength: 256,
onConfirm: (newValue, _) {
context.read<ViewBloc>().add(ViewEvent.rename(newValue));
},
).show(context);
} : null,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like you didn't run the formatter.

@Omegaviv Omegaviv requested a review from Xazin April 4, 2024 09:52
@Omegaviv
Copy link
Contributor Author

@LucasXu0 can you close this, if there are no issues?

@LucasXu0 LucasXu0 added improvements improvements on an existing feature v0.5.5 labels Apr 10, 2024
@LucasXu0
Copy link
Collaborator

@LucasXu0 can you close this, if there are no issues?

Why do we close it? I think we can support temporarily editing the current view name by double-clicking it.

@LucasXu0 LucasXu0 merged commit b51ff31 into AppFlowy-IO:main Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvements improvements on an existing feature v0.5.5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants