Fórum

Disable Edit Controls in LR7

thumbnail
Peter Hancox, modificado 7 Anos atrás.

Disable Edit Controls in LR7

Junior Member Postagens: 45 Data de Entrada: 06/07/05 Postagens Recentes
Where did the ability to disable edit controls go for logged in users in version 7?

Can't turn them off which is pretty annoying.
thumbnail
Olaf Kock, modificado 7 Anos atrás.

RE: Disable Edit Controls in LR7 (Resposta)

Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens Recentes
Peter Hancox:
Where did the ability to disable edit controls go for logged in users in version 7?


I didn't check the latest GA, but found that (through a glitch, I don't have an LPS ticket at hand) it's only visible in the mobile view: Shrink the width of the browser until you see the eye, use it, then grow your browser again.

I agree: Annoying. But an unfortunate regression. Which GA are you on? Have you tried if it's fixed in GA3?
thumbnail
Peter Hancox, modificado 7 Anos atrás.

RE: Disable Edit Controls in LR7

Junior Member Postagens: 45 Data de Entrada: 06/07/05 Postagens Recentes
Thanks. Would never have found!

Was on GA2; didn't realise GA3 was out. We're building a new site so will make the switch now and find out.
thumbnail
Albert Coronado Calzada, modificado 7 Anos atrás.

RE: Disable Edit Controls in LR7

Junior Member Postagens: 38 Data de Entrada: 10/02/09 Postagens Recentes
Hi,

It looks like a bug. For at the moment you can add this CSS to your theme:

.tools-control-group .control-menu-nav .control-menu-nav-item .control-menu-icon {
display: block !important;
}

It works for me.

Best regards,


Albert Coronado Calzada
http://www.albertcoronado.com
Made with love from Barcelona
thumbnail
Peter Hancox, modificado 7 Anos atrás.

RE: Disable Edit Controls in LR7

Junior Member Postagens: 45 Data de Entrada: 06/07/05 Postagens Recentes
And confirming, yes it is still a bug in GA3
thumbnail
Olaf Kock, modificado 7 Anos atrás.

RE: Disable Edit Controls in LR7

Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens Recentes
Albert Coronado Calzada:
It looks like a bug. For at the moment you can add this CSS to your theme:

.tools-control-group .control-menu-nav .control-menu-nav-item .control-menu-icon {
display: block !important;
}


Thanks Albert,
I've added this information to LPS-67891. Works well, and can also easily be added to the page's CSS in the product menu: site navigation / public pages (configure) / extra css
thumbnail
Peter Hancox, modificado 7 Anos atrás.

RE: Disable Edit Controls in LR7

Junior Member Postagens: 45 Data de Entrada: 06/07/05 Postagens Recentes
Thanks for the CSS but still not quite right for me.

Using the CSS on Chrome, I can see the icon but cannot press it due to the tool-tip being in front.

On Firefox, the tool-tip is positioned appropriately and when I click the icon it changes, however, the edit controls are still displayed.

Does it successfully disable the edit controls for you?

THANKS
thumbnail
Olaf Kock, modificado 7 Anos atrás.

RE: Disable Edit Controls in LR7

Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens Recentes
Peter Hancox:
On Firefox, the tool-tip is positioned appropriately and when I click the icon it changes, however, the edit controls are still displayed.


On Firefox, the edit controls disappear for me. However, there's a change with regards to earlier versions: The portlet title only appears on hovering the portlet with the mouse - this still happens. You can add an empty Web Content Display portlet: When edit controls are visible, you'll see it half-transparently. When you disable them, the portlet will disappear.

I think this change in behaviour might be what you're referring to. Earlier versions totally changed the full width title to a little transparent handle in the top right corner. I guess that this is no longer the case as the title is no longer displayed without hovering anyway.
thumbnail
Peter Hancox, modificado 7 Anos atrás.

RE: Disable Edit Controls in LR7

Junior Member Postagens: 45 Data de Entrada: 06/07/05 Postagens Recentes
Ahhh. So in the current version, when edit controls are disabled, hovering over an item still shows the edit controls?

That is pretty annoying, particularly for the navigation control.

Not much difference then between having edit controls enabled or not.

No wonder no one missed the toggle control :-)
thumbnail
Olaf Kock, modificado 7 Anos atrás.

RE: Disable Edit Controls in LR7

Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens Recentes
well... it still shows the portlet title - not different from what was shown in 6.2. Only that the portlet title now dynamically shows up when you hover. In 6.2 you could hide it in "Look & Feel" - and you can still get rid of it this way. Granted - even my expectation changed with this more dynamic hovering behaviour, but thinking about it, it's not that different from before.

Apart from the missing CSS.
Paul Allain, modificado 6 Anos atrás.

RE: Disable Edit Controls in LR7

