Bug Hunting Session
Bug 120271 - Disabling "Get involved" and "Donate" infobar in enterprise installs
Summary: Disabling "Get involved" and "Donate" infobar in enterprise installs
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
Version:
(earliest affected)
6.1.0.1 rc
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:6.2.0 target:6.1.3 target:6.1.5
Keywords:
Depends on:
Blocks: Options-Dialog-Expert
  Show dependency treegraph
 
Reported: 2018-10-02 14:30 UTC by Gabor Kelemen
Modified: 2019-02-08 18:22 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
New position of Get involved (46.22 KB, image/png)
2018-10-05 13:02 UTC, Roman Kuznetsov
Details
disableAdware.oxt: a settings extension to disable GetInvolved and Donate infobar messages (4.53 KB, application/vnd.openofficeorg.extension)
2018-12-17 17:26 UTC, Justin L
Details
getInvolvedAndDonate.png: screenshot of what these infobar messages like on Ubuntu 18.04 (140.82 KB, image/png)
2019-01-08 14:34 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen 2018-10-02 14:30:51 UTC
Currently the new "Get involved" infobars code[1] checks the time it was last shown, and depending on that value, shows the infobar.

In an enterprise deployment I think it's not desirable to show this, so a way to entirely disable it from central configuration would be required. 
The code currently does not check whether the value of the config key is locked down: adding a check would be a solution here.

[1] https://cgit.freedesktop.org/libreoffice/core/commit/?id=c3fa7a82b7657b00f30394df59e2ffc610350686
Comment 1 Heiko Tietze 2018-10-02 15:24:52 UTC
Kendy's code checks Tools > Options > Advanced > Expert configuration: org.openoffice.Setup.Product.LastTimeGetInvolvedShown and I think it's acceptable for an admin to set this value manually. My take: no action needed.
Comment 2 Michael Meeks 2018-10-02 16:17:59 UTC
Hmm - I would expect people to configure that feature out at compile time - and for enterprise distributions to build their own packages of LibreOffice. People should not be deploying generic builds of LibreOffice in large enterprises anyway I think. So - would prefer to see a configure change if its not there already.
Comment 3 Jan Holesovsky 2018-10-05 07:47:16 UTC
I agree with Heiko & Michael here.

