Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

js styles for ActionLink#366

Merged
chrismohr merged 8 commits intomasterfrom
action_link_styles
Jun 11, 2018
Merged

js styles for ActionLink#366
chrismohr merged 8 commits intomasterfrom
action_link_styles

Conversation

@chrismohr
Copy link
Copy Markdown
Contributor

@chrismohr chrismohr commented Jun 5, 2018

  1. Convert ActionLink styles to js
  2. Add visual diffs for ActionLink hover state

Comment thread src/components/Icon/Icon.css Outdated
.y-icon__isBlock {
display: block;
position: static;
margin-top: 0.2rem;
Copy link
Copy Markdown
Contributor Author

@chrismohr chrismohr Jun 5, 2018

Choose a reason for hiding this comment

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

I was torn about adding the margin here. Unless I'm missing something, the alternative was to add wrapping blocks with push=2, to many uses of Icon.

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.

this actually won't work because we're adding 2px to the overall height of the Icon now. there are some tricky bits regarding #327, i'd suggest converting CSS first and then tackling #327 later (i'm not sure what the best solution is, we can put our heads together on it later)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sounds good. I'll revert the changes related to #327.

Comment thread src/components/MenuButton/MenuButton.md Outdated
MenuButton with default Icon, and all applicable children properties

```js { "props": { "data-description": "with default icon and all menu item types" } }
```js { "props": { "data-description": "with default icon and all menu item types", "data-action-states": "[{\"action\":\"none\"},{\"action\":\"click\",\"selector\":\".y-menu-button\"}]" } }
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.

can you do all of these interactive diffs in a separate PR? the change required to fix #327 worries me a bit, it would be nice to have the screenshots in place for the current code first. thanks!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yup. Here's a new PR: #368

@chrismohr chrismohr force-pushed the action_link_styles branch from ae87248 to e7ea13e Compare June 6, 2018 00:38
@chrismohr chrismohr changed the title js styles for action link js styles for ActionLink Jun 6, 2018
<Icon size={IconSize.MEDIUM} block={true} className="y-actionLink--icon" />
<Block push={2}>
<Icon size={IconSize.MEDIUM} block={true} />
</Block>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm probably missing something here, I used a Block instead of

.y-actionLink--icon {	
  margin-top: 0.4rem;	

  /* Remove when this is addressed: https://github.com/Microsoft/YamUI/issues/327 */	
  position: static;	
  top: 0;	
}

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.

i think i left it as CSS because it was clear it needed to be updated when the issue was resolved, and lighter-weight solution. if you're going to move it to markup could you keep the comment with it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I tried css, but switched back again, because the style was losing out to the styles on .y-icon. I presume this is because the merge-styles are being loaded before the css styles. I've added the comment above the render function.

@chrismohr chrismohr merged commit f99ea81 into master Jun 11, 2018
@chrismohr chrismohr deleted the action_link_styles branch June 11, 2018 23:03
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.

2 participants