mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 10:46:29 +03:00
Experiment with hiding "new" tags
This commit is contained in:
parent
f9a56a6993
commit
53ffee91b4
|
@ -11,7 +11,10 @@ const Tag = ({ spaced, variant, tooltip, children }) => {
|
||||||
const isValid = isString(children) && !isNaN(children)
|
const isValid = isString(children) && !isNaN(children)
|
||||||
const version = isValid ? Number(children).toFixed(1) : children
|
const version = isValid ? Number(children).toFixed(1) : children
|
||||||
const tooltipText = `This feature is new and was introduced in spaCy v${version}`
|
const tooltipText = `This feature is new and was introduced in spaCy v${version}`
|
||||||
return (
|
// TODO: we probably want to handle this more elegantly, but the idea is
|
||||||
|
// that we can hide tags referring to old versions
|
||||||
|
const hideTag = version.startsWith('2')
|
||||||
|
return hideTag ? null : (
|
||||||
<TagTemplate spaced={spaced} tooltip={tooltipText}>
|
<TagTemplate spaced={spaced} tooltip={tooltipText}>
|
||||||
v{version}
|
v{version}
|
||||||
</TagTemplate>
|
</TagTemplate>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user