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

chore(behavior): rename toolbarBehavior to menuAsToolbarBehavior #1393

Merged
merged 7 commits into from
Jun 3, 2019

Conversation

miroslavstastny
Copy link
Member

@miroslavstastny miroslavstastny commented May 26, 2019

BREAKING CHANGE

  • rename toolbarBehavior to menuAsToolbarBehavior
  • rename toolbarButtonBehavior to menuItemAsToolbarButtonBehavior

Details

We plan to add toolbarBehavior to be used by Toolbar component, therefore we need to rename existing toolbarBehavior.
Current toolbarBehavior which uses toolbarButtonBehavior expect children items to have wrapper and root slots - this works for Menu component (which renders as ul > li > a) but is not suitable for Toolbar component (which is expected to render as div > button).
Discussed offline with @jurokapsiar

@codecov
Copy link

codecov bot commented May 26, 2019

Codecov Report

Merging #1393 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1393   +/-   ##
=======================================
  Coverage   73.27%   73.27%           
=======================================
  Files         802      802           
  Lines        6025     6025           
  Branches     1775     1756   -19     
=======================================
  Hits         4415     4415           
  Misses       1604     1604           
  Partials        6        6
Impacted Files Coverage Δ
packages/react/src/components/Chat/ChatMessage.tsx 84.61% <ø> (ø) ⬆️
packages/react/src/components/Menu/Menu.tsx 68.57% <ø> (ø) ⬆️
packages/react/src/index.ts 100% <ø> (ø) ⬆️
packages/react/src/components/Menu/MenuItem.tsx 34.04% <ø> (ø) ⬆️
...haviors/Toolbar/menuItemAsToolbarButtonBehavior.ts 100% <100%> (ø)
...ibility/Behaviors/Toolbar/menuAsToolbarBehavior.ts 100% <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 00aad44...6cee29b. Read the comment docs.

items={[
{
key: 'show-code',
content: <ComponentButton iconName="code" label="Try it" />,
onClick: onShowCode,
accessibility: toolbarButtonBehavior,
Copy link
Member Author

Choose a reason for hiding this comment

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

This is no longer necessary with #1282

@sophieH29
Copy link
Contributor

@miroslavstastny shouldn't it be menuItemAsToolbarButtonBehavior?
I know it's longer, but menuAsToolbarButtonBehavior might not give any sense

@miroslavstastny miroslavstastny merged commit f117326 into master Jun 3, 2019
@delete-merged-branch delete-merged-branch bot deleted the chore/rename-toolbar-behavior branch June 3, 2019 20:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants