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

docs(Ref): show again docs #1777

Merged
merged 3 commits into from
Aug 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

## [Unreleased]

### Documentation
- Restore docs for `Ref` component @layershifter ([#1777](https://github.com/stardust-ui/react/pull/1777))

<!--------------------------------[ v0.36.1 ]------------------------------- -->
## [v0.36.1](https://github.com/stardust-ui/react/tree/v0.36.1) (2019-08-09)
[Compare changes](https://github.com/stardust-ui/react/compare/v0.36.0...v0.36.1)
Expand Down
12 changes: 9 additions & 3 deletions build/gulp/plugins/util/getComponentInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,16 @@ const getComponentInfo = (filepath: string, ignoredParentInterfaces: string[]):
const constructorName = _.get(Component, 'prototype.constructor.name', null)

// add component type
const type = componentType

let type = componentType
// add parent/child info
const isParent = filenameWithoutExt === dirname
let isParent = filenameWithoutExt === dirname

// Tweak for Ref component as it is distributed as a separate package
if (info.displayName === 'Ref') {
type = 'component'
isParent = true
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Don't have better idea now

Copy link
Member

Choose a reason for hiding this comment

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

🐽


const isChild = !isParent
const parentDisplayName = isParent ? null : dirname
// "Field" for "FormField" since it is accessed as "Form.Field" in the API
Expand Down
2 changes: 1 addition & 1 deletion build/gulp/tasks/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ task(

const componentsSrc = [
`${paths.posix.packageSrc('react')}/components/*/[A-Z]*.tsx`,
`${paths.posix.packageSrc('react-component-ref')}/src/[A-Z]*.tsx`,
`${paths.posix.packageSrc('react-component-ref')}/[A-Z]*.tsx`,
Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, broken path

`${paths.posix.packageSrc('react')}/lib/accessibility/FocusZone/[A-Z]!(*.types).tsx`,
]
const behaviorSrc = [`${paths.posix.packageSrc('react')}/lib/accessibility/Behaviors/*/[a-z]*.ts`]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const unsupportedComponents = [
'Provider',
'RadioGroup',
'Toolbar',
'Ref',
]

const ComponentPlayground: React.FunctionComponent<ComponentPlaygroundProps> = props => {
Expand Down