Fix visibility of the Install button in packages grid #16675
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does it do?
Adds a new prop to provide a boolean indicator of a package's installed state. The prop utilizes the recently-introduced date formatter's
isEmpty
method, which more comprehensively determines whether theinstalled
field contains a meaningful value.Note that this new prop still relies on a derived value. It would be much better IMO at some future point to persist this state in a new database field rather than basing it off of a date value.
Why is it needed?
Install button is currently missing in the grid.
How to test
Download, install, and uninstall a few packages to verify the install button appears as expected.
Related issue(s)/PR(s)
Resolves #16672