Skip to content

Implement context menu item "search X in new window"#7477

Merged
FreeTubeBot merged 2 commits intoFreeTubeApp:developmentfrom
PikachuEXE:feature/search-selected
Jun 1, 2025
Merged

Implement context menu item "search X in new window"#7477
FreeTubeBot merged 2 commits intoFreeTubeApp:developmentfrom
PikachuEXE:feature/search-selected

Conversation

@PikachuEXE
Copy link
Member

@PikachuEXE PikachuEXE commented May 28, 2025

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

N/A

Description

This PR enables searching in a new window via selecting text and right clicking on text or link with custom text (e.g. hashtag links)

Screenshots

Places with this menu item
image
image
image

Places without
image
image
image
image

Char limit
image
image

Testing

  • Open videos with timestamp & links (e.g. https://youtu.be/9hDvWVJtljE
  • Ensure right clicking on selected static text works (work = show new menu item) (title, description, comment...
  • Ensure right clicking on links with custom text works (e.g. hashtag links, I can't find any link example which is not hashtag link yet
  • Ensure ... on links with URLs only does NOT work (no new menu item)
  • Ensure ... on timestamp links does NOT work
  • Ensure ... on editable text does NOT work (top nav, settings...
  • Ensure ... on text > 100 chars shows the menu item but disabled and different text (see screenshots

Desktop

  • OS:
  • OS Version:
  • FreeTube version:

Additional context

See parameters at https://www.electronjs.org/docs/latest/api/web-contents
See context menu doc at https://github.com/sindresorhus/electron-context-menu

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) May 28, 2025 01:04
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label May 28, 2025
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick about placement: Could you place this above the inspect element option. This would make it more in line with how its seen in browsers + seems more logical to me

@absidue
Copy link
Member

absidue commented May 28, 2025

@efb4f5ff-1298-471a-8973-3d47447115dc Inspect Element is only there in dev mode, so users don't see it.

@PikachuEXE
Copy link
Member Author

If you want to test in prod mode not dev mode and don't want to build one yourself use https://github.com/PikachuEXE/FreeTube/actions/runs/15290007172

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Member

efb4f5ff-1298-471a-8973-3d47447115dc commented May 28, 2025

it would be nice to see if character limit toast pops up -> #4992 if user tries to search a wall of text

@PikachuEXE
Copy link
Member Author

Instead of toast I just disable the item with a different text

image
image

Copy link
Member

Choose a reason for hiding this comment

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

That's an elegant solution, LGTM!

@FreeTubeBot FreeTubeBot merged commit ffd1d8d into FreeTubeApp:development Jun 1, 2025
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Jun 1, 2025
@PikachuEXE PikachuEXE deleted the feature/search-selected branch June 2, 2025 01:12
PikachuEXE added a commit to palharesf/FreeTube that referenced this pull request Jun 6, 2025
* development: (50 commits)
  add rules to issue templates (FreeTubeApp#7516)
  Translated using Weblate (Romanian)
  Translated using Weblate (Serbian)
  Translated using Weblate (Russian)
  Move settings to `more` menu on smaller mobile devices (FreeTubeApp#7506)
  Translated using Weblate (Russian)
  Migrate WatchVideoLiveChat to the composition API (FreeTubeApp#7494)
  Translated using Weblate (Basque)
  Translated using Weblate (Russian)
  Bump shaka-player from 4.14.14 to 4.14.15 (FreeTubeApp#7501)
  Bump electron from 36.3.1 to 36.3.2 (FreeTubeApp#7500)
  Bump sass from 1.89.0 to 1.89.1 (FreeTubeApp#7499)
  Bump the eslint group with 3 updates (FreeTubeApp#7498)
  Bump the stylelint group with 2 updates (FreeTubeApp#7497)
  Bump @babel/core from 7.27.1 to 7.27.4 in the babel group (FreeTubeApp#7496)
  Translated using Weblate (Japanese)
  Translated using Weblate (German)
  Implement context menu item "search X in new window" (FreeTubeApp#7477)
  Translated using Weblate (Portuguese (Brazil))
  Translated using Weblate (French)
  ...

# Conflicts:
#	static/locales/da.yaml
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.

5 participants