Bug 166733 - Welcome dialog shown on module change
Summary: Welcome dialog shown on module change
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Heiko Tietze
URL:
Whiteboard: target:25.8.0
Keywords:
Depends on:
Blocks: First_Launch_Welcome
  Show dependency treegraph
 
Reported: 2025-05-26 13:33 UTC by Heiko Tietze
Modified: 2025-05-29 05:51 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Tietze 2025-05-26 13:33:42 UTC
Start LibreOffice with a clean user profile- the welcome dialog shows up when, for instance, Writer is started but as well after running File > New > Spreadsheet, etc.

The dialog should be shown only once.
Comment 1 Alan B. 2025-05-26 14:47:15 UTC
Thank you for reporting the bug. Unfortunately I'm unable to reproduce this bug. I've reset my user profile using Safe Mode but I don't get a dialog when opening a new document.

Version: 25.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 19f3b72f34c487dc97d582712d21734a7e055fd5
CPU threads: 16; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 2 V Stuart Foote 2025-05-26 15:52:05 UTC
@Heiko, which build of master?, i.e. need the Help -> About details. 

Comment 1 was unconfirmed against the 2025-05-12 git head, and you've been working on bug 158880 of late.
Comment 3 V Stuart Foote 2025-05-26 15:59:12 UTC
(In reply to V Stuart Foote from comment #2)
> @Heiko, which build of master?, i.e. need the Help -> About details. 
> 
> Comment 1 was unconfirmed against the 2025-05-12 git head, and you've been
> working on bug 158880 of late.

And, could't confirm STR with the 2025-05-20 build. Getting just the single pass through the Welcome dialog with this build.

=-testing-=

Version: 25.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: b52384de6f09f124fef9405ccf273c0f5c3339d1
CPU threads: 8; OS: Windows 11 X86_64 (build 22631); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 4 Alan B. 2025-05-26 16:18:03 UTC
I tried manually deleting the user folder and was able to reproduce this behavior. When dismissing the welcome dialog, it continues to reappear every time a new document is opened via File -> New.

Version: 25.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 3158b14e0b26875300a8098bc117a5e69b76f48f
CPU threads: 16; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 5 V Stuart Foote 2025-05-26 16:39:28 UTC
OK, confirmed on the 2025-05-23 build. Within a running instance of soffice.bin on its first launch, the Welcome dialog opens for each module.

Only with subsequent launch of soffice.bin proceeds to the TOTD or alertbar First launch.

=-testing-=

2025-05-23 tb77 build
Version: 25.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 3158b14e0b26875300a8098bc117a5e69b76f48f
CPU threads: 8; OS: Windows 11 X86_64 (build 22631); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 6 Heiko Tietze 2025-05-27 06:43:02 UTC
Mike, I hook up "your" FirstRun implementation from https://gerrit.libreoffice.org/c/core/+/168902 with the Welcome dialog. What do you think how this should be done?
Comment 7 Heiko Tietze 2025-05-27 06:59:46 UTC
Some "debug" STR:

In sfx2/source/view/viewfrm.cxx method SfxViewFrame::Notify() line #1646 if (!SfxApplication::IsHeadlessOrUITest()) add (mentally) if (bIsFirstStart) SAL_DEBUG("First Start");

This "First Start" will be shown after running Writer in safe mode - and if you start Calc via File > New again.

The variable ooo::Common::Misc::FirstRun triggers the Welcome dialog but apparently also the Quickstarter on Windows. So my question is whether we need to fix the FirstRun::set() or if I should introduce my own variable. After FirstRun::set() is set to true in isProductVersionUpgraded() the latter seems to be necessary.
Comment 8 Mike Kaganski 2025-05-27 07:02:44 UTC
(In reply to Heiko Tietze from comment #7)

I don't quite understand the question. The same task was already solved previously: there used to be an infobar with "release notes" button, which, if I remember correctly, did the right thing, and only appeared once. I believe that https://gerrit.libreoffice.org/c/core/+/168902 is not related, and the proper way is to see how that was done for that infobar, and what's different for the dialog.

Or do you mean, that my change somehow broke that variable? But it shouldn't repeat on every module start - it is expected to only run once early in the load process.
Comment 9 Heiko Tietze 2025-05-27 07:26:55 UTC
(In reply to Mike Kaganski from comment #8)
> The same task was already solved previously...
I suspect the Infobar to be checked somewhere else and at least the Quickstarter routines are called repeatedly.

Anyway, I'll add my variable.
Comment 10 Mike Kaganski 2025-05-27 07:33:42 UTC
(In reply to Heiko Tietze from comment #9)
> Anyway, I'll add my variable.

Which variable? Please add me to the patch.
But my advise is: if there is some code that solves that task, the best is to find it, and reuse, instead of introducing alternative ways to do the same. And my code is completely different - it uses a variable that is intended to work before any module is launched. If you want to open the dialog already in start center, that *may* be a possibility, but IMO it's wrong - the Common::Misc::FirstRun is for initialization, some technical stuff; it may be repeated in case it failed ... and the UI stuff, as I see it, should possibly have some "already shown" flags, or some such.
Comment 11 Commit Notification 2025-05-28 12:14:16 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3cfa257452dd04da0dcd6e9a8e61dcd98bdcb687

Resolves tdf#166733 - Show Welcome dialog only once

It will be available in 25.8.0.

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 12 Heiko Tietze 2025-05-28 12:15:45 UTC
I use now the variable WhatsNewDialog as nil to show the welcome dialog (and true for the same dialog in whatsnew flavor later). Simply restating in safe-mode is not enough anymore to trigger the welcome dialog, you need to remove the registrymodifications.xcu
Comment 13 Commit Notification 2025-05-29 05:50:19 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/aadde5364767445a3ff539d6673a0201912d49db

Related tdf#166733 - Show Welcome dialog on the very first start only

It will be available in 25.8.0.

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 14 Heiko Tietze 2025-05-29 05:51:36 UTC
(In reply to Heiko Tietze from comment #12)
> I use now the variable WhatsNewDialog as nil to show the welcome dialog...
This was a bad solution. Went back to simple boolean for the dialog and Mike helped with a function to detect the very first start. Safe-mode should end in the Welcome flavor now, lower SetupLastVersion stanza in the WhatsNew version.