-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Added offset prop to Tooltip and Popover components #1018
Added offset prop to Tooltip and Popover components #1018
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, some small change requests.
- All changes must have unit tests.
- Documentation is missing
d526a70
to
4e10dd9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix linter errors
src/__tests__/Popover.spec.js
Outdated
@@ -513,5 +513,17 @@ describe('Popover', () => { | |||
|
|||
wrapper.detach(); | |||
}); | |||
|
|||
it('should pass down offset', ()=> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space before =>
src/__tests__/Popover.spec.js
Outdated
<Popover | ||
isOpen | ||
target="innerTarget" | ||
offset='100'>Popover content</Popover> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Unexpected usage of singlequote , use " " instead
- The closing bracket must be aligned with the line containing the opening tag
src/__tests__/Popover.spec.js
Outdated
offset='100'>Popover content</Popover> | ||
); | ||
|
||
expect(wrapper.find(PopperContent).props().offset).toEqual('100') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon
src/__tests__/Tooltip.spec.js
Outdated
@@ -236,6 +236,18 @@ describe('Tooltip', () => { | |||
wrapper.unmount(); | |||
}); | |||
|
|||
it('should pass down offset', ()=> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space before =>
src/__tests__/Tooltip.spec.js
Outdated
<Tooltip | ||
isOpen | ||
target="target" | ||
offset='100'>Tooltip content</Tooltip> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Unexpected usage of singlequote , use " " instead
- The closing bracket must be aligned with the line containing the opening tag
src/__tests__/Tooltip.spec.js
Outdated
offset='100'>Tooltip content</Tooltip> | ||
); | ||
|
||
expect(wrapper.find(PopperContent).props().offset).toEqual('100') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon
Props (within JSX) should use double quotes (just as HTML attributes would be) everything else should be single quotes. |
@illiteratewriter we use Travis-CI to automatically run our unit tests and for code linting. When a pull request is opened on GitHub (or commits are added to the pull request), Travis CI receives a notification and runs a build. During the build, Travis CI update the status icon of the pull request to one of the following statuses:
Your PR build fails, because eslint found some error. You can view the log here. You should run linter before commits. I hope this helps you. 😃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you for being patient and helping me with this. It was great working with you. :) |
No description provided.