-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Plan for deprecation & removal of doc versioned id #6018
Comments
I'm for an immediate breaking change. Once we get legacy code intertwined with useful code it's very hard to clean up. Also, prompting users to upgrade with a warning is no different from prompting them with an error; up-to-date users are going to do it and casual ones will ignore it until the warning turns into an error. The migration could be painful considering it's not a simple search & replace. Maybe we should provide another CLI command in the docs plugin to do it for the users? This CLI command can be removed in the future. I think |
Wouldn't just searching for |
Haha, yeah, regex replace itself would be a bit too much, and it would probably be |
@slorber I think we should also remove the coercion of prefixing IDs with the directory. |
Yes, agree on that, An explicit id should not change when you move a doc around, and you should not need to edit the sidebar when a doc changes place This is another breaking change that will annoy users. |
Let's do a breaking change for all before the official release. I wonder if many are using the explicit ID anyways. |
Checked and 3/3 so far 😅 :
But only Relay uses id + nest docs in subfolders, so not all will be affected This is going to be quite annoying (particularly for Relay, a lot of versions to edit), so we'd rather add first a deprecation warning on something so that users can easily update all those ids. Let's use Relay as a test site to see how painful it is to migrate |
@slorber I thought about it. The only way for this breaking change to be progressive is if we allow two IDs to be equally valid for a doc (one being versioned and with the folder path appended, the other with neither), and warn about the previous. |
Have you read the Contributing Guidelines on issues?
Motivation
As part of #5830 I had to start a refactor we wanted to do for a long time:
The implementation in this PR is just the beginning:
We should now:
doc.id
asap with a clear warning telling the user to upgrade the sidebar files (ie removing the version prefixes)doc.id
, then renamedoc.unversionedId
todoc.id
Or maybe we could do the breaking change / cleanup immediately, considering it's not too painful for users to remove the sidebar prefix?
(but how would they discover what they need to do, we probably still need a good error message in our code?)
Self-service
The text was updated successfully, but these errors were encountered: