#977 - 2nd order hierarchical tags are given a special style#978
#977 - 2nd order hierarchical tags are given a special style#978miloofcroton merged 7 commits intomasterfrom
Conversation
giving special style to them, with blue and all uppercase
Codecov Report
@@ Coverage Diff @@
## master #978 +/- ##
==========================================
- Coverage 89.91% 89.73% -0.18%
==========================================
Files 183 185 +2
Lines 3491 3567 +76
Branches 1130 1156 +26
==========================================
+ Hits 3139 3201 +62
- Misses 327 341 +14
Partials 25 25
|
| color: @featured-color-info-borderColor; | ||
| font-weight: bold; | ||
| font-size: @size-standard; | ||
| text-transform: uppercase; |
There was a problem hiding this comment.
@rsadres do we want all of the blue titles to always be uppercased?
src/components/Tag/Tag.jsx
Outdated
| const hasOtherChildren = !_.isEmpty(otherChildren); | ||
|
|
||
| const hasGrandChildren = !!subTags.find( | ||
| tag => parseInt(tag.key.slice(1, 2)) > 1 |
There was a problem hiding this comment.
I'm a little confused by this, what is tag.key and how is it determining that there are tag grand children? I'd imagine we'd need to loop through the subTags and do something like filterTypes(subSubTag, Tag).length > 1 or something (not tested).
There was a problem hiding this comment.
The tags are from React.children.toArray() and the keys have a weird string representation, but if the second character is greater than 1, then it has a grandchild.
That's true, we could loop through the subTags too. That would be more readable too.
We are now checking for 2nd order hierarchical tags and giving special style to them, with blue and all uppercase.
PR Checklist
commonat minimum)semver-labels