feat: Make result view title area clickable to expand/collapse#918
Merged
feat: Make result view title area clickable to expand/collapse#918
Conversation
Implements the feature request in issue #912. The entire title bar of a result entry in Easydict is now clickable to expand or collapse the content. Previously, only the small arrow icon could be used for this action. Changes: - Added an NSClickGestureRecognizer to the `topBarView` in `EZResultView.m`. - The gesture recognizer's action handler replicates the logic from the existing `arrowButton`'s click block to ensure consistent behavior. - The `arrowButton` remains functional as before. - Both clicking the title area and clicking the arrow button will now toggle the visibility of the result content and update the arrow icon's state.
- Replace arrowButton's custom click block with standard target-action method using handleTopBarTap: - Remove duplicated state toggle logic from the click block and rely on handleTopBarTap: for handling actions Signed-off-by: tisfeng <tisfeng@gmail.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements a feature to allow expanding or collapsing a result entry by clicking anywhere on its title area instead of just the arrow icon.
- Adds an NSClickGestureRecognizer to the title area (topBarView) that triggers the same action as the arrow button.
- Updates the arrow button to use the common tap handler, ensuring consistent behavior across UI elements.
Comments suppressed due to low confidence (1)
Easydict/objc/ViewController/View/ResultView/EZResultView.m:253
- The property name 'manulShow' appears to be a typo; consider renaming it to 'manualShow' for clarity and consistency.
self.result.manulShow = YES;
Owner
Author
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Fix typo: rename property manulShow to manualShow throughout the codebase Signed-off-by: tisfeng <tisfeng@gmail.com>
phlpsong
approved these changes
Jun 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Implements the feature request in issue #912 #845 .
The entire title bar of a result entry in Easydict is now clickable to expand or collapse the content. Previously, only the small arrow icon could be used for this action.
Changes:
topBarViewinEZResultView.m.arrowButton's click block to ensure consistent behavior.arrowButtonremains functional as before.