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

Fix visibility of the Install button in packages grid #16675

Merged
merged 4 commits into from
Jan 21, 2025

Conversation

smg6511
Copy link
Collaborator

@smg6511 smg6511 commented Jan 7, 2025

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 the installed 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

Formatting, code style, optimization changes only
Create explicit 'isInstalled' prop separate from the 'installed' date field to more reliably and clearly indicate a packages installable state
Remove unneeded redefinition of uninstall record prop (it's already passed in using the same value from the calling fn)
Change order of uninstall signature to simplify (providing default val for params prop)
@smg6511 smg6511 added the pr/review-needed Pull request requires review and testing. label Jan 7, 2025
@BobRay
Copy link
Contributor

BobRay commented Jan 11, 2025

I tested installing a minimal package that has separate "Install" and "Update" sections in resolvers and validators. I can confirm that in 3.1.0, using "Reinstall" works as it should with respect to resolvers and validators. For new packages, the "Install" section executes, for new versions that update the package, the "Update" section executes.

So, using Reinstall will be a reliable workaround until this fix is released.

@modxcommunity
Copy link
Collaborator

This pull request has been mentioned on MODX Community. There might be relevant details there:

https://community.modx.com/t/extjs-problems-on-newly-installed-site/8247/2

@opengeek opengeek merged commit 51e7035 into modxcms:3.x Jan 21, 2025
7 checks passed
@opengeek opengeek added this to the v3.1.1 milestone Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/review-needed Pull request requires review and testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[3.1.0] No install button after downloading new package
4 participants