grist-core icon indicating copy to clipboard operation
grist-core copied to clipboard

Cannot copy column name

Open yohanboniface opened this issue 3 years ago • 2 comments

Hi,

In the column settings, I can't select thus copy the column internal name, I guess because of the disabled attribute.

image

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

yohanboniface avatar Sep 09 '22 09:09 yohanboniface

It seems it'd be better to have a span or div instead of a readonly attribute.

Source

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.

LouisDelbosc avatar Sep 15 '22 10:09 LouisDelbosc

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. image

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?

anaisconce avatar Sep 15 '22 16:09 anaisconce

Initial need is fixed, should we close, or do we want to work on a copy button anyway ?

yohanboniface avatar Oct 25 '22 10:10 yohanboniface

I'll close since the need was met, a copy button is a nice-to-have but not a priority on our side.

paulfitz avatar Oct 25 '22 13:10 paulfitz