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

Correct noink property to no-ink to actually conform to established property name conventions #69

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

lozandier
Copy link

@lozandier lozandier commented May 31, 2016

The problem

While sorta funny & daresay "cute", noink seemingly seriously violates the conventions expected for property names that other elements conform to. Seeing no reason that it be a special exception, this PR changes the noink boolean property to no-ink

If noink is still used—or existing instances using this behavior are still using it— its observer will instead delegate the changes to the correct observers associated with no-ink while providing a console warning that the use of noink is deprecated.

Edit: To clarify, these changes enable noink to be used now by existing consumers of the component while communicating that it is on its way out of the API—effectively starting a phase-out period.

This enables the current behavior while informing consumers of this component that noink should no longer be relied on once 1.0 is bumped to 1.1.

Side-effects

  • Version changed to 1.0.12
  • console.warn is used to warn consumers that the no-ink
  • The main file is slightly larger (8 lines)

Recommended reviewers

Motivated in a way by @notwaldorf about APIs (always wanted to go ahead and do this change but haven't had moments often that I had to rely on this behavior until now), it'd be awesome she reviewed it along with the other 3 recent reviewers of this repo:

Tests Pass?

Leveraged existing tests given the changes made; I can see an argument that noInk method be mocked & ensured to be called when noink is still used & so on…

Estimated Review Time

  • Estimated review time is 5-8 minutes.

@keanulee
Copy link
Contributor

Removing noink would be a breaking change, so in keeping with semver, it wouldn't be appropriate for a feature (1.1) release and would have to be a major (e.g. 2.0) release. While I agree that no-ink is more consistent with other property/attribute names, I don't think this is worth breaking/deprecating existing users on at least on this major version (1.x).

@lozandier
Copy link
Author

lozandier commented May 31, 2016

@keanulee This change doesn't break the use of noink right now, rather it warns that's it's on its way out that I'm of the opinion make sense given the existing property name conventions established (including w/ SVGs as well).

Being a minor change & keeping the existing behavior while leaving room for its succession, I thought 1.0.12 would be appropriate.

Having a hunch that it may very well be something that is removed altogether with 2.x rather than 1.11 despite being a typo of an existing method, I edited my error message to not yet get into detail what version will remove noink

… the use of `noink` with deprecation message
demo/index.html Outdated
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<!--
Copy link
Member

Choose a reason for hiding this comment

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

Why the change?

Copy link
Author

Choose a reason for hiding this comment

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

Admittedly stylistic since it's valid either way but caught my vim editor off-guard (opinionated or outdated check by original author being the traditional way it's declared before HTML5). I'll revert this as well.

@abdonrd
Copy link
Member

abdonrd commented Jun 1, 2016

LGTM! :)

bower.json Outdated
@@ -1,6 +1,6 @@
{
"name": "paper-behaviors",
"version": "1.0.11",
"version": "1.0.12",
Copy link
Contributor

Choose a reason for hiding this comment

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

Side note: we prefer to do this as a separate commit

Copy link
Author

@lozandier lozandier Jun 2, 2016

Choose a reason for hiding this comment

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

Understood, this is reverted.

@lozandier
Copy link
Author

@notwaldorf @abdonrd @keanulee Stylistic & ultimately out-of-scope changes of this PR removed; feel free to give me a LGTM (in the case of @abdonrd, perhaps again) when you're next free for a LGTM combo breaker.

@lozandier
Copy link
Author

@keanulee To confirm, your concerns about 1.1 vs. `2.0 has been addressed.

@notwaldorf
Copy link
Contributor

notwaldorf commented Jun 3, 2016

/cc @cdata since this is a bigger discussion that this PR, imo (other elements have a noink property). Also: noink is currently being used for styling in a bunch of places (paper-ripple)

@cdata
Copy link
Contributor

cdata commented Jun 3, 2016

Thanks for raising this point, @lozandier.

noink is a (unfortunate) carry-over from Polymer 0.5 element conventions. Frankly, it bothers me to no end every time I have to think about this attribute.

A rename amounts to a breaking API change (in turn asking for a major version bump), and regardless should be done in a coordinated fashion across all elements with the noink attribute. We should address this by changing noink to noInk per our convention as we upgrade elements to 2.0, but in the mean time we cannot break the de facto convention that asks that noink be spelled the way it is.

@lozandier
Copy link
Author

lozandier commented Jun 3, 2016

@cdata Right, I totally get that. Accordingly, I made sure to account for that yet have the element edited to encourage uses of the element moving forward to correctly use no-ink instead of noink while not immediately breaking existing instances that use noink instead.

The end consumer will see the console warning with their use or end users of the document that uses the behavior via noink that implicitly encourage them to change to no-ink superficially in the meantime.

@abdonrd
Copy link
Member

abdonrd commented Jun 9, 2016

I'm totally agree display a warning for now, and make the break change in the v2.0.

@lozandier
Copy link
Author

@cdata @notwaldorf @abdonrd @keanulee Any update on this? It seems we're all on the same page to make sure this isn't a breaking change (AFAIK, it isn't; it merely warns them that the component needs to own up from its unfortunate, humbling beginning to use noink instead of no-ink).

@lozandier
Copy link
Author

/cc @garlicnation @tjsavage

@tjsavage
Copy link
Contributor

tjsavage commented Jul 22, 2016

This change totally makes sense to me, to build a bridge for breaking changes we know we're going to introduce in a potential 2.0 of the elements. I agree with @cdata though that we should probably make this change across all elements that use noink at the same time. The way I think about it is that if all these elements were in a single repo, we would definitely do all of them at once.

Just taking a glance over some of the other repos with noink, it looks like some of them have bugs with how noink was applied as well.

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

6 participants