Patch is quite trivial, I'm not sure about a few things, though:

- Should it be in a collapsed fieldset or not. It currently isn't because the table is just a few lines high.
- There is a problem when you have multiple token_tree browsers on the same page. Expanding a specific entry will expand it in all token_tree's on the whole page. I need to ask Dave Reid if there is a way around that.

Other than that, it's working quite nicely and a lot better then the default.

Comments

berdir’s picture

Component: User Interface » User interface
Status: Active » Needs review
fago’s picture

>- Should it be in a collapsed fieldset or not. It currently isn't because the table is just a few lines high.
So let's go without the fieldset for now. :)

>- There is a problem when you have multiple token_tree browsers on the same page. Expanding a specific entry will expand it in all token_tree's on the whole page. I need to ask Dave Reid if there is a way around that.

Sounds good, thanks!

BenK’s picture

Subscribing

berdir’s picture

Issue and patch to fix the multiple token_tree's issue is here: #1062492: Multiple token trees on same page can both get expanded when clicking one

fago’s picture

Status: Needs review » Postponed

Looks like we have to wait for the upstream fix :/

dave reid’s picture

That issue isn't a show-stopper. I don't see any need to postpone this for #1062492: Multiple token trees on same page can both get expanded when clicking one.

fago’s picture

Having multiple token trees on a single page would be very common in Rules, so if this doesn't work properly it's a show-stopper :(

berdir’s picture

@Dave: Yeah, the problem is that you most likely *do* have multiple token browsers on a single patch and when multiple ones are opened, you're browser window jumps around the page like crazy.

dave reid’s picture

fago’s picture

Status: Needs review » Needs work

Great.

Patch does not apply an more though.

longwave’s picture

Status: Needs work » Needs review
StatusFileSize
new1.11 KB

Patch applies if you use -p0, it predates the git migration. Updated patch attached in git format.

fago’s picture

Status: Needs review » Needs work

I gave it a try, however it doesn't account for all rules variables.

E.g. if we have 2 variables "node" and "node-unchanged", still only "node" is going to appear in the token help. Even if we have a single node variable called "foo" it won't be called foo in the help.

I'd like to add token-tree integration like that, but I'm not sure how we can make it fit to the tokens the Rules token evaluation system makes possible. Maybe, we could show the token-tree widget for each variable and fix the first part of the tokens manually, so it matches the variable name?

mitchell’s picture

Issue tags: +UX

tagging

tr’s picture

Component: User interface » Rules Core
Issue summary: View changes
StatusFileSize
new1.52 KB

Reroll against current HEAD. Still needs work as per #12, but can be very useful as it is nonetheless.