opacity toggle feature

Bug #1506256 reported by mray
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Wishlist
Unassigned

Bug Description

For easy A/B testing I would love to be able to have an opacity toggle similar to the attached screenshot.
It is often useful to very quickly toggle on/off an object in a layout, which is currently uncomfortable or comes with major CPU usage and lag (dragging the slider down and up again).

Any opacity setting would be saved and set to zero as long as the eye icon is "closed".

Tags: styles ui
Revision history for this message
mray (mrayyyy) wrote :
Revision history for this message
Mc (mc...) wrote :

It would be more like a "visibility" toggle than an opacity one (same as right click->object properties->hide)... The problem would be that if you hide an object and you select something else, you'd have no easy mean to find it back.

Changed in inkscape:
importance: Undecided → Wishlist
Revision history for this message
su_v (suv-lp) wrote :

A few quick questions to the proposed workaround adding a toggle button to set object "opacity:0;" to temporarily hide objects (instead of toggling visibility with "display:none") to adjust Inkscape to your personal workflow:
* What happens if you deselect the object (maybe accidentally) - you can't reselect the now invisible object easily to "toggle" on opacity (>0) again.
* What happens if the object (or multiple selected objects) currently have different levels of object opacity, and the user toggles the button on (all forced to opacity '0') and off again: where exactly does Inkscape store the 'toggled-off' opacity for the individual objects to restore it? Would this be a lossy operation (warning the user adequately each time), dropping any prior values for opacity for selected objects or do you propose that Inkscape adds a custom SVG attribute in Inkscape's namespace to every object to store the 'toggled-off' opacity value, in order to be able to restore it back at any time later (maybe in the next session)?

The new 'Objects' dialog in current trunk (for 0.92) does have a toggle button for visibility for each object, not just for layers - could this be a solution for your workflow (see attached screenshot)? It even works for multiple selected objects …

Proposing to close the proposal as is - feature to toggle visibility per object
1) exists in 'Object > Object properties' in current stable Inkscape ([x] Hide)
2) will be accessible with better UX in the new Objects dialog in future Inkscape 0.92 (with the benefit to allow users to reselect hidden objects easily again).

tags: added: styles ui
Revision history for this message
mray (mrayyyy) wrote :

Thanks for pointing out "Objects" window is only available in 0.92 - I used it before and searched endlessly in 0.91!

