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

MdIconRegistry._setSvgAttributes takes unnecessary config arg #1539

Closed
code-tree opened this issue Oct 20, 2016 · 3 comments · Fixed by #1987
Closed

MdIconRegistry._setSvgAttributes takes unnecessary config arg #1539

code-tree opened this issue Oct 20, 2016 · 3 comments · Fixed by #1987
Labels
refactoring This issue is related to a refactoring

Comments

@code-tree
Copy link
Contributor

Bug, feature request, or proposal:

Bug

What is the expected behavior?

MdIconRegistry._setSvgAttributes makes use of all the args passed to it.

What is the current behavior?

MdIconRegistry._setSvgAttributes takes a config arg but doesn't use it.

What are the steps to reproduce?

Simply read the code

What is the use-case or motivation for changing an existing behavior?

Cleanup

Which versions of Angular, Material, OS, browsers are affected?

@angular/material 2.0.0-alpha.9-3

Is there anything else we should know?

No

@jelbourn
Copy link
Member

I believe the config was added as an argument because there will be options later, but I don't remember what those options are off the top of my head.

@dozingcat do you remember?

@jelbourn jelbourn added the refactoring This issue is related to a refactoring label Oct 20, 2016
@dozingcat
Copy link
Contributor

dozingcat commented Oct 21, 2016

_setSvgAttributes is private and doesn't look like it should be doing anything other than modifying the SVG element itself, so this seems like a safe refactor. If the config argument is removed there, it can also be removed from _createSvgElementForSingleIcon and _extractSvgIconFromSet.

crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 25, 2016
As per the discussion angular#1539, there are a few places in the icon registry where the config is being passed without actually being used. This change removes those instances and does some minor cleanup.

Fixes angular#1539.
tinayuangao pushed a commit that referenced this issue Jan 12, 2017
As per the discussion #1539, there are a few places in the icon registry where the config is being passed without actually being used. This change removes those instances and does some minor cleanup.

Fixes #1539.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
refactoring This issue is related to a refactoring
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants