Problem/Motivation

I've been struggling a bit with Flag lately. It's great, but has some limitations when it comes to adding fields to flags, flagging any type of entity, and also granular export of settings.
The it occured to me that (basically) the only thing missing for using Relation instead of Flag is the javascript toggle link used to flag/unflag.

Proposed resolution

A field rendering as a link, used to create a relation between the acting user and the field's entity.
If there already exists such a relation, then a click on the link deletes the relation (or possibly changes the status of it).
There could also be a field setting allowing the link to lead to the new relation, instead of being a toggle.

Remaining tasks

Compare this idea to existing Flag-ish modules.
Discuss idea with Flag people.
Possibly start to implement.

Comments

itangalo’s picture

It probably sounds weird to suggest this as a new feature in Relation, instead of a separate module. But I think this could be a great example of what you *could* do with Relation, and including that in Relation could be a good thing.

bartvdputte’s picture

I'ld like to see something like this as well.

Currently I do not find it "easy" to let me site editors "manage" relationships between entities...

rafamd’s picture

Implementing fieldable flags using relation was suggested over #871064: Making flaggings fieldable

Do you think it's a good idea to re-architect flag so as to build upon relation ?

itangalo’s picture

#3: Yes, I think it's a good idea to re-architect flag to build on Relation. That would take out a lot of the code that is Flag today, but that not necessarily a bad thing. I think it would need a new maintainer for Flag, though: #1543826: Applicants Wanted: Flag Maintainership

naught101’s picture

Component: User interface » API
Status: Active » Fixed

Now that unary fields are in (#1559354: allow unary relations: arity of 1), There isn't really any reason why this couldn't be done with Rules and relation right now. It might be nice to add some custom UI for it. I don't think that should be part of relation though, but a separate contrib module. Then again, #871064: Making flaggings fieldable says flag module flags are now fieldable. Marking as fixed either way.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Yuri’s picture

Issue summary: View changes

Very helpful also to create flag-like functionality with Rules: https://drupal.org/project/rules_link