Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix(doc): Maximize link points to children or shorthand example #122

Merged
merged 5 commits into from
Aug 28, 2018

Conversation

miroslavstastny
Copy link
Member

Docs - Maximize button

Maximize button for an example in docs was always linked to children API. It was not possible to maximize shorthand example, maximize failed with 404 for examples which have shorthand impl only.

Now it links to the implementation (shorthand or children API) which is currently displayed.

TODO

  • Update the CHANGELOG.md

@codecov
Copy link

codecov bot commented Aug 23, 2018

Codecov Report

Merging #122 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #122   +/-   ##
=======================================
  Coverage   89.04%   89.04%           
=======================================
  Files          47       47           
  Lines         776      776           
  Branches      103      103           
=======================================
  Hits          691      691           
  Misses         83       83           
  Partials        2        2

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 8339f6f...1a35940. Read the comment docs.

@kuzhelov kuzhelov added the 🧰 fix Introduces fix for broken behavior. label Aug 23, 2018
@@ -649,7 +653,7 @@ class ComponentExample extends React.PureComponent<IComponentExampleProps, IComp
<div style={{ flex: '0 0 auto' }}>
<ComponentControls
anchorName={this.anchorName}
examplePath={examplePath}
examplePath={currentExamplePath || examplePath}
Copy link
Contributor

Choose a reason for hiding this comment

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

just for the sake of eliminating this a bit confusing expression (in a sense that it is not immediately evident what is the difference between these two), we could use

<ComponentControls
  ...
  examplePath = {this.sourceCodeMgr.currentPath}
  ... />

and eliminate currentExamplePath from all places - as this.sourceCodeMgr already serves as state manager, and state updates are called on path change

@kuzhelov kuzhelov added needs author feedback Author's opinion is asked and removed 🚀 ready for review labels Aug 23, 2018
@miroslavstastny miroslavstastny added 🚀 ready for review and removed needs author feedback Author's opinion is asked labels Aug 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🧰 fix Introduces fix for broken behavior. ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants