Edgewall Software

Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#9406 closed enhancement (fixed)

wiki-toc float value should be RTL-aware — at Version 6

Reported by: Itamar Ostricher Owned by: Itamar Ostricher
Priority: normal Milestone: 1.0
Component: wiki system Version: 0.12.2
Severity: normal Keywords: rtl
Cc: Branch:
Release Notes:

wiki: Added a #!rtl wiki processor to simplify the insertion of RTL text blocks.

API Changes:
Internal Changes:

Description

The TracGuide and TocMacro use the wiki-toc class for floating div.

When a page is right-to-left, the floating div should be floating left.

Assuming right-to-left pages are created using some top-level container of the form:

{{{
#!div class=rtl
...
}}}

The direction-aware float may be achieved with the attached rtl-css.patch patch.

Change History (8)

by Itamar Ostricher, 14 years ago

Attachment: rtl-css.patch added

Patch that introduces some RTL support to CSS

comment:1 by Christian Boos, 14 years ago

Milestone: 0.13
Owner: set to Itamar Ostricher

Thanks for the patch!

comment:2 by Itamar Ostricher, 14 years ago

See also the DirClassMacro I published on t-h.org.

It adds the CSS suggested in this patch, and also introduces [[RTL]] and [[LTR]] macros that emit right-aligned div tags and closing tags, respectively.

This even interacts correctly with TracWysiwygPlugin, which had a problem with aligned-div-tags as suggested in the ticket description.

A possible issue I've noticed is that if I use [[RTL]] with no matching [[LTR]], and I edit in side-by-side mode, then just after clicking Show Preview the editing area and action buttons either disappear completely or appear below the preview instead of to the side.

Anyway, I suggest to integrate the macro in core, as another step toward RTL-support.

in reply to:  2 comment:3 by Christian Boos, 14 years ago

Replying to itamaro:

Anyway, I suggest to integrate the macro in core, as another step toward RTL-support.

No, we don't want to support any macro that introduces non well-formed XHTML, i.e. begin a div in one macro, close it in another. The proper way to do this would be a #!rtl processor, but then I wonder if it adds more than a #!div class=rtl? It's still a bit more convenient to write, so we could support it anyway.

comment:4 by Remy Blank, 13 years ago

I have applied rtl-css.patch in [10547]. I'll also quicly implement a #!rtl processor for convenience.

comment:5 by Remy Blank, 13 years ago

Resolution: fixed
Status: newclosed

[10548] adds the #!rtl wiki processor.

comment:6 by Remy Blank, 13 years ago

Release Notes: modified (diff)

by Itamar Ostricher, 13 years ago

Attachment: rtl-css-indent.patch added

RTL subtlety regarding indentation of wiki-toc floats

Note: See TracTickets for help on using tickets.