Junior Member Postagens: 77 Data de Entrada: 03/09/13 Postagens Recentes
This very annoying problem is still present in GA4, I am beginning to think that it's deliberately left there in the CE just to p*** people off.
thumbnail
Olaf Kock, modificado 6 Anos atrás.

RE: Disable Edit Controls in LR7

Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens Recentes
Paul Allain:
This very annoying problem is still present in GA4, I am beginning to think that it's deliberately left there in the CE just to p*** people off.


Did you check the DXP behavior before assuming someone is maliciously keeping it from you? Because DXP, the commercial offering, behaves exactly the same way as of today. Plus, the fix mentioned above is quite trivial to add to your own theme. I'm assuming you have your own theme, or you have access to the page's extra CSS.
Paul Allain, modificado 6 Anos atrás.

RE: Disable Edit Controls in LR7

Junior Member Postagens: 77 Data de Entrada: 03/09/13 Postagens Recentes
Olaf Kock:
Did you check the DXP behavior before assuming someone is maliciously keeping it from you? Because DXP, the commercial offering, behaves exactly the same way as of today. Plus, the fix mentioned above is quite trivial to add to your own theme. I'm assuming you have your own theme, or you have access to the page's extra CSS.

Have tried the fix below when it was first suggested.


.tools-control-group .control-menu-nav .control-menu-nav-item .control-menu-icon {
display: block !important;
}

Like the OP mentioned, the above fix does bring back the icon but is useless as the functionality to toggle the visibility hasn't actually taken place.

Just to make sure I have tried it now on a fresh GA4 install and the behavious is exactly the same as described above.

I think there is some JavaScript logic involved to get the toggling to work.

Thanks
Paul
Damon Morda, modificado 6 Anos atrás.

RE: Disable Edit Controls in LR7

New Member Postagens: 16 Data de Entrada: 02/07/15 Postagens Recentes
Hi all,

Has anyone figured out a way to get the toggle controls working in desktop mode? LPS-68003 indicates Liferay does not plan to fix this as it's intended behavior.

I have a hard time accepting this as "won't fix" and "works as designed" as I believe this to be a poor UX choice, especially for use cases where Liferay is used as an intranet and the majority of users may have the permissions to edit portlet configurations to customize their experience. The lack of toggle controls in desktop mode leads to a poor user experience because users that have permissions to edit portlet configurations are constantly forced to see the animation of the toolbar every time they hover over a portlet. Considering the majority of the time our users are viewing content and not editing portlets, this has become very distracting and frustrating for those users.

If this is going to remain the default behavior in Liferay DXP, I would like to requested a documented workaround to make toggle controls for the portlet configuration available in the toolbar when in desktop mode.
thumbnail
Olaf Kock, modificado 6 Anos atrás.

RE: Disable Edit Controls in LR7

Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens Recentes
Damon Morda:
If this is going to remain the default behavior in Liferay DXP, I would like to requested a documented workaround to make toggle controls for the portlet configuration available in the toolbar when in desktop mode.


"just" (conditionally) add
.portlet-topper {
  display: none !important;
}

to your theme. Criteria when to show them or when not is up to you.

There are certainly other methods, e.g. inspecting what the "eye"-button actually does, but this is one option.
Damon Morda, modificado 6 Anos atrás.

RE: Disable Edit Controls in LR7

New Member Postagens: 16 Data de Entrada: 02/07/15 Postagens Recentes
That's an option, but seems like a nuclear one. Wouldn't doing that prevent the toolbar from every showing up? If that's the case, that's not quite what I'm asking for. I want the toggle controls eye icon back so that I can turn on/off those portlet toppers. I'd turn them on when I want to customize portlets on a page and turn them off when I just want to browse the pages.

This way I can control when I see them rather than having to see them all the time or never at all.
Damon Morda, modificado 6 Anos atrás.

RE: Disable Edit Controls in LR7

New Member Postagens: 16 Data de Entrada: 02/07/15 Postagens Recentes
It might help two provide two use case scenarios.
  • Admin configuration – This includes configuring a portlet’s configuration options for how the portlet shows up and works on a page, especially in cases where the configuration cannot be controlled by a regular user. For example, if I want to add some CSS, JavaScript, or control permissions. In these cases, we are typically logged in with an administrative account and don't mind seeing the toolbars popping up all over the place.
  • User configuration – This includes limited portlet configuration by the user to control how they want the portlet to function. For example, if we have a news portlet with 5 news categories, we want to provide a way for the user to configure the portlet to only show 3 of those news categories. In this case, we want the users to be able to toggle the controls on to edit the portlet configuration, and then be able to toggle them off to resume their regular browsing experience without the toolbars popping up.
Jason Shimkoski, modificado 6 Anos atrás.

RE: Disable Edit Controls in LR7

New Member Mensagem: 1 Data de Entrada: 03/01/18 Postagens Recentes
This re-adds the hide controls button (and re-adds its functionality) in desktop view:

