Design-time offset rendering

This section can be used to submit suggestions for Extension Builder.
Note that this section is not monitored for support.
Forum rules
This forum section can be used to submit suggestions for Extension Builder.
Note that this section is not monitored for support.
Post Reply
alexh225
 
 
Posts: 11
Joined: Mon Feb 01, 2016 1:44 pm

Design-time offset rendering

Post by alexh225 » Tue Feb 02, 2016 8:18 am

Hello,
we figured out an visual issue when any basic custom extension (created in Extension Builder 11) is rendered at design time.
It shows on the right site a kind of padding of ~10px.
Image

It doesn't matter how simple the design time preview HTML is, the result is the same:
For example if the "Render HTML" content added in the Extension Builder looks like this:

Code: Select all

<div style="background-color: red; height: 100%"></div>
or another example like this

Code: Select all

<button type="button" style="width: 100%; height: 100%">
TEST
</button>
The result is stillt the same. All extensions have an padding inside at design-time.

At runtime in the browser the content is rendere correctly. So it seems to be an issue happending inside the render process of the preview.
Any idea or suggestion? Or is it a bug?

Best regards
Alex
Last edited by alexh225 on Tue Feb 02, 2016 9:00 am, edited 1 time in total.

User avatar
Pablo
 
Posts: 19287
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Design-time offset rendering

Post by Pablo » Tue Feb 02, 2016 8:49 am

'Live rendering' uses IE for drawing. Each extension that uses rendering runs in its own session. So this may be the default padding of the browser.

alexh225
 
 
Posts: 11
Joined: Mon Feb 01, 2016 1:44 pm

Re: Design-time offset rendering

Post by alexh225 » Tue Feb 02, 2016 9:13 am

Hello Pablo,
thanks for reply. Unfortunately your answer doen't really helps me.

What does this means for us?
I don't think it is the default padding value. Padding only on the right site?
And at even if it should be, then of what element should it be the padding?
The rendered container inside Web Builder at design-time?
The cointent of the extension couldn't be, because the behaviour is the same - pls see reported trivial examples in my post.

Related to your answer:
'Live rendering' uses IE for drawing..."
Which version does the Web Builder use for the live rendering? Can we switch to different browsers?

Regards
Alex

User avatar
Pablo
 
Posts: 19287
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Design-time offset rendering

Post by Pablo » Tue Feb 02, 2016 9:58 am

The extension uses MSHTML (which is also use by IE) to render HTML of extensions. There is no way to use another browser, this is standard Windows functionality
I'm pretty sure this is the default padding/margin of the browser.
You can add a custom style to your code to reset the padding and/or margin.

I'm sorry but I cannot give assistance with building extensions. I currently do not have time for that.
However hundreds of extensions have already been created, so you should be able to implement some useful functionality with the provided tool.

alexh225
 
 
Posts: 11
Joined: Mon Feb 01, 2016 1:44 pm

Re: Design-time offset rendering

Post by alexh225 » Tue Feb 02, 2016 10:26 am

Hi Pablo,
thank for your reply.
You was right in one point: It is a kind of margin comming from default values.
But not from the components of extension inside "Render HTML".
Since I still don't know from what element it comes (I know and see only the code of my extension) I added to the Render HTML reset style for everything.

Code: Select all

<style type="text/css">
* {
  margin: 0;
}
</style>
The fact that I don't understand why

@Extension developers: Do you know some more details how the extension is rendered?
Is it a typical pattern, to do this kind of things?

Regards
Alex

User avatar
Pablo
 
Posts: 19287
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Design-time offset rendering

Post by Pablo » Tue Feb 02, 2016 10:27 am

I think it's the default margin of the body.

alexh225
 
 
Posts: 11
Joined: Mon Feb 01, 2016 1:44 pm

Re: Design-time offset rendering

Post by alexh225 » Tue Feb 02, 2016 10:46 am

Thanks.

Last question about the MSHTML used in your editor. It seems that CSS3 styles are not applied also.
For example 'border-radius' property that is supported even in IE9 seems not be rendered correctly?

Regards
Alex

User avatar
BaconFries
 
 
Posts: 4420
Joined: Thu Aug 16, 2007 7:32 pm

Re: Design-time offset rendering

Post by BaconFries » Tue Feb 02, 2016 11:06 am

You should also include this in your style sheets inlcuding - moz for firefox and -webkit for safari and chrome or IE9 will simply use the default border-radius. One reason I can think of that it may not render in the extension builder is that no meta tags are declared so if you are testing in IE 9 then without the correct meta tag to declare then it wont display. But once used in the program it should be ok as you will be able to select or use the meta tag generated.

alexh225
 
 
Posts: 11
Joined: Mon Feb 01, 2016 1:44 pm

Re: Design-time offset rendering

Post by alexh225 » Tue Feb 02, 2016 11:15 am

I'm aware about broder vendor prefixes, thanks for the hint BaconFries. I also give a try and added the related meta-tag as a try before I posted here.
But since it will be inside the body it will not work...
Also the reason I used border-radius is that this property doesn't require prefix "-ms" since IE9 was introduced.
That means on the other hand I have to deal in Web Builder at runtime with very old engine and will probably run in big problems as soon I will developing a library for us.

By the way - it's not only a matter of the extension builder (I understood already the tool is not supported). But all the behaviours are consistent with the Web Builder.

User avatar
Pablo
 
Posts: 19287
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Design-time offset rendering

Post by Pablo » Tue Feb 02, 2016 12:12 pm

I'm sorry CSS3 is currently not support for live rendering.
Note that IE is ONLY used by extensions for live rendering, is it not used by built-in elements.
Extensions are add-ons and I did not want to implement a complete browser to support live rendering, This was the easiest way to provide preview functionality.
And although I can easily switch to a newer implementation of MSHTML it will requires a lot of testing. Because other extensions may rely on the current implementation and these extension may stop working if I make this major change.
But all the behaviours are consistent with the Web Builder.
This is not true. Most internal elements do support border radius. Each WWB object renders its own preview.

I'm sorry to hear that you do not like my work. But many other extension developers have found it useful.

alexh225
 
 
Posts: 11
Joined: Mon Feb 01, 2016 1:44 pm

Re: Design-time offset rendering

Post by alexh225 » Tue Feb 02, 2016 12:50 pm

Hello Pablo,
I'm a bit confused about your reaction.
Beliefe me, if I wouldn't "like" or find anything about the tool, I wouldn't even spent 5 minutes with the trial version.
So you don't need to be sorry :wink:

I have here both tool that are provided by you and after do a lot of basic examples with the Extension Builder and preview in the WYSIWYG Web Builder and see the same result.
Maybe I didn't explained it clearly. So then sorry from my site.

Thanks for your time.
Regards
Alex

User avatar
Pablo
 
Posts: 19287
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Design-time offset rendering

Post by Pablo » Tue Feb 02, 2016 12:59 pm

I have just tried to switch to MSHTML IE11 (just by enabling it in the code) , but this will have a major impact. Microsoft has changed a lot of internal functionality and interfaces. It will require a redesign Extension Builder to make this work.
So I'm sorry but I will not be able to provide this functionality in the near future.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest