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

Add onClose attribute to polaris-popover #131

Merged
merged 2 commits into from
May 24, 2018
Merged

Conversation

tomnez
Copy link
Contributor

@tomnez tomnez commented May 23, 2018

Adds the onClose property to the popover component

Copy link
Member

@andrewpye andrewpye left a comment

Choose a reason for hiding this comment

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

Looks good @tomnez, couple of small things to address before we :shipit:

@@ -87,10 +87,9 @@ export default Component.extend({
*
* @property onClose
* @type {function(source: React.ReactElement)}
Copy link
Member

Choose a reason for hiding this comment

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

lol, we should probably update this to just be function 😉

@@ -1,6 +1,7 @@
{{#basic-dropdown
verticalPosition=verticalPosition
onOpen=(action "onOpen")
onClose=onClose
Copy link
Member

Choose a reason for hiding this comment

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

Wrap this in an action helper as well to ensure context is always correctly maintained (it's what @vladucu would want 😉)

Copy link
Member

Choose a reason for hiding this comment

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

yes, please...it's also much easier to read 😄

@@ -6,7 +6,7 @@
component](https://polaris.shopify.com/components/overlays/popover). This component uses [`ember-basic-dropdown`](https://github.com/cibernox/ember-basic-dropdown) to implement popover functionality. Note that the usage is slightly different from the React implementation so please pay attention to the examples below.


**NOTE:** _the `active`, `activatorWrapper`, `preventAutofocus` and `onClose` properties are currently unimplemented._
**NOTE:** _the `active`, `activatorWrapper`, and `preventAutofocus` properties are currently unimplemented._
Copy link
Member

Choose a reason for hiding this comment

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

Nice job remembering this 👍 Can you maybe add an example of using onClose here as well? Either work it into one of the existing examples or add a new one.


// open the popover
click(activatorSelector);

Copy link
Member

Choose a reason for hiding this comment

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

Maybe check that the action hasn't run at this point just to be concrete about things? 🤷‍♂️

@andrewpye
Copy link
Member

Also can you check what's up with Travis pls? Want a green light before merging this 👍

@andrewpye
Copy link
Member

@tomnez merge up from master - the mighty @vladucu has fixed the travis errors 🔥

@tomnez
Copy link
Contributor Author

tomnez commented May 24, 2018

@andrewpye updated, and thanks to the mighty @vladucu for the travis fix 👊

@tomnez tomnez requested a review from andrewpye May 24, 2018 14:13
Copy link
Member

@andrewpye andrewpye left a comment

Choose a reason for hiding this comment

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

Looks good to me @tomnez 💯

Copy link
Member

@vladucu vladucu left a comment

Choose a reason for hiding this comment

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

🥇

@tomnez tomnez merged commit 61ad941 into master May 24, 2018
@tomnez tomnez deleted the polaris-popover-on-close branch May 24, 2018 15:06
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.

None yet

3 participants