Gabor - if you want to implement a configure option to compile this out, please go ahead, otherwise I think we can close this as WONTFIX.  Thanks for the report!
Comment 4 Michael Weghorn 2018-10-05 09:38:42 UTC
(In reply to Heiko Tietze from comment #1)
> Kendy's code checks Tools > Options > Advanced > Expert configuration:
> org.openoffice.Setup.Product.LastTimeGetInvolvedShown and I think it's
> acceptable for an admin to set this value manually. My take: no action
> needed.

At a quick glance at the commit, I'm not sure whether there's any constant value an admin could to set to prevent the info bar from ever being shown. (Please let me know if there is one.)

Unless this already exists (I haven't looked very closely so far): Would it possibly make sense to introduce a special value (like e.g. '-1') that means "neither show the info nor update the value to the current timestamp"?
Comment 5 Heiko Tietze 2018-10-05 10:03:14 UTC
(In reply to Michael Weghorn from comment #4)
> ...Would it
> possibly make sense to introduce a special value (like e.g. '-1') that means
> "neither show the info nor update the value to the current timestamp"?

Very simple:

if (nLastShown == -1)
   <exit>
else if (nLastShown == 0)
  ...
Comment 6 Michael Weghorn 2018-10-05 10:58:54 UTC
Is there any reason not to implement it this way then? (As far as I understand, that looks much more straight-forward than introducing a separate configure option, both from a developer and from an admin perspective.)

@Michael, Kendy: What do you think?

@Gabor: Would you be happy about such a solution?
Comment 7 Roman Kuznetsov 2018-10-05 13:01:38 UTC
Can I add my 5 cents?

May be just move this infobar to right side of Stadard toolbar?

See attach for example. That position doesn't interfere to work, IMHO. And this infobar doesn't need to hide, it always will be show.
Comment 8 Roman Kuznetsov 2018-10-05 13:02:10 UTC
Created attachment 145412 [details]
New position of Get involved
Comment 9 Heiko Tietze 2018-10-05 13:03:59 UTC
(In reply to Roman Kuznetsov from comment #8)
> Created attachment 145412 [details]
> New position of Get involved

That's not how the infobar works. It is a completely different control, not like another toolbar. And if, it would depend on the screen width whether more or less important information are shown.
Comment 10 Mike Kaganski 2018-10-05 13:23:39 UTC
(In reply to Michael Weghorn from comment #4)
> At a quick glance at the commit, I'm not sure whether there's any constant
> value an admin could to set to prevent the info bar from ever being shown.
> (Please let me know if there is one.)

I suppose that making it 0 and final (so not modifiable) would do.
Comment 11 Roman Kuznetsov 2018-10-05 13:30:41 UTC
(In reply to Heiko Tietze from comment #9)
> (In reply to Roman Kuznetsov from comment #8)
> > Created attachment 145412 [details]
> > New position of Get involved
> 
> That's not how the infobar works. It is a completely different control, not
> like another toolbar. And if, it would depend on the screen width whether
> more or less important information are shown.

So, I don't like this infobar. For me it was badly idea. But if we want get some help from users and want to have some GUI element with "Get involved", then we can just put it on place, that usually doesn't use. It will be not infobar, but it will be works as we want and doesn't interfere to work.
Comment 12 Thomas Lendo 2018-10-05 15:12:13 UTC
(In reply to Roman Kuznetsov from comment #8)
> Created attachment 145412 [details]
> New position of Get involved
Please don't play with the infobar. The current position is identical to other information and warnings. Adding a new place for info is bad UX and clutters the UI. And that doesn't help the bug opener.
Comment 13 Thomas Lendo 2018-10-08 11:42:54 UTC
(In reply to Heiko Tietze from comment #5)
> (In reply to Michael Weghorn from comment #4)
> > ...Would it
> > possibly make sense to introduce a special value (like e.g. '-1') that means
> > "neither show the info nor update the value to the current timestamp"?
> 
> Very simple:
> 
> if (nLastShown == -1)
>    <exit>
> else if (nLastShown == 0)
>   ...

(In reply to Michael Weghorn from comment #6)
> Is there any reason not to implement it this way then?
+1 due to its simplicity.
Comment 14 Michael Meeks 2018-10-08 14:40:47 UTC
I think we probably want a configure option anyway to disable this; confirming as an enhancement to avoid annoying the triage volunteers.

From the perspective of what how TDF ships binaries - I'm not sure we should spend lots of work enabling enterprises who don't contribute via a supported version to escape being told that they should contribute =)

The infobar is there for a purpose - to encourage people to get involved. No vendor (or in-house team) providing an actually supported version would show this to their users - everyone else should be reminded to contribute =) so I'm inclined to say this is a feature-not-bug.
Comment 15 Michael Weghorn 2018-10-08 15:58:06 UTC
(In reply to Mike Kaganski from comment #10)
> I suppose that making it 0 and final (so not modifiable) would do.

Thanks for the idea. However, when I tried to do so, LibreOffice crashes, and shows this line on stderr:

    warn:vcl.schedule:28679:28679:vcl/source/app/scheduler.cxx:479: Uncaught com.sun.star.lang.IllegalArgumentException configmgr modification of finalized item

which somewhat conforms to what is described in the PDF document linked at https://wiki.documentfoundation.org/Deployment_and_Migration#Configuration_Extension :

"Adding oor:finalized allows you to ENFORCE this setting
- preventing the user from over-riding it with his own preference. (Sometimes the finalized settings are visibly disabled in the GUI. In some other cases, if the user tries to modify it, LibreOffice will crash/close with the error “configmgr modification of finalized item”.)"

What I did was adding a file './instdir/share/registry' with the following content:

<?xml version="1.0"?>
<oor:data xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:oor="http://openoffice.org/2001/registry">
  <dependency file="main" />
  <oor:component-data xmlns:install="http://openoffice.org/2004/installation"
  oor:name="Setup" oor:package="org.openoffice">
    <node oor:name="Product">
        <prop oor:name="LastTimeGetInvolvedShown" oor:op="fuse" oor:finalized="true">
          <value>0</value>
        </prop>
    </node>
  </oor:component-data>
</oor:data>
Comment 16 Mike Kaganski 2018-10-08 16:03:09 UTC
(In reply to Michael Weghorn from comment #15)
> (In reply to Mike Kaganski from comment #10)
> > I suppose that making it 0 and final (so not modifiable) would do.
> 
> Thanks for the idea. However, when I tried to do so, LibreOffice crashes,
> and shows this line on stderr:

That is what https://gerrit.libreoffice.org/61430 is meant for
Comment 17 Commit Notification 2018-10-08 16:11:55 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ec235750bb30c3b66bd8b642f6abd1f9ea8244df

tdf#120271 related: Allow finalizing of LastTimeGetInvolvedShown

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 18 Michael Weghorn 2018-10-08 16:41:18 UTC
(In reply to Mike Kaganski from comment #16)
> (In reply to Michael Weghorn from comment #15)
> > (In reply to Mike Kaganski from comment #10)
> > > I suppose that making it 0 and final (so not modifiable) would do.
> > 
> > Thanks for the idea. However, when I tried to do so, LibreOffice crashes,
> > and shows this line on stderr:
> 
> That is what https://gerrit.libreoffice.org/61430 is meant for
Thanks!
(After looking at the code, just realized that setting to a very large value would have been a workaround so far, but the solution you implemented is much better in my eyes.)
Comment 19 Heiko Tietze 2018-10-09 06:58:58 UTC
Simple solution. Please reopen Gabor if you disagree.
Comment 20 Commit Notification 2018-10-09 12:23:10 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=43a81897b2735db7116ec62ba07efc97a6b71b8e&h=libreoffice-6-1

tdf#120271 related: Allow finalizing of LastTimeGetInvolvedShown

It will be available in 6.1.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 21 Justin L 2018-12-17 17:26:03 UTC
Created attachment 147623 [details]
disableAdware.oxt: a settings extension to disable GetInvolved and Donate infobar messages
Comment 22 Justin L 2018-12-18 05:37:12 UTC
(In reply to Justin L from comment #21)
I probably should clearly state that this extension depends on comment 20's commit, so it requires 6.1.3+.  (I also verified that it can be used in 6.0 without causing problems.)

The link in comment 15 will tell you how to verify what the extension is doing.
Comment 23 Justin L 2019-01-08 14:34:12 UTC
Created attachment 148130 [details]
getInvolvedAndDonate.png: screenshot of what these infobar messages like on Ubuntu 18.04
Comment 24 Heiko Tietze 2019-01-08 14:37:08 UTC
(In reply to Justin L from comment #23)
> Created attachment 148130 [details]
> getInvolvedAndDonate.png: screenshot of what these infobar messages like on
> Ubuntu 18.04

The two shouldn't come up at the same time.
Comment 25 Justin L 2019-01-08 15:27:22 UTC
(In reply to Heiko Tietze from comment #24)
> The two shouldn't come up at the same time.
This was NOT under natural conditions.  I had been playing with the values of lasttime*.  Likely I forced them BOTH to 1 at the same time in order to achieve this interesting effect.
Comment 26 Commit Notification 2019-01-15 06:33:11 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

https://git.libreoffice.org/core/+/9b829d4d40d1adcb2e53a753fba015ef6ed5ac4d%5E%21

tdf#120271 thanks ESC: disable getInvolved for stable 6.1 build

It will be available in 6.1.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 27 Mike Kaganski 2019-01-15 06:37:50 UTC
A proposal (just occured to me): possibly it would be better to move the get involved/donate infobars to start center, to find a balance? it would be less intrusive than showing them above the documents. Of course, it would also decrease its visibility somewhat, but as there's some disagreement overal here, maybe it's worth considering?
Comment 28 V Stuart Foote 2019-01-15 07:05:38 UTC
(In reply to Mike Kaganski from comment #27)
> A proposal (just occured to me): possibly it would be better to move the get
> involved/donate infobars to start center, to find a balance? it would be
> less intrusive than showing them above the documents. Of course, it would
> also decrease its visibility somewhat, but as there's some disagreement
> overal here, maybe it's worth considering?

Uhm, IIRC doesn't the Infobar hold part of the classification marking mechanism?  The later being rather significant per document.

Rather than the StartCenter, might a suitable button icon placed like the "Update Available" onto the main menu--with similar balloon callout text--be less annoying cajoling?  Those interested would mouse over and could click, and otherwise could ignore it if they like as timer cycles.  Less "in your face".
Comment 29 Mike Kaganski 2019-01-15 07:12:17 UTC
(In reply to V Stuart Foote from comment #28)
> (In reply to Mike Kaganski from comment #27)
> Uhm, IIRC doesn't the Infobar hold part of the classification marking
> mechanism?  The later being rather significant per document.

I don't see how that's relevant to moving *involved/donate infobars*