Skip to content

Drop injects' default values

Paul Gascou-Vaillancourt requested to merge 373843-no-default-injects into master

What does this MR do and why?

This removes default values from injected properties within the NotificationEmailListboxInput component. Those were converted from props to injects late in the initial implementation and the default values had been preserved. However, it seems like an injected prop only falls back to its default value if the property isn't provided at all. If the property is provided but is undefined, that's used as the prop's value, which caused an issue with the input's default value which needs to be an empty string and not undefined.

Screenshots or screen recordings

Before (inputs don't fall back to the empty value label) After
Screenshot_2023-01-03_at_7.43.07_AM Screenshot_2023-01-03_at_7.43.39_AM

How to set up and validate locally

  1. Navigate to your notification settings at http://gdk.test:3000/-/profile/notifications

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #373843 (closed)

Merge request reports