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

Shorter URLs channel and account + /@:actorName #4009

Merged

Conversation

kimsible
Copy link
Contributor

@kimsible kimsible commented Apr 24, 2021

Description

Creates shorter URLs for channels and accounts.

Client side

  • Add default routes /a/:accountName for accounts and /c/:accountName for channels
  • /@:actorName displays:
    • /a/:accountName or /c/:channelName without the tab home (exemple: /c/mychannel/videos)
  • Redirections :
    • /accounts/:accountName to /a/:accountName
    • /video-channels/:channelName to /c/:channelName

Server side

  • OpenGraph and Twitter Card rendering + tests :
    • /accounts/:accountName for /a/:accountName and /@accountName
    • /video-channels/:channelName for /c/:channelName and @channelName
  • New API route GET /api/v1/actors/:actorName to handle /@:actorName client route + test

Related issues

Partially resolves #3680

Has this been tested?

  • 👍 yes, I added tests to the test suite

@kimsible kimsible force-pushed the shorter-URLs-channels-accounts branch 2 times, most recently from ad9697a to 0cc221a Compare April 24, 2021 00:39
@kimsible kimsible force-pushed the shorter-URLs-channels-accounts branch 2 times, most recently from 10a83a2 to 7df8e14 Compare April 25, 2021 10:04
@kimsible kimsible marked this pull request as draft April 28, 2021 02:32
@kimsible kimsible force-pushed the shorter-URLs-channels-accounts branch from 7df8e14 to 02ffda7 Compare April 28, 2021 22:01
@kimsible kimsible changed the title Shorter URLs channel and account + @actor Shorter URLs channel and account + /@:actorName Apr 28, 2021
@kimsible
Copy link
Contributor Author

Since the last commits now we can use :

  • /@kimsible that displays /a/kimsible home
  • /@kimsible_channel that displays /c/kimsible_channel home

Server side, a new API route is used for actors.
Client side, a new root component is used to get parameters of the home route (named RootComponent, maybe HomeComponent would be better?).

This way we could implement an URL even shorter for videos :
peertube.com/73WakrfVbNJBaAmhQtEeDv instead of peertube.com/v/73WakrfVbNJBaAmhQtEeDv

You can see more details in the updated description of this PR.

@Chocobozzz, did you have this feature implemented like that in mind? If it looks good to you, the issue #4011 might be resolved easily for channels after merging this one.

@kimsible kimsible marked this pull request as ready for review April 28, 2021 23:19
@kimsible kimsible force-pushed the shorter-URLs-channels-accounts branch from 02ffda7 to 0c37efc Compare April 29, 2021 00:37
@Chocobozzz Chocobozzz self-assigned this Apr 29, 2021
@kimsible kimsible force-pushed the shorter-URLs-channels-accounts branch 2 times, most recently from 5bb2827 to 3cdb0b2 Compare May 3, 2021 16:20
@kimsible kimsible force-pushed the shorter-URLs-channels-accounts branch from 59b1663 to 030ccfc Compare May 5, 2021 09:48
@kimsible
Copy link
Contributor Author

@Chocobozzz @rigelk is there something you wait for this PR ? something I can do ? I thought it was related to UI/UX of channels / accounts profiles, do you plan to merge it after the 3.2 ?

@Chocobozzz
Copy link
Owner

Yes, I'll update and merge the PR for 3.3 because the resumable upload PR took a lot of my time.

@kimsible
Copy link
Contributor Author

Yes, I'll update and merge the PR for 3.3 because the resumable upload PR took a lot of my time.

Thanks no pb ! I saw this huge PR, it's good to have releases size well-balanced.

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.

Shorter URLs for videos, accounts and channels
2 participants