Skip to content

feat: Make result view title area clickable to expand/collapse#918

Merged
tisfeng merged 6 commits intodevfrom
feature/clickable-title-expand
Jun 21, 2025
Merged

feat: Make result view title area clickable to expand/collapse#918
tisfeng merged 6 commits intodevfrom
feature/clickable-title-expand

Conversation

@tisfeng
Copy link
Copy Markdown
Owner

@tisfeng tisfeng commented Jun 18, 2025

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:

  • 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.

google-labs-jules bot and others added 3 commits June 18, 2025 15:49
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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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;

@tisfeng
Copy link
Copy Markdown
Owner Author

tisfeng commented Jun 18, 2025

image

tisfeng and others added 3 commits June 19, 2025 00:09
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>
@tisfeng tisfeng merged commit 936e650 into dev Jun 21, 2025
4 checks passed
@tisfeng tisfeng deleted the feature/clickable-title-expand branch June 21, 2025 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants