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

Fix URL copied via right click menu #4690

Merged

Conversation

PikachuEXE
Copy link
Collaborator

@PikachuEXE PikachuEXE commented Feb 19, 2024

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

#4687

Includes code from #4687 so you can test that PR properly but not saying that PR can be merged already

Description

Fix URL copied via right click menu

Fixes:

  • Invalid URL when copying IV video
  • URL with user playlist ID
  • Playlist URL can be copied via right clicking on a user playlist link

Screenshots

Testing

  • Right click copy on a video with user playlist (Local & IV URL), ensure URL correct (no double question mark, nor playlist ID)
  • Right click copy on a video withremote playlist (Local & IV URL), ensure URL correct (no double question mark, with playlist ID)
  • Right click copy on a link with user playlist, ensure no entry for copying URL
  • Right click copy on a link withremote playlist (Local & IV URL), ensure URL correct
  • Test cases in Support opening video timestamps in a new window #4687

Desktop

  • OS:
  • OS Version:
  • FreeTube version:

Additional context

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Feb 19, 2024
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) February 19, 2024 08:35
@PikachuEXE PikachuEXE changed the title Support opening video timestamps in a new window Fix URL copied via right click menu Feb 19, 2024
@PikachuEXE PikachuEXE force-pushed the fix/right-click-copy-url branch from b4ed11e to d935574 Compare February 21, 2024 00:11
@absidue
Copy link
Member

absidue commented Feb 22, 2024

Could you please also hide the Copy Link options when right clicking on a user playlist on the user playlist page (see screenshot)?
user-playlist-context-menu

Something like this should work:

          if (path) {
-            visible = ['/playlist', '/channel', '/watch'].some(p => path.startsWith(p))
+            visible = ['/channel', '/watch'].some(p => path.startsWith(p)) ||
+              (path.startsWith('/playlist') && !/[&?]playlistType=user(?:&|$)/.test(path))
          }

@absidue absidue added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Feb 22, 2024
@PikachuEXE
Copy link
Collaborator Author

Updated, added Playlist URL can be copied via right clicking on a user playlist link to desc about fixed items, added test cases

absidue
absidue previously approved these changes Feb 23, 2024
@absidue absidue dismissed their stale review February 23, 2024 19:31

I forgot that this includes code from another unmerged pull request

@efb4f5ff-1298-471a-8973-3d47447115dc

Does this PR needs updating now that #4687 has been merged?

@PikachuEXE
Copy link
Collaborator Author

Why I can't rebase via UI here :(
Me lazy

- Invalid URL when copying IV video
- URL with user playlist ID
@PikachuEXE PikachuEXE force-pushed the fix/right-click-copy-url branch from edb2a41 to 8d6a128 Compare February 27, 2024 00:25
@PikachuEXE
Copy link
Collaborator Author

Rebased, 2 commits left

@FreeTubeBot FreeTubeBot merged commit fcd7291 into FreeTubeApp:development Mar 3, 2024
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 Mar 3, 2024
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Mar 4, 2024
* development: (29 commits)
  Translated using Weblate (Chinese (Traditional))
  Fix URL copied via right click menu (FreeTubeApp#4690)
  Translated using Weblate (Croatian)
  Wrap ft-icon buttons below before they go fully vertical (FreeTubeApp#4735)
  * Make activating a chapter selector makes window scroll to top like clicking on timestamp links (FreeTubeApp#4722)
  Translated using Weblate (Portuguese (Brazil))
  Translated using Weblate (Portuguese (Brazil))
  Make video thumbnails have certain height before image loading starts to avoid layout shifts (FreeTubeApp#4723)
  Update subscription cache when visiting a channel (FreeTubeApp#4667)
  Fix fallback to Invidious for the podcasts channel tab (FreeTubeApp#4731)
  Translated using Weblate (Portuguese (Brazil))
  Translated using Weblate (Arabic)
  Translated using Weblate (Polish)
  Translated using Weblate (Dutch)
  Translated using Weblate (Icelandic)
  Translated using Weblate (Spanish)
  Translated using Weblate (Arabic)
  Translated using Weblate (Icelandic)
  Translated using Weblate (Italian)
  Translated using Weblate (Chinese (Simplified))
  ...
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Mar 7, 2024
* development: (161 commits)
  Add video search in user playlist feature (FreeTubeApp#4622)
  Add discussion info when opening an issue (FreeTubeApp#4676)
  Translated using Weblate (Lithuanian)
  Translated using Weblate (Serbian)
  Translated using Weblate (Estonian)
  Bump mini-css-extract-plugin from 2.8.0 to 2.8.1 (FreeTubeApp#4742)
  Bump electron from 28.2.3 to 29.1.0 (FreeTubeApp#4743)
  Bump lefthook from 1.6.1 to 1.6.4 (FreeTubeApp#4740)
  Bump the babel group with 2 updates (FreeTubeApp#4739)
  Bump swiper from 11.0.6 to 11.0.7 (FreeTubeApp#4741)
  Bump electron-builder from 24.12.0 to 24.13.3 (FreeTubeApp#4744)
  Split view count and published date into two lines on small displays (FreeTubeApp#4736)
  Translated using Weblate (Chinese (Traditional))
  Fix URL copied via right click menu (FreeTubeApp#4690)
  Translated using Weblate (Croatian)
  Wrap ft-icon buttons below before they go fully vertical (FreeTubeApp#4735)
  * Make activating a chapter selector makes window scroll to top like clicking on timestamp links (FreeTubeApp#4722)
  Translated using Weblate (Portuguese (Brazil))
  Translated using Weblate (Portuguese (Brazil))
  Make video thumbnails have certain height before image loading starts to avoid layout shifts (FreeTubeApp#4723)
  ...

# Conflicts:
#	src/renderer/views/Playlist/Playlist.vue
@PikachuEXE PikachuEXE deleted the fix/right-click-copy-url branch April 2, 2024 03:12
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