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

docs(components): adding accessibility tab content #1840

Merged
merged 19 commits into from
Aug 28, 2019
Merged

Conversation

kolaps33
Copy link
Collaborator

@kolaps33 kolaps33 commented Aug 21, 2019

Moving behaviors from sidebar into the accessibility tab in each component.

Now the accessibility tab will include:

  • accessibility description (if exists)
  • default behavior (if exists)
  • available behavior(if exists)
  • known issues(reported bugs) (if exists)

image

@codecov
Copy link

codecov bot commented Aug 21, 2019

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1840   +/-   ##
=======================================
  Coverage   69.64%   69.64%           
=======================================
  Files         874      874           
  Lines        7610     7610           
  Branches     2215     2215           
=======================================
  Hits         5300     5300           
  Misses       2302     2302           
  Partials        8        8
Impacted Files Coverage Δ
packages/react/src/components/Embed/Embed.tsx 96.15% <ø> (ø) ⬆️
...ackages/react/src/components/Dropdown/Dropdown.tsx 88.04% <ø> (ø) ⬆️
packages/react/src/components/Menu/Menu.tsx 71.79% <ø> (ø) ⬆️
packages/react/src/components/Dialog/Dialog.tsx 35.29% <ø> (ø) ⬆️
packages/react/src/components/Slider/Slider.tsx 81.57% <ø> (ø) ⬆️
packages/react/src/components/Toolbar/Toolbar.tsx 47.76% <ø> (ø) ⬆️
packages/react/src/components/Icon/Icon.tsx 100% <ø> (ø) ⬆️

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 35d74d9...af49db6. Read the comment docs.

@kolaps33 kolaps33 changed the title adding accessibility tab content docs(components): adding accessibility tab content Aug 22, 2019
Copy link
Contributor

@lucivpav lucivpav left a comment

Choose a reason for hiding this comment

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

Somehow the old URLs still work, but they shouldn't (Sidebar tree is not expanded for instance) E.g. https://stardust-react-q53q0jbms.now.sh/behaviors/attachment

return _.upperFirst(_.lowerCase(divided))
}

const behaviorCard = (variation: any, keyValue: string) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

change to component and rename keyValue to name:

const BehaviorCard = ( { variation: any, name: string } ) => 

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

changed do component and recognized that I don't need keyValue

<React.Fragment key={keyValue}>
<Segment className="docs-example" id={getId(variation.name)} styles={exampleStyle}>
<ComponentExampleTitle
title={baseName(variation.name)}
Copy link
Member

Choose a reason for hiding this comment

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

Same thing, is used once, can be just variable inside component

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

baseName function I moved now to "BehaviorCard.tsx" file.
I let the logic there, as it looks for me a bit tricky to put it inline.
@layershifter what do you think about? :)

@kolaps33 kolaps33 reopened this Aug 27, 2019
<InlineMarkdown value={accIssues} />
</React.Suspense>
</Text>
</Segment>
</>
)}
</>
Copy link
Member

Choose a reason for hiding this comment

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

I am not fully understand the styling on bottom, let's remove it all:

  return (
    <Flex column>
-      <Flex.Item>
-        <Provider styles={{ paddingLeft: '14px', background: 'transparent' }}>
          {accessibilityDetails}
-        </Provider>
-      </Flex.Item>
    </Flex>
  )

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed to be consistent with other tabs

}

function getDescription(info) {
return _.get(_.find(info.docblock.tags, { title: 'accessibility' }), 'description')
}

function getStem(info) {
function getDefaultBehaviorName(info) {
const defaultValue = _.get(_.find(info.props, { name: 'accessibility' }), 'defaultValue')
return defaultValue && defaultValue.split('.').pop()
Copy link
Member

Choose a reason for hiding this comment

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

This throws on Flex page and I am not that .split() is required at all
My issue, nevermind

@kolaps33
Copy link
Collaborator Author

created task for refactor:
#1861

@vercel vercel bot temporarily deployed to staging August 28, 2019 15:20 Inactive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants