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

[5.x] Ability to hide bard/replicator set types #10349

Merged
merged 9 commits into from
Aug 14, 2024

Conversation

jacksleight
Copy link
Contributor

@jacksleight jacksleight commented Jun 21, 2024

This PR adds a Hidden option to set configs, which will hide them in the set picker. This is useful for removing/cleaning up old set types that should no longer be used for new content without breaking any existing content.

The handle is called hide to match the blueprint hide option.

Closes statamic/ideas#867

Todo

One thing I cant figure out is why hide: null gets saved to the YAML when the toggle is off, but other fields like instructions don't appear when they're blank. I thought setting the value to null instead of false would ensure it gets filtered out, but that doesn't seem to be the case. If you can point me in the right direction I'll fix that (and the test changes could probably be reverted as well then).

@edalzell
Copy link
Contributor

love this one!

@jasonvarga
Copy link
Member

One thing I cant figure out is why hide: null gets saved to the YAML when the toggle is off, but other fields like instructions don't appear when they're blank.

The process method of the sets fieldtype isn't what strips them out. It's over here: 6a9ff40 (#10349)

@jasonvarga jasonvarga merged commit dfa5e1d into statamic:5.x Aug 14, 2024
16 checks passed
@jacksleight jacksleight deleted the feature/hidden-sets branch August 14, 2024 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Toggle visibility of Replicator/Bard Sets
3 participants