@ "What happens if you deselect the object"?
The same as with any other 0 opacity de-selected object.
Resulting problems in re-selecting are independent (https://bugs.launchpad.net/inkscape/+bug/196453).

@ How state gets saved?
I would be fine with any of the solutions.

The "Objects" offers what I need, but it isn't within reach (As "Fill and Stroke" is) and is easily over populated.
This defeats the point of having a *quick* A/B toggle.

Maybe an updated proposal could be to "embed" the respective toggle from the "Objects" window into the "Fill and Stroke"?

Revision history for this message
su_v (suv-lp) wrote :

On 2015-10-15 15:51 (+0200), mray wrote:
> @ How state gets saved?
> I would be fine with any of the solutions.

JFTR - I would not be fine with any of them:
* Data loss is a no-go.
* A modal warning dialog (with option to cancel) popping up each time the user clicks the toggle button would defeat its purpose as _quick_ toggle feature.
* Littering SVG code all over with a new custom Inkscape attribute to store last used value of 'opacity' if 'opacity' was toggled off for a selected object is not really a solution IMvHO (it seems more of a workaround to mimic a visibility toggle (display on/off) per object via the object's 'opacity' style property (semantically wrong AFAIU)).

> The "Objects" offers what I need, but it isn't within reach (As "Fill
> and Stroke" is)

Please explain the unreachability of the 'Objects' dialog.

> This defeats the point of having a *quick* A/B toggle.

If you select an object on-canvas, the list in the 'Objects' dialog scrolls to that object -> the visibility toggle button is immediately reachable with the mouse (not further away as a toggle button would be in Fill&Stroke, which would also only be active with a current selection). Additionally, the 'Objects' dialog allows to change the visibility of objects without requiring them to be selected.

> Maybe an updated proposal could be to "embed" the respective toggle from
> the "Objects" window into the "Fill and Stroke"?

AFAIU the 'Hide' toggle button (controlling the style property 'display') is _not_ in the 'Fill and Stroke' dialog for a good reason (it would easily break most basic workflows especially for new users):
* Hidden objects cannot be selected by dragging a selection frame around them; they don't show in outline view mode either.
* Hidden objects cannot be selected with keyboard shortcuts (Ctrl+A, Tab, Shift+Tab) with default preferences settings for 'Behavior > Selecting' (can be changed).
* Hidden objects can only be selected via 'Edit > XML Editor' in current stable, and in 'Objects' dialog in a future release.

The visibility toggle button per object is ok (AFAIU) in the context of the 'Objects' dialog because that dialog offers direct access to objects which are hidden from display on canvas and thus allows to toggle visibility back on for individual objects. Note that details of the current state of the 'Objects' dialog may still change (see also related threads on the devel mailing list).

Maybe such a feature request would better be discussed first outside the bug tracker (e.g. on one of the mailing lists) to get more input from other users and developers.

Revision history for this message
su_v (suv-lp) wrote :

Maybe related (possibly off-topic though):
Apart from 'display' as property, there is also the property 'visibility' (currently not supported in Inkscape, see bug #166181, bug #166042):
* http://www.w3.org/TR/SVG11/painting.html#DisplayProperty
* http://www.w3.org/TR/SVG11/painting.html#VisibilityProperty

<quote src="http://www.w3.org/TR/SVG11/painting.html#VisibilityControl">
* When applied to a container element, setting ‘display’ to none causes the container and all of its children to be invisible; thus, it acts on groups of elements as a group. ‘visibility’, however, only applies to individual graphics elements. Setting ‘visibility’ to hidden on a ‘g’ will make its children invisible as long as the children do not specify their own ‘visibility’ properties as visible. Note that ‘visibility’ is not an inheritable property.
* When the ‘display’ property is set to none, then the given element does not become part of the rendering tree. With ‘visibility’ set to hidden, however, processing occurs as if the element were part of the rendering tree and still taking up space, but not actually rendered onto the canvas.
</quote>

Revision history for this message
su_v (suv-lp) wrote :

On 2015-10-15 02:12 (+0200), mray wrote:
> It is often useful to very quickly toggle on/off an object in a
> layout

Earlier reports related quickly toggling visibility of object(s):
* Bug #519385 “Feature Request: Quick way to hide/lock objects”
https://bugs.launchpad.net/inkscape/+bug/519385
* Bug #282360 “Wishlist item: Hide multiple objects at the same ti...”
https://bugs.launchpad.net/inkscape/+bug/282360

Revision history for this message
mray (mrayyyy) wrote : Re: [Bug 1506256] Re: opacity toggle feature

On 15.10.2015 17:10, ~suv wrote:
> On 2015-10-15 15:51 (+0200), mray wrote:
>> @ How state gets saved?
>> I would be fine with any of the solutions.
>
> JFTR - I would not be fine with any of them:
> * Data loss is a no-go.
> * A modal warning dialog (with option to cancel) popping up each time the user clicks the toggle button would defeat its purpose as _quick_ toggle feature.
> * Littering SVG code all over with a new custom Inkscape attribute to store last used value of 'opacity' if 'opacity' was toggled off for a selected object is not really a solution IMvHO (it seems more of a workaround to mimic a visibility toggle (display on/off) per object via the object's 'opacity' style property (semantically wrong AFAIU)).
>

Your concerns all sound reasonable.
Please don't expect skills and experience - I'm not a developer.
My concern is just having an A/B test at hand.

>> The "Objects" offers what I need, but it isn't within reach (As "Fill
>> and Stroke" is)
>
> Please explain the unreachability of the 'Objects' dialog.
>
It is poor usability. Screen real estate is already a hassle. The
'Objects' dialog isn't something I ever use and something I would have
to *explicitly* pop up just to toggle an object on/off.

>> This defeats the point of having a *quick* A/B toggle.

Revision history for this message
mray (mrayyyy) wrote :

Thanks for the related links. Unfortunately they seem to aim at slightly different things.

There seems to be much terminology involved in things like Opacity, Translucency, Visibility, Display, Hiding, ...
I'm not really sure what fits here. My naive goal is to quickly get rid of some objects for visual reasons like:

* toggle on/off a semi transparent shadow to see if it raises readability or adds clutter
* remove random design elements to see if the overall layout is "missing" them
* see how mockups look with/without icons (that have cloned versions all over the place)

Currently I use workarounds like:
* manually drag down opacity (slow on blurred objects)
* actually grab and move them away and undo the move
* create a new object with same color as background and move it via pgup and pgdown to cover up the object
* delete the object and undo the delete

Revision history for this message
mray (mrayyyy) wrote :

Maybe there is an easy solution to this:

What if the toggle would be tied to a mouse-down event of some kind - so
that the object only disappears as long as the button remains pressed?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.