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

Allow users to edit Version's identifier and/or slug #11814

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

humitos
Copy link
Member

@humitos humitos commented Dec 2, 2024

This is an initial POC to test the minimal implementation that we discussed in https://github.com/readthedocs/meta/discussions/147#discussioncomment-11397703.

The main goals here are:

  • Keep all the user/original values separated from the real Version
  • Do not update edited Version with values from VCS
  • Keep syncing code working properly
  • Make the minimal changes to prove this idea is possible

Re-point a slug to a different identifier

  1. Edit the version
    Screenshot_2024-12-02_16-22-59

  2. Build the version

Screenshot_2024-12-02_16-23-45

  • Note the name of the version is the correct (update-conda-startup)
  • Note the git clone command clones the correct branch
  • Note the name of the branch is not correct. We can't use verbose_name there, we should use identifier if it's overriden by the user
  1. Serve the new identifier under the previous slug
    Screenshot_2024-12-02_16-25-06

Change the slug of a version

  1. Edit the version
    Screenshot_2024-12-02_16-29-15

  2. Build the version
    Screenshot_2024-12-02_16-29-51

  3. Serve the version under the new slug
    Screenshot_2024-12-02_16-31-22

This is an initial POC to test the minimal implementation that we discussed in
readthedocs/meta#147 (comment).

The main goals here are:

- Keep all the user/original values separated from the real `Version`
- Do not update edited `Version` with values from VCS
- Keep syncing code working properly
- Make the minimal changes to prove this idea is possible
@humitos humitos force-pushed the humitos/version-edit branch from 4431807 to d48a1cc Compare December 2, 2024 15:22
@humitos
Copy link
Member Author

humitos commented Dec 2, 2024

I think this PR proves what we want to do here is possible. We will need to research a little more to find out edge cases and handle them as well (I saw there are special cases for LATEST and STABLE versions that I didn't touch on purpose).

Besides, we will need to think more about the UI/UX since there are places where verbose_name won't be accurate anymore and we will need to use the override.user_identifier instead. Overall, the workflow I followed looks good, but it will definitely need some polish.

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.

1 participant