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

fix(docs): remove invalid character from id. #2292

Closed
wants to merge 4 commits into from

Conversation

ByMykel
Copy link

@ByMykel ByMykel commented Jun 29, 2023

When I try to click on any element with the dolar sign I get the following error:

image
image

This is happening because the id attribute has an invalid character ($).

https://pinia.vuejs.org/api/interfaces/pinia._StoreWithState.html

@netlify
Copy link

netlify bot commented Jun 29, 2023

Deploy Preview for pinia-official ready!

Name Link
🔨 Latest commit f5f9084
🔍 Latest deploy log https://app.netlify.com/sites/pinia-official/deploys/649ee76321063c0008d0d3fc
😎 Deploy Preview https://deploy-preview-2292--pinia-official.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@posva posva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks but this are generated. They should be changed in the generation script in the docs package folde

@ByMykel
Copy link
Author

ByMykel commented Jun 30, 2023

@posva ohh, should have taken more time to see it carefully. Can I still make the changes or is better to open an issue?

@posva
Copy link
Member

posva commented Jun 30, 2023

Make the changes but don’t open an issue about this

@ByMykel ByMykel requested a review from posva June 30, 2023 07:35
Copy link
Member

@posva posva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant the changes to the script that generates the docs 😅

@ByMykel
Copy link
Author

ByMykel commented Jun 30, 2023

Doesn't packages/docs/typedoc-markdown.js generate the id's that are failing?

@posva
Copy link
Member

posva commented Jun 30, 2023

Oh sorry, I didn't see on the phone. I'm starting to think this should actually be handled by vitepress 🤔 It should probably use document.getElementById() instead to avoid this specific problem. Vue Router does a similar thing

@ByMykel
Copy link
Author

ByMykel commented Jun 30, 2023

@posva I'm not that good to understand your solution, but I think $ is not a valid character for an id. When I link you https://pinia.vuejs.org/api/interfaces/pinia._StoreWithState.html#Methods-$patch you can see that the page don't scroll down to $patch section.

So using document.getElementById() would fix the click, but not when opening the link.

@posva posva added the upstream The fix depends on a dependency label Jun 30, 2023
@Oscar-Raygoza
Copy link

oa

@ByMykel ByMykel closed this Aug 3, 2023
@ByMykel ByMykel deleted the fix-id-names branch August 3, 2023 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream The fix depends on a dependency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants