- Issue created by @juagarc4
- πΊπΈUnited States japerry KVUO
This is by design. The machine name and label are auto-generated because requiring users to create them is an additional unneeded step. Is there a reason why they needed to be edited specifically?
Note -- if there is a need to change them, it can be done manually with the config entity. Since they really shouldn't be changed by end users, I'd suggest going this route instead of changing the UI.
- Status changed to Postponed: needs info
6 months ago 11:19pm 12 February 2024 - π©πͺGermany juagarc4
Hi japerry,
Thanks for the answer.
Since you can use more containers and more IDs per container, I think it make sense, so that the label and machine name can be used as a kind of categories.
One use case I have for that right now is the use of this module in combination with Domain. Since I'm using different containers per Domain, it would be useful to put the domain name in the label. In this way is easier to identify what need to be changed, deleted, etc. without having to edit all of them.
Moreover the use of a customized machine name in the same way of the label would make easier to get information of the container programatically.Note: Changing the config entity can be easy done by programmers, but normally the users authorized to change this configuration, don't have the knowledge for that. In this case a change in the UI would be quite appreciated.
- πͺπΈSpain guiu.rocafort.ferrer Barcelona
IMO, it would be useful to be able to change the Label, but the machine_name should not be possible to be changed. This allows to add more meaningful names to the containers, rather than having to remember the container ids. This behaviour is widely used in Drupal Core, for instance, if you create a content type, then you can modify the label, but the machine_name stays the same.
There is already a label field in the entity type google_tag_container. So this would only require to add the textfield element in the edit form.
I will create a issue fork and give it a go, should be fairy easy to do. - πͺπΈSpain guiu.rocafort.ferrer Barcelona
I added the label field to the edit form, but i am taking in account the following cases, to avoid disrupting existing workflows and add extra steps when creating a tag container:
- If the label is left empty, the first tag ID will be used as the label, as before. I added a little description to clarify the behaviour
- If the label is specified, then this one will be used instead of the first tag ID.
The machine_name is still generated in the same way, and it cannot be changed.
I think this would be a great usability improvement for the module, because it allows to add friendly readable names to containers. If you have several containers, it can become complicated to know which is which.
- π©πͺGermany juagarc4
I'm agree with this approach @guiu. If fact it's not necessary to be able to change the machine name.
I'll try to test it in the next days.
Thanks! - Status changed to Needs review
5 months ago 8:36am 12 March 2024 - πͺπΈSpain guiu.rocafort.ferrer Barcelona
Changing issue status to needs review.