Xway b1 - bug: Background origin and clip options


Tim Plumb
 

Background origin and clip options for background images can't be set to undefined and simply snap back to their last selected option.


Jeremy Hughes
 

Hi Tim,

Background origin and clip options for background images can't be set to undefined and simply snap back to their last selected option.
This isn't a bug. Xway (like Freeway) displays the current style value, whether it is defined or not.

For example (different example), if you create a new page and look at the Size field/popup in the Text section, it will say “medium”. If you choose “Undefined” it will still say medium.

This is because “medium” is the default CSS size for text, if you haven’t defined a different size.

If you change the Text size to 36px, you have defined a different (non-default) value. Now, if you choose “Undefined” it will revert to “medium” (the default value).

The situation with background origins and clips is exactly the same. If you change them to a non-default value, Undefined will reset them to the default value.

What “Undefined” does is to remove a value that you have specifically defined. When that value is removed, the style property is inherited from a parent item, or from the CSS default value.

Freeway works in a similar way, except that it generally doesn’t allow you to undefine values. For example, if you type text in a box (in Freeway) you will probably see that the Inspector palette displays the text colour as Black, although you haven’t chosen this colour (black is the default). If you publish the text, it’s not specified as black. However, if you change the colour to red and then change it back to black (in Freeway) and publish your page you will see that the colour is now defined as black. Freeway doesn’t give you a way to undefine it.

There is some discussion of “Undefined” on page 53 of the User Guide.

Jeremy


Tim Plumb
 

Thanks for the detailed explanation Jeremy. I’d yet to get up to page 53 in the User Guide.

I now see the thought process behind these controls. What I don’t quite understand is how a user is to know if the application will produce a style for their selection or not.
Try this;

1. Select some text in xWay
2. In the Span Inspector set the font Size to Small from Medium (the default Undefined value)
3. Preview
4. >>> The code should be font-size:small
5. In the Span Inspector set the font Size to Medium from Small
6. Preview
7. >>> The code should be font-size:medium

The font size control in step 1 looks exactly the same as the control in step 5 yet the application is now outputting a redundant style for us. I doubt many users would know or even care but redundant styles like this do tend to give a bad impression of the overall state of the page output.

Could the Undefined option place the default value in parenthesis;
Undefined (medium)
and keep the option selected (ticked) to show that it is unset?


Jeremy Hughes
 

Hi Tim,

I now see the thought process behind these controls. What I don’t quite understand is how a user is to know if the application will produce a style for their selection or not.
Almost all the values that Xway displays initially are undefined values. So if you haven’t changed a value, it’s probably undefined. If you have changed it, it’s defined until you undefine it. If you can’t remember whether you previously defined it, and you want it to be undefined, you can just select Undefined. If it was already undefined, selecting Undefined won’t actually do anything (it won’t show up as an Undo option in the Edit menu).

Something that is similar to this is that you can undefine values that are represented in text fields by deleting the contents of the text field. Try deleting 0em from the Letter Spacing field and it will say 0em after you’ve deleted it (unless there is an inherited value that is different). But if you change 0em to 1em and delete 1em, it will revert to 0em.

Could the Undefined option place the default value in parenthesis;
Undefined (medium)
and keep the option selected (ticked) to show that it is unset?
Maybe.

We chose to be more Freeway-like - although, in contrast to Freeway, we’ve given users the option of undefining things. There are times when that is important, e.g. when we want a style to be inherited from a parent item.

Mostly users don’t need to care about this stuff. Xway (like Freeway) tries to make complicated things easy.

Jeremy


Jeremy Hughes
 


I’d yet to get up to page 53 in the User Guide
We don't expect people to read through the entire User Guide - although there's a lot of useful information there, and we don't want to discourage people from reading it.

But it's a useful reference guide. It doesn't have an index, but it's a PDF - so you can easily search for things by typing into the Search bar of Preview.app.

Jeremy