Using the expand/collapse arrows on the help page is a bit confusing. Clicking on "File type" for example expands it, but the token list is also duplicated above it making it look like they belong to Files as well.

Clicking on the Random group makes the two word groups below it getting a wordwrap between the words.

Same thing happens on config pages where the token list is used as well, since its the same code creating the lists.

Comments

dave reid’s picture

Can you maybe screenshot the problem?

tsvenson’s picture

StatusFileSize
new17.09 KB

Sure, see enclosed. It contains both File type and Random open. On the Help page only two groups under random gets broken, but on for example the Pathauto Patters page, also those above. Guess that is due to less width.

dave reid’s picture

Assigned: Unassigned » dave reid

Oh strange. Not sure why I didn't notice this until now. Seems to be a problem since [file:type:*] tokens generate a CSS class of file-type-* and [file-type:*] tokens generate the same CSS class of file-type-*. This has to be fixed in the token tree UI.

dave reid’s picture

Status: Active » Needs review
StatusFileSize
new637 bytes

Could you please test the following patch?

tsvenson’s picture

Tested. It fixes the problem with the File type, but not the Random.

Reason the random breaks two word groups is due to that when it is expanded, the field names in contains are too short, which makes the Name column to narrow, causing two word group names to word wrap.

dave reid’s picture

Yeah I don't think that can actually be fixed. It's just a table cell width issue.

tsvenson’s picture

Status: Needs review » Reviewed & tested by the community

Would it be possible to use style="white-space: nowrap" for the td's in the Name column?

Changing status as the patch does what it says on the tin.

dave reid’s picture

Status: Reviewed & tested by the community » Active

Committed #5 to 7.x-1.x (does not apply to 6.x-1.x).
http://drupalcode.org/project/token.git/commit/05c6fc7

Back to discussing how to no-wrap the token column.

dave reid’s picture

Status: Active » Fixed

Also committed a CSS addition of .token-tree td.token-key { white-space: nowrap; } to 7.x-1.x and 6.x-1.x.
http://drupalcode.org/project/token.git/commit/765aa53
http://drupalcode.org/project/token.git/commit/6e19460

tsvenson’s picture

Status: Fixed » Active

Dave, the last patch actually puts the nowrap on the token column, not the Name column. Problem is that the td's in the Name column doesn't have any classes.

dave reid’s picture

I think that's fine actually - the names are text and can be wrapped - the tokens are not and should not be wrapped. The zebra-striping should help separate rows.

tsvenson’s picture

Oki, your da boss. Btw, is the nowrap actually needed on the token when they don't contain any spaces, or is there a risk hyphens will trigger word wrap?

dave reid’s picture

Yes I've found that hypens do allow wrapping to happen which is why I went for the td.token-key for the CSS over token name.

tsvenson’s picture

Status: Active » Fixed

Oki, putting this one back to fixed then.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Added part about it happens everywhere.