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

Changed utility method IAvatarGenerator.generate to take userid instead of full name. #11

Merged
merged 1 commit into from
May 31, 2016

Conversation

shylux
Copy link
Contributor

@shylux shylux commented May 25, 2016

This makes the utility more flexible while overwriting because the user can now be identified accurately.

My use-case is to take a custom property on the member object and generate an icon from that.
This is currently not possible because ftw.avatar passes the fullname to the IAvatarGenerator.generate method. I can't safely identify the user with this information.

This PR moves the functionality to generate an avatar from the fullname entirely into the default implementation. This allows a products to override this and use entirely different user information to generate the icon.

…ad of full name.

This makes the utility more flexible while overwriting because the user can now be identified accurately.
@@ -2,10 +2,13 @@ Changelog
=========


1.0.8 (unreleased)
2.0.0 (unreleased)
Copy link
Member

Choose a reason for hiding this comment

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

I would release it as 1.1.0, not 2.0.0, as it is just a backwards incompatible API change and not a complete rewrite 😉
If you change it in setup.py too, zest.releaser will propose it correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jone But a backwards incompatible API change is the DEFINITON of a major version: http://semver.org/
If we use 1.1.0 others will think this is a backwards compatible update and will update it without a second thought. And then things break and people get angry. 😉

Copy link
Member

Choose a reason for hiding this comment

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

fair enough 😉

@jone
Copy link
Member

jone commented May 26, 2016

👍 Awesome!
Feel free to merge / release 😉

@shylux shylux merged commit 8e52002 into master May 31, 2016
@shylux shylux deleted the lk_userid branch May 31, 2016 07:19
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.

2 participants