Bug 338323 - [BIDI3.7]:dir="rtl" is not recognized by Web Page Editor
Summary: [BIDI3.7]:dir="rtl" is not recognized by Web Page Editor
Status: NEW
Alias: None
Product: Java Server Faces
Classification: WebTools
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: Future   Edit
Assignee: JSF Project UI CLA
QA Contact: Ian Trimble CLA
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2011-02-27 04:41 EST by Mohamed El-Kholy CLA
Modified: 2013-02-07 14:07 EST (History)
4 users (show)

See Also:


Attachments
The source code and the incorrectly displayed web page in the web page editor (61.26 KB, image/jpeg)
2011-02-27 04:41 EST, Mohamed El-Kholy CLA
no flags Details
screen shot showing the correct display of html page in google chrome (8.44 KB, image/jpeg)
2011-02-27 04:44 EST, Mohamed El-Kholy CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mohamed El-Kholy CLA 2011-02-27 04:41:24 EST
Created attachment 189889 [details]
The source code and the incorrectly displayed web page in the web page editor

Steps to reproduce

Download Eclipse eclipse-reporting-helios-SR1-win32.zip

unzip Eclipse and create a new Dynamic Web Project 

Create a new JSP file 

Open the file with both Source code editor and Web Page editor 

Create a table with dir="rtl" attribute

create a row then few cells in the row 

in the first cell write some text ("hello")

Expected result 
In the page designer , the text hello should be in the first cell from the right

Actual result 
In the page designer, the text hello appears in the first cell from the left
Comment 1 Mohamed El-Kholy CLA 2011-02-27 04:44:56 EST
Created attachment 189890 [details]
screen shot showing the correct display of html page in google chrome
Comment 2 Mohamed El-Kholy CLA 2011-03-01 10:19:45 EST
I downloaded the JSF plugins from CVS and noticed that the following Java variables in class org.eclipse.jst.pagedesigner.IHTMLConstants are never used 

public static final String TAG_DIR = "dir";
public static final String ATTR_DIR = "dir"; 

Is this the reason why dir="rtl" is never affecting the way the page is displayed ?
Comment 3 Ian Trimble CLA 2011-03-02 12:22:46 EST
The Web Page Editor would need enhancement to support anything other than left-to-right layout.
Comment 4 Mohamed El-Kholy CLA 2011-03-06 08:24:31 EST
(In reply to comment #3)
> The Web Page Editor would need enhancement to support anything other than
> left-to-right layout.

Can I start working on this enhancement ? I may need a little bit of orientation or guidance but I can proceed on my own after that
Comment 5 Raghunathan Srinivasan CLA 2011-03-06 11:34:26 EST
(In reply to comment #4)
> (In reply to comment #3)
> > The Web Page Editor would need enhancement to support anything other than
> > left-to-right layout.
> 
> Can I start working on this enhancement ? I may need a little bit of
> orientation or guidance but I can proceed on my own after that
Thanks for your interest in the Web Page Editor.We would be delighted to accept a contribution from you.Please note the original contributors of this code are no longer involved with the code and hence we will do our best to guide/orient you. It would be helpful if you can start with specific questions that would help you get started.
Comment 6 Mohamed El-Kholy CLA 2011-03-07 03:57:46 EST
As a start, I want to list the requirements I see for this enhancement 

1-When adding dir="rtl" to html code it is reflected in the web viewer 
2-when removing dir="rtl" or changing it to "ltr" it is reflected in the web viewer
3-when doing undo/redo, the web page in the viewer should reflect the html code correctly 
4-copy, cut and paste should preserve the dir attribute (I think this is already supported) 

Do you have any comments ?
Comment 7 Mohamed El-Kholy CLA 2011-03-08 07:12:41 EST
I assume there will be two parts to fix this defect, one to recognize the attribute written in html code, and another part to convert this to the drawing in the web page editor , will I need to override the CSSPropertyMeta class to do the first part ?
Comment 8 Ian Trimble CLA 2011-03-08 13:07:12 EST
As far as requirements go, I don't determine them in isolation, but what you have proposed seems reasonable. Overall, the main goal would be for the Web Page Editor to respect right-to-left layout, without breaking any existing functionality.

I'm not sure about overriding CSSPropertyMeta, I haven't spent much time in that area of code. You may need to, if the "dir" attribute and its values are not being supported there and this is the correct location for them to be, I suppose.

The original contributors of the Web Page Editor no longer support it, and so we don't have access to folks who will be able to quickly answer all questions about the implementation. We will try to support you where we can, but you will need to do some digging, I am afraid.
Comment 9 Mohamed El-Kholy CLA 2011-03-29 05:05:58 EDT
I am sorry I won't be able to work on this bug as I am currently very busy with other commitments
Comment 10 Raghunathan Srinivasan CLA 2013-02-07 14:07:24 EST
Changing severity to enhancement. We will wait for contribution to address this.