| Summary: | Spaces are missing when using the span RUIWidget | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | broy2 | ||||
| Component: | EDT | Assignee: | Yun Feng Ma <mayunf> | ||||
| Status: | CLOSED INVALID | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | hjiyong, margolis, mayunf, svihovec | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
What browser are you using in the VE for EDT? If you launch the RBD preview in an external browser, and then open the page in the same browser that is being used in EDT, are the results the same? I am guessing that RBD is using XULRunner (FireFox) and EDT is using either IE or WebKit. In RBD, I see the spaces in both Firefox and IE. In EDT, I don't see the spaces in either browser. Xiao Bin, assuming there are no other P1 widget defects, I would like for us to determine why the spaces are missing. I ran a quick test in RBD 8, and it looks like the CSS styling isn't being applied correctly, but in EDT it is being applied. It seems that the lack of styling in RBD lets the spaces remain. If this is the case, then EDT is working 'more correct' than RBD because it is applying the styling, and we probably need to make a CSS change for padding SPANs in EDT, which we would do after .7. I have tested in RBD8012, and talked with jiyong, seems like this is a defect in RBD8012. And it's correctly in EDT(It works according to the css we defined). So maybe we need to fix RBD defect not EDT. If we want "space" we could change the CSS. (In reply to comment #4) > Maybe we need to fix RBD defect not EDT. If we want "space" we > could change the CSS. The RBD outcome seemed more straightforward for application use. I also suggest making the behavior closer to the RBD behavior, whether now or after .7. On looking at an HTML spec, I came to believe that RBD worked as it did because multiple spaces concatenated together left one space. In any case, we need a to state a rule for how the EGL Span widget treats spaces. Setting to future. I think we should add more CSS styling directives to EDT so that it behaves like RBD, but I don't think we should do this now. Hi Brian, For this issue, just like what said in comment 3: EDT is working as expected, but RBD failed to apply the css. I just looked into why RBD failed to load claro.css, the reason is that the widget Div and Span don't has cssFile property defined in RBD and if a handler only contains Div or Span, the handler will not load claro.css file. Most widgets in RBD contains cssFile property defined, except below: Div, Span, HTML, HyperLink, Image, List, ListMulti, RadioGroup, Shadow, TextLabel, Tree. If the handler contains a widget which has cssFile to "css/com.ibm.egl.rui_2.0.0.css" in RBD, the behavior of Span is same between RBD and EDT. I believe a real RUI application will contain at least a widget which has cssFile to "css/com.ibm.egl.rui_2.0.0.css" in RBD, then maybe a customer is using the behavior of Span we saw in EDT, and we should not break it. Let me know you thoughts. Thanks a lot. I am ok with leaving things as they are for both RBD and EDT. In EDT, and RBD when the proper CSS file is applied, is there a way to get the spans to appear with spaces between them? Hi Brian,
Yes, user's css setting can overwrite the default setting for Span widget. Here is a sample for RBD:
myDiv Div{children = [mySpan01, mySpan02, mySpan03]};
mySpan01 Span{text = "mix blue ", color = "blue", class = "abc"};
mySpan02 Span{text = " and red ", color = "red", class = "abc"};
mySpan03 Span{text = " to see purple", color = "purple", class = "abc"};
with below css:
.abc {
display: inline-block;
}
Mark this bug as invalid, as RBD has issue and EDT works fine. Thanks.
closing defect |
Created attachment 206986 [details] Screen shot Preview of the following in the RUI editor of EDT and RBD gives different results. handler MyHandler3 type RUIHandler{initialUI =[myDiv]} myDiv Div{children = [mySpan01, mySpan02, mySpan03]}; mySpan01 Span{text = "mix blue ", color = "blue"}; mySpan02 Span{text = " and red ", color = "red"}; mySpan03 Span{text = " to see purple", color = "purple"}; end RBD: mix blue and red to see purple EDT: mix blueand redto see purple Screen shot of both attached in doc.