Note: This is SCSS...

/////////////////////////////////////////////////
// Enable Hide Controls in every view
////////////////////////////////////////////////

// Always show the hide controls button
.tools-control-group .control-menu-nav .control-menu-nav-item .control-menu-icon {
  display: block !important;
}

// When the hide controls button is active, make sure the controls are hidden
.controls-hidden {
  .portlet-content-editable {
    border-color: transparent !important;
  }
  .portlet-topper {
    display: none !important;
  }
}


This was a very bad UX decision on Liferay's part.
thumbnail
David H Nebinger, modificado 6 Anos atrás.

RE: Disable Edit Controls in LR7

Liferay Legend Postagens: 14916 Data de Entrada: 02/09/06 Postagens Recentes
Well, just to throw my two cents in, "hide controls" was often abused, imho.

I mean, as an admin one would need controls to make changes to the site. Non-admins cannot make changes and therefore would never see controls in the first place.

I think, what happens in most cases, is that folks actually give admin role to real users (heck, I do this to myself all the time). The best practice, though, would be to create separate admin users so you have to specifically log in as an admin. It is the same as having root permission on your linux box, it's really a bad idea to do everyday activities as root, you should have your everyday account and, when you need it, switch to a root user when necessary.

Damon's case demonstrates mixing the concept of "configuration" with "user preference", so previously users would have an admin-like permission to get to a configuration panel on the wrench to change which categories to use.

The better use case would be like that of the forum thread view you see on this page. As a user, I can select combined, flat or tree view for posts. This is a user preference value that affects me and me alone. Separately there is portlet configuration, behind the scenes, that an admin will use to make changes which affect all users.

So for Damon's news portlet, there would be an admin configuration page where the admin can define the categories, define how many a user can see, perhaps mark some as required... All changes which affect all users. For the user preferences, though, offer an easy to use or easy to get to form for managing user preference. Additionally this allows you to style the preference display per your site look and feel, yet leverage the default styling for the admin configuration (where admins typically do not need consistent styling for configuration).

This was a very bad UX decision on Liferay's part.


I would argue that allowing the original "toggle controls" itself was worse. It wasn't well documented and it wasn't something basic users knew how to use.

The problem, of course, is that when you talk about good UX vs bad UX, it is rarely a black and white choice and often quite subjective. As developers or admins toggle controls often made sense, but I've more than once had to explain repeatedly to BAs how to use the toggle control feature because it was not something they saw on any other website they would visit or maintain.
Damon Morda, modificado 6 Anos atrás.

RE: Disable Edit Controls in LR7

New Member Postagens: 16 Data de Entrada: 02/07/15 Postagens Recentes
Thanks for chiming in Dave! As it turns out, we ended up implementing the ability to hide the controls in both mobile and desktop view because we wanted more choice over how that functionality worked.

In addition, we're going to implement a separation of duties, which we partially already had in place.

For users administering Liferay (eg., administrators, content editors, etc), we will be requiring them to use a separate account and they will see the portlet controls. For regular users, they will never see the portlet controls and when a portlet requires some kind of user preference, we will build that interface into the portlet rather than trying to leverage the portlet controls.
thumbnail
David H Nebinger, modificado 6 Anos atrás.

RE: Disable Edit Controls in LR7

Liferay Legend Postagens: 14916 Data de Entrada: 02/09/06 Postagens Recentes
Damon Morda:
For users administering Liferay (eg., administrators, content editors, etc), we will be requiring them to use a separate account and they will see the portlet controls. For regular users, they will never see the portlet controls and when a portlet requires some kind of user preference, we will build that interface into the portlet rather than trying to leverage the portlet controls.


I would consider this a best practice. It's the same reason under windows, linux and mac that users, by default, are not set up as admins because it is all to easy to change something that you may quickly regret.

Also, you can put in additional security such as a post login hook that verifies that, when an admin logs in, they are logging in from within your organization, basically preventing admin access from outside of your organization. Combined with firewall rules to block access to the control panel urls from /group/control_panel, and you end up adding numerous additional security layers to harden your Liferay environment.
Matthias Gruber, modificado 4 Anos atrás.

RE: Disable Edit Controls in LR7

New Member Mensagem: 1 Data de Entrada: 09/01/20 Postagens Recentes
The reason you not only have to click on the button is, that those styles only apply to mobile viewports as well. Here is a working SCSS solutoin. Some people coming across this post might still need it emoticon

// Always show the hide controls button
.tools-control-group .control-menu-nav .control-menu-nav-item .control-menu-icon {
display: block !important;
}

// When the hide controls button is active, make sure the controls are hidden
.controls-hidden {
.portlet-content-editable {
border-color: transparent !important;
}

.portlet-topper {
display: none !important;
}

.lfr-meta-actions, .lfr-configurator-visibility {
display: none;
}
}