Skip to content

Disable proxy button when proxy is added#1604

Merged
55 merged 15 commits intodevelopfrom
feature/add-proxy-btn-disabled
Sep 21, 2016
Merged

Disable proxy button when proxy is added#1604
55 merged 15 commits intodevelopfrom
feature/add-proxy-btn-disabled

Conversation

@frenchbread
Copy link
Copy Markdown
Contributor

Closes #1484

@frenchbread
Copy link
Copy Markdown
Contributor Author

TODO: add help text to disabled button

@bajiat
Copy link
Copy Markdown
Contributor

bajiat commented Sep 20, 2016

@frenchbread Why not hide the button instead of disabling?

@frenchbread
Copy link
Copy Markdown
Contributor Author

@bajiat IMHO Hiding the "Add proxy" can confuse users. I have no idea where, in that case, to put a message saying e.g. "You have already added one proxy. Can't add more for now."

Disabling the button was also suggested by @Nazarah here.

What's left is attaching a tooltip with helper text to a button. Open to suggestions.

@frenchbread frenchbread changed the title Feature/add proxy btn disabled Disable proxy button when proxy is added Sep 20, 2016
return instance.proxies.get();
}
},
biggerThan (a, b) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please use more meaningful name variables here, didn't quite get what is a and what is b.
Also comment will help.

"proxies_pageHeader": "Proxies",
"proxies_addProxy": "Add proxy",
"proxies_noProxiesFound": "No proxies found.",
"proxies_cannotAddMoreProxies": "You already have a Proxy available to attach your API. Please select the Proxy. You can add a new Proxy only after your have deleted the existing one.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This help text is unnecessary, if we simply hide the Add Proxy button.


Template.proxies.events({
'click #add-proxy': function (event, instance) {
Modal.show('addProxy', { proxy: {}, isEdit: false });
Copy link
Copy Markdown
Contributor

@brylie brylie Sep 21, 2016

Choose a reason for hiding this comment

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

Be aware of changes to the addProxy form. Specifically, the template has been renamed proxyForm and used for both adding and editing proxies.

#1597

@brylie brylie assigned brylie and unassigned 55 Sep 21, 2016
@brylie
Copy link
Copy Markdown
Contributor

brylie commented Sep 21, 2016

This is really close. Just clean up the help text, which is not necessary. Also, check linter errors for missing imports, etc.

# Conflicts:
#	proxies/client/proxies.html
#	proxies/client/proxies.js
@frenchbread
Copy link
Copy Markdown
Contributor Author

Changes are done

@brylie brylie assigned 55 and unassigned brylie Sep 21, 2016
@55 55 added this to the Sprint 31 milestone Sep 21, 2016
@55 55 merged commit 90b0655 into develop Sep 21, 2016
@55 55 deleted the feature/add-proxy-btn-disabled branch September 21, 2016 11:54
@55 55 removed the in progress label Sep 21, 2016
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.

6 participants