Skip to content

Pivot: JS Styling#5324

Merged
JasonGore merged 11 commits intomicrosoft:masterfrom
JasonGore:jg/convert-pivot-styling
Jun 29, 2018
Merged

Pivot: JS Styling#5324
JasonGore merged 11 commits intomicrosoft:masterfrom
JasonGore:jg/convert-pivot-styling

Conversation

@JasonGore
Copy link
Copy Markdown
Member

@JasonGore JasonGore commented Jun 23, 2018

Pull request checklist

Description of changes

Convert Pivot to use JS styling.

Cursor navigation on tabbed elements now shows a highlighted border. This is consistent with non-tabbed controls.

image

Focus areas to test

Ensure JS styling has representation in snapshot output.

Microsoft Reviewers: Open in CodeFlow

':after': {
color: 'transparent',
// TODO: how to represent this?
// content: attr(title)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I need to figure this out. If it's obvious or anybody knows, please let me know

Copy link
Copy Markdown
Member

@dzearing dzearing Jun 25, 2018

Choose a reason for hiding this comment

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

  content: 'attr(title)'

// TODO: not appearing in DOM / not working
':before': {
boxSizing: 'border-box',
borderBottom: `2px solid ${palette.themePrimary}`
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I need to figure this out too. The underline isn't appearing but I haven't looked too deeply into it yet. If it's obvious to anybody let me know

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

display: block? or does position absolute assume display block?

Copy link
Copy Markdown
Member Author

@JasonGore JasonGore Jun 25, 2018

Choose a reason for hiding this comment

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

Turns out it's because there was no content. Content on line 50 needs to be `""` instead of `` (thanks @cliffkoh)

@JasonGore
Copy link
Copy Markdown
Member Author

I need to make some changes to follow design toolkit per Ben's comments

@dzearing
Copy link
Copy Markdown
Member

minor nit: can you make the focus border appear inside of the pivot render area? It looks to be a pixel outside.

@JasonGore
Copy link
Copy Markdown
Member Author

Link hover color removed and tab focus image updated to show border inside tab

selectors: {
'&:hover, &:focus': {
color: palette.black,
zIndex: 1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

minor nit here; zIndex=1 is really not ideal. I don't know why it's here. if possible, strongly question these ones. It means that it's possible this could overlap content that it wan't intended to overlap.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Changed it and tested it and it still works fine, so I've committed it

color: palette.themePrimary,
whiteSpace: 'nowrap'
},
rootIsLarge && [classNames.rootIsLarge],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

no need to wrap in array.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah this evolved from something more complicated and I didn't unarray it

Copy link
Copy Markdown
Contributor

@kenotron kenotron left a comment

Choose a reason for hiding this comment

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

This look good to me - though probably need designer to verify

@@ -95,8 +95,6 @@ export interface IPivotStyleProps {
*/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any reason not to do the Required<Pick<....>> & Pick<...> & {} pattern here like you are doing in TeachingBubble?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No, same situation as yours. It was already in. 😆

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I had actually done the changes to TextField but that's in limbo for now.. I'll update and merge

@JasonGore
Copy link
Copy Markdown
Member Author

Ben agreed the tab bordering should be there so it's staying in

@betrue-final-final
Copy link
Copy Markdown
Member

Yes tab border on key board focus

@JasonGore JasonGore merged commit c4929c0 into microsoft:master Jun 29, 2018
Markionium added a commit to Markionium/office-ui-fabric-react that referenced this pull request Jul 1, 2018
* master: (151 commits)
  Css updates for card components (microsoft#5393)
  DatePicker MergeStyles step 2 - Converts scss to js styles (microsoft#5362)
  Update stale with 60 day comment and updated ignored label names. (microsoft#5388)
  replaced await for ie compat syntax - but still needs promise (microsoft#5387)
  Slider - mergestyle conversion (microsoft#5379)
  Applying package updates.
  Enabling publishing for charting and gridlayout. (microsoft#5378)
  TilesList: fadeOut overlay. (microsoft#5381)
  Pivot: JS Styling (microsoft#5324)
  ShimmeredDetailsList: wrapper for DetailsList with Shimmer. (microsoft#5374)
  dashboard-grid-layout improved example (microsoft#5373)
  Applying package updates.
  Addressing Issue microsoft#5165 - Using Customizer with Nav Component (microsoft#5361)
  Applying package updates.
  Address issue microsoft#5353 (microsoft#5359)
  Change log to trigger release (microsoft#5358)
  Fluent updates (microsoft#5357)
  TextField render value undefined as empty string (microsoft#5349)
  Applying package updates.
  DetailsColumn: css class changes to show gripper when hover on draggable columns (microsoft#5309)
  ...
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 30, 2019
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.

Pivot: IPivotProps style function never gets applied

7 participants