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
[FR] Add human-readable handles as comments to project config #7584
Comments
I agree it would be helpful, but it probably won't happen, as it's not possible to do with the Symfony Yaml component. Related discussion here: symfony/symfony#22516 |
That's a shame about the lack of support in symfony, doesn't look like it's
going to be added anytime soon either.
Perhaps the handles could be added to the yaml into the exported objects as
normal attributes, and simply only be used on write and not on read, rather
than having to combine and split the two into a single attribute on both
write and read (also sidesteps any backwards compatibility issues)
…On Wed, 17 Feb 2021, 21:32 Brandon Kelly, ***@***.***> wrote:
Oh I really like this idea as well.
What if instead of saving the handles as comments, we just prepend them to
the UIDs, the same way we’ve done with the YAML file names?
[image: The contents of my config/project/fields/ folder]
<https://user-images.githubusercontent.com/47792/108264179-1200d700-711c-11eb-9455-9518833e5ba9.png>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7584 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADF5CAM6OPWECRAXT6X4WTS7QRVHANCNFSM4XX72QGQ>
.
|
Yeah – that’s what I’m suggesting. The field handles in those file names are completely ignored on read. |
Yeah maybe I misunderstood, but I thought you meant changing the project config from this:
While I meant
Anyway, its probably a minor difference ;) |
Oh gotcha. Yes I’m suggesting the former. |
We just talked this over and have an idea for how we could possibly get the original comments idea to work, despite the YAML library not supporting it. |
Craft 3.6.8 is out now with this change. Thanks for the great suggestion, @FreekVR! |
@gbowne-quickbase Take a look at #7709. |
Description
Hi! We've been using the project config feature for a while now, and with the changes to split out config to separated files we're seeing a lot of improvements in merge conflict resolutions etc.
However, as we work with multiple developers on a single project, sometimes someone will check out an upstream branch, and forget to properly apply all the upstream project config changes, or just flat-out rebuild the config from a divergent local DB before applying the newer changes.
Anyway, sometimes this leads to some mishaps in fields disappearing from entry types where they were just added for example. We use code reviews via pull requests, but it's really hard to read the associations between different entities.
A good example would be a diff for this entry type config file for example:
I can't really see what's been added / changes here unless I manually go into the config/fields folder and check for the UUID.
A simple change which would be REALLY helpful would be to add a YAML comment wheever a UUID is referenced for another config file.
For example;
Would perhaps also be helpful for other areas:
Graphql scopes
Section site settings
I'm probably missing a few areas here but you get the idea :)
The text was updated successfully, but these errors were encountered: