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

feat(Popup): add vertical offset #1146

Closed
wants to merge 3 commits into from

Conversation

goloveychuk
Copy link

@goloveychuk goloveychuk commented Jan 11, 2017

In current implementation it's impossible to change vertical position of popup (without ugly hacks).
This pr changes this.

@goloveychuk
Copy link
Author

it's not correct. let me fix.

@codecov-io
Copy link

codecov-io commented Jan 11, 2017

Codecov Report

Merging #1146 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1146      +/-   ##
==========================================
+ Coverage   99.75%   99.75%   +<.01%     
==========================================
  Files         142      142              
  Lines        2468     2470       +2     
==========================================
+ Hits         2462     2464       +2     
  Misses          6        6
Impacted Files Coverage Δ
src/modules/Popup/Popup.js 100% <100%> (ø) ⬆️

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 bcc9482...290a41a. Read the comment docs.

@goloveychuk
Copy link
Author

goloveychuk commented Jan 11, 2017

fixed, force pushed

Copy link
Member

@levithomason levithomason left a comment

Choose a reason for hiding this comment

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

This PR is failing due to missing test coverage. There is an existing test for the offset property that can copied and updated to test vertical offset logic.

Other than this is I've left one API comment. Thanks for the work here!

@@ -76,6 +76,9 @@ export default class Popup extends Component {
/** Horizontal offset in pixels to be applied to the popup */
offset: PropTypes.number,

/** Vertical offset in pixels to be applied to the popup */
verticalOffset: PropTypes.number,
Copy link
Member

Choose a reason for hiding this comment

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

How about allowing an X and Y offset in the current offset prop instead of adding a new prop?

offset={[5, 10]}

// vs

offset={5}
verticalOffset={10} 

We could still allow a single value to apply a horizontal offset only,so it is backwards compatible.

Copy link
Author

Choose a reason for hiding this comment

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

yea, your api is better. will change tomorrow

@levithomason levithomason changed the title vertical popup offset feat(Popup): add vertical offset Jan 11, 2017
@levithomason
Copy link
Member

Looks like this PR is falling behind. Shall we close it, or update and merge?

Alexander Fedyashov added 2 commits June 1, 2017 15:16
@goloveychuk
Copy link
Author

goloveychuk commented Jun 1, 2017

we can close it.

@@ -9,7 +9,7 @@ import { default as MessageList } from './MessageList';
export interface MessageProps {
[key: string]: any;

/** An element type to render as (string or function). */
/** An element type to render as (string or function). */
Copy link
Member

Choose a reason for hiding this comment

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

Lint fix. Quite strange issue.

Copy link
Member

@layershifter layershifter left a comment

Choose a reason for hiding this comment

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

@levithomason I've updated this PR to latest master and implimented functionality. However, I see there a potential problem, offset tests are testing nothing in fact.

@levithomason
Copy link
Member

@layershifter Could you expound a bit on "testing nothing"?

@layershifter
Copy link
Member

@levithomason take a look at the assertions in the offset tests, they only check what Popup is visible. But the offsets and positions aren't tested in any way.

@levithomason
Copy link
Member

Oh, I see, existing tests were updated. We need new tests that assert this is working.

@levithomason
Copy link
Member

This has gotten stale and we don't hear much about this feature from the community. Closing for housekeeping. Happy to merge a complete community PR for this feature if submitted.

bharatzvm pushed a commit to bharatzvm/Semantic-UI-React that referenced this pull request Jan 18, 2018
bharatzvm pushed a commit to bharatzvm/Semantic-UI-React that referenced this pull request Feb 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants