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

feat(Toolbar): add component #1408

Merged
merged 17 commits into from
Jun 3, 2019
Merged

Conversation

miroslavstastny
Copy link
Member

@miroslavstastny miroslavstastny commented May 29, 2019

Basic Toolbar implementation

image

Toolbar currently supports three kinds of items:

  • ToolbarItem - the icon button in the toolbar,
  • ToolbarDivider - visual separator between items,
  • ToolbarRadiogroup - logical grouping of ToolbarItem (can also contain ToolbarDivider).

See https://www.w3.org/TR/wai-aria-practices/examples/toolbar/toolbar.html for details on accessibility.

  • unit tests
  • docsite example
  • teams, teamsDark, teamsHighContrast themes
  • changelog

To be handled in separate tasks:

import { ToolbarVariables } from '../../../teams/components/Toolbar/toolbarVariables'

export default (siteVars: any): Partial<ToolbarVariables> => ({
foreground: siteVars.colors.white,
Copy link
Contributor

Choose a reason for hiding this comment

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

just the thought unrelated to this PR - really think that we need to introduce siteVariables's types for Teams theme - otherwise it might become to be pretty complicated story to maintain all this, especially given that name of the variable is not fixed on the client side

@codecov
Copy link

codecov bot commented May 29, 2019

Codecov Report

Merging #1408 into master will decrease coverage by 0.08%.
The diff coverage is 60.93%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1408      +/-   ##
==========================================
- Coverage   73.57%   73.49%   -0.09%     
==========================================
  Files         787      797      +10     
  Lines        5885     5949      +64     
  Branches     1734     1746      +12     
==========================================
+ Hits         4330     4372      +42     
- Misses       1549     1571      +22     
  Partials        6        6
Impacted Files Coverage Δ
packages/react/src/index.ts 100% <ø> (ø) ⬆️
packages/react/src/components/Menu/MenuItem.tsx 34.04% <ø> (+3.19%) ⬆️
...gh-contrast/components/Toolbar/toolbarVariables.ts 0% <0%> (ø)
.../teams-dark/components/Toolbar/toolbarVariables.ts 0% <0%> (ø)
...hemes/teams/components/Toolbar/toolbarVariables.ts 0% <0%> (ø)
...es/react/src/components/Toolbar/ToolbarDivider.tsx 100% <100%> (ø)
...emes/teams/components/Toolbar/toolbarItemStyles.ts 14.28% <14.28%> (ø)
...rc/themes/base/components/Toolbar/toolbarStyles.ts 50% <50%> (ø)
...s/teams/components/Toolbar/toolbarDividerStyles.ts 50% <50%> (ø)
packages/react/src/components/Toolbar/Toolbar.tsx 52.94% <52.94%> (ø)
... and 13 more

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 c69313c...64a7573. Read the comment docs.

@codecov
Copy link

codecov bot commented May 29, 2019

Codecov Report

Merging #1408 into master will decrease coverage by 0.21%.
The diff coverage is 52.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1408      +/-   ##
==========================================
- Coverage   73.49%   73.27%   -0.22%     
==========================================
  Files         793      802       +9     
  Lines        5949     6025      +76     
  Branches     1754     1775      +21     
==========================================
+ Hits         4372     4415      +43     
- Misses       1571     1604      +33     
  Partials        6        6
Impacted Files Coverage Δ
packages/react/src/index.ts 100% <ø> (ø) ⬆️
.../src/themes/teams/components/Menu/menuVariables.ts 33.33% <ø> (ø) ⬆️
packages/react/src/components/Menu/MenuItem.tsx 34.04% <ø> (+3.19%) ⬆️
...gh-contrast/components/Toolbar/toolbarVariables.ts 0% <0%> (ø)
...es/react/src/components/Toolbar/ToolbarDivider.tsx 100% <100%> (ø)
...s/teams/components/Toolbar/toolbarDividerStyles.ts 20% <20%> (ø)
...rc/themes/base/components/Toolbar/toolbarStyles.ts 50% <50%> (ø)
...hemes/teams/components/Toolbar/toolbarVariables.ts 50% <50%> (ø)
packages/react/src/components/Toolbar/Toolbar.tsx 52.94% <52.94%> (ø)
...emes/teams/components/Toolbar/toolbarItemStyles.ts 6.25% <6.25%> (ø)
... and 12 more

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 c615d6d...d61a8dc. Read the comment docs.

'backgroundFocus',
'borderFocus',

'foregroundDisabled1',
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we may want to extend the color scheme, and use the foregroundDisabled1 for the foregroundDisabled, so it would be more user friendly, but then it may raise a problem because the user will think this one is acttually the foregroundDisabled from the color scheme... Let's just think about this and decide together whether we want that.

@miroslavstastny miroslavstastny merged commit 3ccdafd into master Jun 3, 2019
@delete-merged-branch delete-merged-branch bot deleted the proto/calling-screen-toolbar branch June 3, 2019 19:41
@kuzhelov kuzhelov mentioned this pull request Jun 7, 2019
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

5 participants