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

LivePreviewState naming collision #149

Closed
mnaoumov opened this issue Oct 4, 2024 · 14 comments
Closed

LivePreviewState naming collision #149

mnaoumov opened this issue Oct 4, 2024 · 14 comments

Comments

@mnaoumov
Copy link
Contributor

mnaoumov commented Oct 4, 2024

There are two pages

  1. https://github.com/obsidianmd/obsidian-developer-docs/blob/cc385fedfa8ba84a8909c71850b26b1b4e277616/en/Reference/TypeScript%20API/LivePreviewState.md
  2. https://github.com/obsidianmd/obsidian-developer-docs/blob/cc385fedfa8ba84a8909c71850b26b1b4e277616/en/Reference/TypeScript%20API/livePreviewState.md

that differ only in casing.

This is going to be an issue on case-insensitive file systems.

@lishid
Copy link
Contributor

lishid commented Oct 5, 2024

Yeah that one has been annoying. I will find a better name for the interface.

@revolter
Copy link
Contributor

Just stumbled upon this issue, and was confused not being able to do some rebases.

@revolter
Copy link
Contributor

Did you find a better name? I could try to create a PR if I know what name to use.

@joethei
Copy link
Contributor

joethei commented Nov 30, 2024

We haven't found a better name yet, and we can't accept PR's to the relevant docs, as they are generated from our source code.

@mnaoumov
Copy link
Contributor Author

mnaoumov commented Nov 30, 2024

@joethei How about livePreviewStatePlugin ?

@revolter
Copy link
Contributor

revolter commented Dec 3, 2024

We haven't found a better name yet, and we can't accept PR's to the relevant docs, as they are generated from our source code.

I know. I was asking in order to create a PR for https://github.com/obsidianmd/obsidian-api.

@mnaoumov
Copy link
Contributor Author

mnaoumov commented Dec 3, 2024

@revolter they don't accept PRs there either. It's all generated

@revolter
Copy link
Contributor

revolter commented Dec 3, 2024

Oooh, I see.

@lishid
Copy link
Contributor

lishid commented Dec 4, 2024

We can't rename the plugin name unfortunately because plugins are already using it. However we can change the type name and that 1) won't break existing plugins, and 2) will most likely not cause plugin build issues if the plugin is simply using the object. It is only a problem if a plugin explicitly specifies a variable of the return value, which is in most cases unnecessary.

I am considering updating it to LPState or LivePreviewStateType.

@mnaoumov
Copy link
Contributor Author

mnaoumov commented Dec 4, 2024

@lishid you could consider instead of renaming the type, just modify the docs generator to generate unambiguous doc file name such as LivePreviewState2.md

@lishid
Copy link
Contributor

lishid commented Dec 4, 2024

The docs generator is unfortunately a gigantic monstrosity that I dare not attempt to try to modify. :)

@mnaoumov
Copy link
Contributor Author

mnaoumov commented Dec 4, 2024

That's a pity as it has some serious flaws that you would need to address sooner or later anyways. I try to raise those flaws here and in the forum when I discover them

@revolter
Copy link
Contributor

revolter commented Feb 1, 2025

Any updates after ~2 months?

@lishid
Copy link
Contributor

lishid commented Feb 18, 2025

Fixed by obsidianmd/obsidian-api@165ccdd

@lishid lishid closed this as completed Feb 18, 2025
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

No branches or pull requests

4 participants