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

[Docs] Refactor header naming to lessen conflicts #12901

Closed
2 tasks done
hasezoey opened this issue Jan 11, 2023 · 2 comments · Fixed by #13113
Closed
2 tasks done

[Docs] Refactor header naming to lessen conflicts #12901

hasezoey opened this issue Jan 11, 2023 · 2 comments · Fixed by #13113
Labels
discussion If you have any thoughts or comments on this issue, please share them! docs This issue is due to a mistake or omission in the mongoosejs.com documentation
Milestone

Comments

@hasezoey
Copy link
Collaborator

hasezoey commented Jan 11, 2023

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the issue has not already been raised

Issue

Currently in the documentation, a naming of #type_Type-function is used, which can cause conflicts between static and instance methods, for example:
#model_Model-remove refers to both instance and static remove, which is not correct.

Also the type_Type is redundant, so it could be removed.
Personally i would like to not have to use band-aids for special cases and just have it correctly separated.

My proposal would be: #Type(.prototype).function, real examples:

  • #Model.remove to refer to the static remove
  • #Model.prototype.remove to refer to the instance remove

(basically like it is in JS directly)

i would target this towards 7.0 (because it would be a rather drastic change for the documentation.)

as for backwards compatibility (like bookmarks), we could add hidden elements that still have the same old header id and so could still refer to the same place (and maybe some script to translate it to the new id)

cc @vkarpov15 @Uzlopak

@hasezoey hasezoey added docs This issue is due to a mistake or omission in the mongoosejs.com documentation discussion If you have any thoughts or comments on this issue, please share them! labels Jan 11, 2023
@vkarpov15
Copy link
Collaborator

@hasezoey I like this proposal. Would you be willing to put a PR in against the 7.0 branch? You're right that we can write a script to convert the old format to new format, and 7.0 would be a great place to do that.

@vkarpov15 vkarpov15 added this to the 7.0 milestone Feb 1, 2023
@hasezoey
Copy link
Collaborator Author

hasezoey commented Feb 2, 2023

I like this proposal. Would you be willing to put a PR in against the 7.0 branch?

sure, i would like to have #12223 merged first to lessen conflicts (or duplicating work on things that are going to be deleted)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion If you have any thoughts or comments on this issue, please share them! docs This issue is due to a mistake or omission in the mongoosejs.com documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants