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

glossary: no tooltip when there's break lines in <abbr> tags #518

Closed
jorgeorpinel opened this issue Aug 2, 2019 · 11 comments · Fixed by #602
Closed

glossary: no tooltip when there's break lines in <abbr> tags #518

jorgeorpinel opened this issue Aug 2, 2019 · 11 comments · Fixed by #602
Assignees
Labels
p2-nice-to-have Less of a priority at the moment. We don't usually deal with this immediately. 🐛 type: bug Something isn't working. website: eng-doc DEPRECATED JS engine for /doc

Comments

@jorgeorpinel
Copy link
Contributor

jorgeorpinel commented Aug 2, 2019

For example the lines

- `etag`: strong ETag response header (only HTTP <abbr>external
  dependencies</abbr> created with `dvc import-url`)

won't produce a glossary tooltip. But they should.

If we require <abbr> terms to be in a single line, then maybe the automatic linter (pretty-quick) that runs on a Git pre-commit hook should enforce that format, like it enforces quoted text to be in a single line?

@jorgeorpinel jorgeorpinel added the 🐛 type: bug Something isn't working. label Aug 2, 2019
@jorgeorpinel
Copy link
Contributor Author

What do you think @algomaster99? Thanks

@algomaster99
Copy link
Contributor

@jorgeorpinel prettier and Rewraps plugin both take care of it. They put <abbr>...</abbr> in one line.
format

@jorgeorpinel
Copy link
Contributor Author

jorgeorpinel commented Aug 7, 2019

Not when there's a space in the term like the example I pasted in the description of this issue, above. Another one: <abbr>data artifact</abbr>

@algomaster99

This comment has been minimized.

@shcheklein

This comment has been minimized.

@shcheklein shcheklein added website: eng-doc DEPRECATED JS engine for /doc p2-nice-to-have Less of a priority at the moment. We don't usually deal with this immediately. labels Aug 7, 2019
@algomaster99

This comment has been minimized.

@shcheklein
Copy link
Member

@algomaster99:

} else if (props.tag === 'abbr') {
    const text = props.children[0]
    return <Tooltip text={text} />
  }

you can do something like:

const text = normalize_space(props.children[0])

@jorgeorpinel
Copy link
Contributor Author

It's either that or making prettier force those tags into a single line, if that's possible. But I'm guessing that's not possible to do with prettier, so I second normalizing 🙂

@jorgeorpinel

This comment has been minimized.

@jorgeorpinel

This comment has been minimized.

@shcheklein

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have Less of a priority at the moment. We don't usually deal with this immediately. 🐛 type: bug Something isn't working. website: eng-doc DEPRECATED JS engine for /doc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants