flipper icon indicating copy to clipboard operation
flipper copied to clipboard

Human readable actor names

Open tommoor opened this issue 6 years ago • 6 comments

Right now in flipper our actor names look something like:

image

It would be nice if there was a way to specify a human readable string, eg by using the to_s method on the model. Perhaps there is a way to do this and I'm missing it? If so apologies.

tommoor avatar Dec 10 '18 21:12 tommoor

I totally love this idea. I was thinking that likely the easiest way would be some sort of hydrator for actors. Given a dehydrated actor id (or ids) it invokes a block you provide to return a fully hydrated object (AR model, or whatever). Something in Flipper::UI config like actor_hydrator could maybe do this. I'd probably make it work with batches of ids by default to avoid n+1 lookups too.

jnunemaker avatar Dec 12 '18 16:12 jnunemaker

Another alternative would be to store this along with the actor id but becomes a cache invalidation issue pretty quick.

jnunemaker avatar Dec 12 '18 16:12 jnunemaker

I Would like to follow up on this. It would be very helpful to have some simple information next to the actor, because in a long list of User:1234567 it get's out of hand which customer is allowed to see the feature very quickly.

So I guess either we could store this information in the Gate Table, or (preferable) have another flipper method in the model like flipper_name to be able to delegate that information to a custom column i.e. username, email...

DonSchado avatar May 13 '20 05:05 DonSchado

could it be possible to maybe use an alternative unique attribute such as user.email? e.g.

def flipper_id
  email
end

scottbarrow avatar Jul 03 '20 21:07 scottbarrow

You definitely can. The problem is that people change their email addresses so you’d need to be sure to update flipper if so.

jnunemaker avatar Jul 04 '20 00:07 jnunemaker

Worth mentioning I laid out a plan for this if someone has the time to make a PR.

https://github.com/jnunemaker/flipper/issues/657#issuecomment-1215365903

jnunemaker avatar Aug 15 '22 16:08 jnunemaker

Hey @jnunemaker, I have PR #737 ready for this!

jevin avatar Jun 15 '23 05:06 jevin

I’ll check it out soon! On vacation so I’ll be slower than usual. Thanks!

jnunemaker avatar Jun 22 '23 12:06 jnunemaker

I’ll check it out soon! On vacation so I’ll be slower than usual. Thanks!

Hey John, hope you had a nice vacation! Let me know if you're able to get to this sometime soon.

jevin avatar Jul 10 '23 04:07 jevin

I realized I should have mentioned your handle. There goes @jnunemaker

jevin avatar Jul 26 '23 16:07 jevin

closed by https://github.com/flippercloud/flipper/pull/737

jnunemaker avatar Nov 04 '23 17:11 jnunemaker