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

refactors buildObjectIdentity into super class #949

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

thomasoniii
Copy link
Contributor

The sole purpose of this pull request is to cause merge pain for Bill. Well, okay, not sole purpose. Primary, probably.

Anyway, I noticed that we've had a proliferation of buildObjectIdentity methods in the system that are all identical. So this just refactors them and rips out the common method from the individual widgets and puts it up into the superclass in kbwidget. I know that we have other redundant methods, but this is the one that jumped out at me.

This has not been thoroughly tested - I made sure that a few narratives I had spun up, but I didn't actually have anything to test the actual affected widgets. See first comment about causing merge pain for Bill.

That said, it shouldn't cause any problems, since it's just refactoring a redundant method into a single definition in a common superclass. No functionality should change.

This is strictly a technical debt pull request, and can be integrated at leisure. No functionality changes (AFAIK), no new features are added. So I'll defer as to when is the most opportune time to include it, if at all.

@briehl
Copy link
Member

briehl commented Jan 27, 2017

I think this is a great idea. A lot of widgets out there are filled with duplicate code. There is a util directory full of things, too, (StringUtil has a uuid function, for instance) that should just be included as dependencies.

Putting this in the root kbwidget is fine as well, since all of our current viewers make use of that.

But I'm gonna hold off on merging for a while, since it touches a number of viewers that should all be pretty thoroughly tested.

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