grist-core
grist-core copied to clipboard
Cannot copy column name
Hi,
In the column settings, I can't select thus copy the column internal name, I guess because of the disabled attribute.

When the column is long and complex, copying it would be very handy. Could we have a copy button or is there a workaround to allow copying the content (using readonly instead ? or using another element than input ?).
Thanks!
cc @LouisDelbosc
Un example of formula where I'd have used it: return $Subvention_directe_Decision_et_nature_d_accompagnement_ or $Expertise_d_un_operateur_partenaire_de_l_ANCTDecision_et_nature_d_accompagnement_ or $Mise_a_disposition_d_un_prestataire_externe_Decision_et_nature_d_accompagnement_ or $Expertise_interne_ANCT_Decision_et_nature_d_accompagnement_ or $Expertise_d_un_autre_ministere_Decision_et_nature_d_accompagnement_ cf also #269
It seems it'd be better to have a span or div instead of a readonly attribute.
Edit: inside the app, we failed to make a div content selectable and we could not find any text outside of an input which could be selectable, so we decide to go with the readonly attribute hoping for the best.
The current work around is to click on the black link icon on the right to enable editing the column ID field. But it's a bit of an inconvenience and I often find myself wishing for a one-click copy as well.
Thoughts on adding a copy icon to the disabled field, something like the icon below. The actual icon @dsagal would have access to.

I am imagining it on the right side of the disabled field, in the field box, to make it clear that clicking on this field copies the ID. The entire field would be click-to-copy. A little confirmation text that reads "Copied!" would be helpful.
What do you think?
Initial need is fixed, should we close, or do we want to work on a copy button anyway ?
I'll close since the need was met, a copy button is a nice-to-have but not a priority on our side.