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

Core Atom HTML Element: A #71

Merged
merged 2 commits into from
Dec 6, 2018

Conversation

arcticicestudio
Copy link
Contributor

@arcticicestudio arcticicestudio commented Dec 6, 2018

Associated epic: #69
Resolves #70

To handle the logic of conditionally rendering a Gatsby Link or a basic
`<a>`, based on the passed target URL (internal & external), this commit
implements the `isRouteInternal` and `isRoutePartiallyMatch` functions
to evaluate the passed target URL.

Associated epic: GH-69
GH-70
The core atom `A` represents the inline text semantic (1) HTML element
`<a>`. It is a special  dynamic and failsafe component since it
internally uses the Gatsby `Link` component to route within the site
(internal links) while also being able to link to external targets. The
URLs are passed through the `to` and `href` props.

References:
  (1) https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Inline_text_semantics
  (2) https://www.gatsbyjs.org/docs/gatsby-link

Associated epic: GH-69
GH-70
@codecov
Copy link

codecov bot commented Dec 6, 2018

Codecov Report

Merging #71 into develop will increase coverage by 6.4%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           develop      #71     +/-   ##
==========================================
+ Coverage    81.25%   87.65%   +6.4%     
==========================================
  Files           22       25      +3     
  Lines           64       81     +17     
  Branches         9       16      +7     
==========================================
+ Hits            52       71     +19     
- Misses           9       10      +1     
+ Partials         3        0      -3
Flag Coverage Δ
#unit 87.65% <100%> (+6.4%) ⬆️
Impacted Files Coverage Δ
src/utils/isRoutePartiallyMatch.js 100% <100%> (ø)
src/utils/isRouteInternal.js 100% <100%> (ø)
.../atoms/core/HTMLElements/inlineTextSemantics/A.jsx 100% <100%> (ø)
src/styles/theme/utils/generateMediaQuery.js 50% <0%> (-50%) ⬇️
src/components/containers/core/Root/Root.jsx 70% <0%> (+5%) ⬆️
src/utils/sessionCache.js 80% <0%> (+20%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 208c9ac...e396fb4. Read the comment docs.

@arcticicestudio arcticicestudio merged commit 75d0e49 into develop Dec 6, 2018
@arcticicestudio arcticicestudio deleted the feature/gh-70-core-atom-html-element-a branch December 6, 2018 16:10
@arcticicestudio arcticicestudio removed their assignment Dec 6, 2018
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.

Core Atom HTML Element: A
2 participants