Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display error message of <IconLayout> on a <Tooltip> #16

Merged
merged 18 commits into from
Apr 17, 2017

Conversation

zhusee2
Copy link
Contributor

@zhusee2 zhusee2 commented Apr 7, 2017

Purpose

The error message for an <IconLayout> should be displayed on a <Tooltip> which shows up on hover, according to the design spec.

Implement

  1. To render a <Tooltip> outside components which hide overflow contents, the following are migrated:
  • anchored() mixin (determines absolute position)
  • renderToLayer() mixin (renders Component outside of React root)
  • <AnchoredTooltip> (simplified version)
  1. Add tests for the two mixins.

@zhusee2 zhusee2 requested a review from cjies April 7, 2017 08:23
@zhusee2 zhusee2 changed the base branch from feature/zhusee_icon_button to develop April 7, 2017 08:23
@zhusee2 zhusee2 requested a review from paizanmay April 7, 2017 08:27
ReactDOM.render(element, div);
});

it('renders on top of anchor when possible or needed', () => {
Copy link
Contributor

@cjies cjies Apr 10, 2017

Choose a reason for hiding this comment

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

這 description 應該需要清楚解釋說在 700px 的位置(熒幕下方)的時候,即使是 <AnchoredBoxTop><AnchoredBoxBottom> 都會出現 top anchor。

maybe like renders top anchor when placed at the bottom of screen?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

恩恩我改一下 desc

const layerId = wrapper.instance().baseLayer.id;

// Make sure the layer is created
expect(document.getElementById(layerId)).not.toBeNull();
Copy link
Contributor

@cjies cjies Apr 10, 2017

Choose a reason for hiding this comment

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

expect(document.getElementById(layerId)).toBeTruthy();

感覺沒這麼拗口? XD

Copy link
Contributor Author

Choose a reason for hiding this comment

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

但我覺得 toBeTruthy() 的意思就是拿來測 Boolean XD
雖然這樣會動,但我覺得意思不對

@cjies
Copy link
Contributor

cjies commented Apr 10, 2017

others LGTM 辛苦了 💦

@zhusee2 zhusee2 merged commit d692ded into develop Apr 17, 2017
@zhusee2 zhusee2 deleted the feature/zhusee_icon_button_tooltip branch April 17, 2017 02:44
@zhusee2 zhusee2 mentioned this pull request Apr 17, 2017
@zhusee2 zhusee2 mentioned this pull request May 24, 2017
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants