Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

Add support for disabled and loading states to polaris-setting-toggle #199

Merged

Conversation

andrewpye
Copy link
Member

Just found that the disabled and loading options in polaris-setting-toggle's action hash weren't supported, so added them in.

@@ -14,6 +14,7 @@ Inline usage:
enabled=enabled
action=(hash
text="Toggle it!"
loading=isToggleSettingRunning
Copy link
Contributor

Choose a reason for hiding this comment

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

should we document disabled too?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thought about it but I'm not sure there's any real value

`);

let button = find(settingActionButtonSelector);
assert.ok(
Copy link
Contributor

Choose a reason for hiding this comment

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

this could also be written as

assert.dom(settingActionButtonSelector).hasClass('Polaris-Button--loading', 'button is in loading state when loading is true');

Copy link
Member Author

Choose a reason for hiding this comment

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

It could... but I want to get this out quickly so wasn't going to update the test file to use the newer things 🤷‍♂️

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.

since you need this, let's skip updating test now, though documenting properties in the component (if not there already) would be nice before shipping

@andrewpye andrewpye merged commit a2ff046 into master Oct 10, 2018
@delete-merged-branch delete-merged-branch bot deleted the enhancement/setting-toggle-disabled-and-loading-states branch October 10, 2018 13:21
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.

3 participants