Skip to content

Use iconName in return value of getPicturePasswordIcons #14585

@bjester

Description

@bjester

This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Context

PR #14573 added ambiguous iconName to the objects returned by getPicturePasswordIcons to eliminate the need for consumers to switch on whether to use iconColorful or iconStandard in the response. Since getPicturePasswordIcons switches on that already, it's simplest to have it return a single property iconName.

Task

  • Eliminate iconStandard and iconColorful from getPicturePasswordIcons
  • Update any usages of iconStandard and iconColorful to use iconName instead
  • Update the tests for getPicturePasswordIcons
  • Update any other consumer tests for the change

Reference

Thanks for updating this function to use constants instead. I wonder if this function should be updated to return only the label and iconName?

Right now this function is only used in two places, the AllPasswordsPage.vue and now the UserEditPage.vue, and updating it now won't affect the changes in AllPasswordsPage.vue, only the tests.

Doesn't have to be done in this PR though, it can also be done when the All Passwords Page is updated to display the actual icons, just wondering about your thoughts?

Originally posted by @LianaHarris360 in #14573 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions