Skip to content

#977 - 2nd order hierarchical tags are given a special style#978

Merged
miloofcroton merged 7 commits intomasterfrom
977-tag-section-header
Apr 19, 2019
Merged

#977 - 2nd order hierarchical tags are given a special style#978
miloofcroton merged 7 commits intomasterfrom
977-tag-section-header

Conversation

@miloofcroton
Copy link
Copy Markdown
Contributor

@miloofcroton miloofcroton commented Apr 12, 2019

We are now checking for 2nd order hierarchical tags and giving special style to them, with blue and all uppercase.

PR Checklist

  • Manually tested across supported browsers
    • Chrome
    • Firefox
    • Safari
    • Edge (Win 10)
  • Unit tests written (common at minimum)
  • PR has one of the semver- labels
  • Two core team engineer approvals
  • One core team UX approval

giving special style to them, with blue and all uppercase
@codecov-io
Copy link
Copy Markdown

codecov-io commented Apr 12, 2019

Codecov Report

Merging #978 into master will decrease coverage by 0.17%.
The diff coverage is 100%.

@@            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
Impacted Files Coverage Δ
src/components/Tag/Tag.jsx 100% <100%> (ø) ⬆️
src/components/Icon/CrossIcon/CrossIcon.jsx 100% <0%> (ø) ⬆️
src/util/style-helpers.js 100% <0%> (ø) ⬆️
src/components/SidePanel/SidePanel.jsx 74.46% <0%> (ø) ⬆️
src/components/Table/Table.jsx 81.25% <0%> (ø) ⬆️
...bleSingleSelect/SearchableSingleSelect.reducers.js 100% <0%> (ø)
.../SearchableSingleSelect/SearchableSingleSelect.jsx 76.66% <0%> (ø)

color: @featured-color-info-borderColor;
font-weight: bold;
font-size: @size-standard;
text-transform: uppercase;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@rsadres do we want all of the blue titles to always be uppercased?

const hasOtherChildren = !_.isEmpty(otherChildren);

const hasGrandChildren = !!subTags.find(
tag => parseInt(tag.key.slice(1, 2)) > 1
Copy link
Copy Markdown
Contributor

@jondlm jondlm Apr 12, 2019

Choose a reason for hiding this comment

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

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).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

@miloofcroton miloofcroton merged commit a61e8fd into master Apr 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants