addons-code-manager
addons-code-manager copied to clipboard
Allow CodeView to accept a single `file` prop instead of 3 individual props
This is a follow-up to https://github.com/mozilla/addons-code-manager/pull/1498.
CodeView
accepts some props which are properties of a VersionFile
. #1498 introduced yet another of those, the isMinified
prop.
It seems like it might be better to just accept a file
prop, and then destructure that inside the component in order to get the content
, isMinified
, and mimeType
props. I investigated this during the development of #1498 but found that it complicated testing because we need to create a VersionFile
in the test, and we don't currently have a way to do that. Introducing a way to do that would result in some refactoring of the versions
reducer, and it all started to look like more work than would be worthwhile, at least to land #1498.
This is a code quality issue to look into doing that work so that CodeView
can simply accept a file
prop.
┆Issue is synchronized with this Jira Task
This issue has been automatically marked as stale because it has not had recent activity. If you think this bug should stay open, please comment on the issue with further details. Thank you for your contributions.