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

Anchor links da sidebar direita têm erro nas slugs #108

Open
PedroAntunesCosta opened this issue Sep 26, 2024 · 2 comments · May be fixed by #131 or vtexdocs/components#28
Open

Anchor links da sidebar direita têm erro nas slugs #108

PedroAntunesCosta opened this issue Sep 26, 2024 · 2 comments · May be fixed by #131 or vtexdocs/components#28
Assignees

Comments

@PedroAntunesCosta
Copy link
Contributor

PedroAntunesCosta commented Sep 26, 2024

Se o heading da seção contém vogais acentuadas ou ç, esses caracteres são omitidos da slug do anchorlink quando se clica na sidebar direita do artigo.

O ideal é que fossem substituídos pelas suas versões sem acentos ou c no caso do ç.

Exemplos de artigos com esse erro

https://leafy-mooncake-7c2e5e.netlify.app/pt/docs/tracks/instore-setup-basico
https://leafy-mooncake-7c2e5e.netlify.app/pt/docs/tracks/relevancia
https://leafy-mooncake-7c2e5e.netlify.app/pt/faq/erro-object-reference-not-set-to-an-instance-of-an-object-ao-tentar

@phvm
Copy link
Contributor

phvm commented Oct 22, 2024

Apenas as slugs devem passar por essa processo de "parse" ou os títulos também devem?

This was linked to pull requests Oct 28, 2024
@PedroAntunesCosta PedroAntunesCosta linked a pull request Oct 30, 2024 that will close this issue
4 tasks
@julia-rabello
Copy link
Contributor

Leaving a comment here to help future investigation, since I couldn't find a solution so far:

The getHeadings function on helpcenter sets the heading slugs correctly. The first time the page loads, table of content slugs are correct.

However, upon clicking them, here's what happens:

  • They do not lead to the correct section, because the HTML ids for heading elements are set wrongfully (eliminating characters with diacritics instead of normalizing them) somewhere.
  • Table of content slugs are changed in a wrong way as well (equal to html ids) after the first click. This probably requires changes in the useEffect function in TableOfContext.tsx in the components repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants