Notification Area issues

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: Notification Area issues

Post by chrisb »

uwestoehr wrote: Tue Mar 21, 2023 3:28 pm So all I want is an option in the notification settings called "don't popup for warnings". This option is by default on. Experienced users can turn it off and see the popup also for warnings.
Can we please inverse the meaning and the description:
on = show warnings
off = don't show warnings
whatever the default will be.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Notification Area issues

Post by adrianinsaval »

chrisb wrote: Tue Mar 21, 2023 4:50 pm on = show warnings
off = don't show warnings
+1
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Notification Area issues

Post by abdullah »

xtemp09 wrote: Tue Mar 21, 2023 3:03 pm abdullah, do you have plans on adding Windows Toast notifications or KDE KNotifications as back-end?
Not really. I wanted to provide one system that would work for all our supported OSs.

When I was looking into this, around last December, I read several blogs and looked at the solutions offered in stackoverflow. Many solutions were not portable. I also did tests with widgets. In fact, FreeCAD itself had shortly another system only for critical messages which had an auto-closing dialogs. All solutions had problems (often with being intrusive as grabbing the focus). The closest solution was using a QTooltip, but this one would quickly disappear on lots of events. I tried to block these events to reuse QTooltip, but I did not manage to, as QToolTip also has mouse tracking separate from the event system.

Based on all these failures, is when I decided to write something similar to QTooltip but tailored to notifications, rather than tips. This is what we got.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Notification Area issues

Post by abdullah »

chrisb wrote: Tue Mar 21, 2023 4:50 pm Can we please inverse the meaning and the description:
on = show warnings
off = don't show warnings
whatever the default will be.
I have now another set of features for the Notification in a PR. Basically, it allows users, via preferences, to configure whether notifications should appear also when other applications are being used (as if it were some kind of system tray), or only when the FreeCAD window is active. If a notification is not shown (because FreeCAD's main window is not active), the tray icon changes to red, so that when the user comes back to FreeCAD, he sees that he missed some notifications. then he can click on the notification area to open the widget and check out what he missed.

When that PR is merged, then I will implement this.
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: Notification Area issues

Post by chrisb »

uwestoehr wrote: Mon Mar 20, 2023 4:14 pm I have a running production. My product uses 3D-printed parts and we have employees and students in the production and design.

I for example hire a student who comes over for 10 hours a week to help me with the 3D design. His task is to adjust parts in the CAD, print them, then adjust the part depending on the printing results.

I think you can imagine how it feels when he called me "I see a warning, what does this mean". Then I have to come over, check, often I don't have a clue at all and in the end I turned off warnings for him. His task is to print parts and this works well.
Why are you forcing average users to become FreeCAD masters? FreeCAD is just a tool, as the slicing software of the printer is, as Inkscape is for illustrations and Word is to write the report.
We have customers, they need a change within a week, so we start actions. There is no time to dive into the FreeCAD details. "Can I redesign and print the part", that is the question.
Last but not least, every half an hour my employee spends in checking what a warning means cost money and time.
I have severe problems that I hear I would do quick'n dirty stuff.
But that's exactly what it is. I found this wiktionary definition
Done or constructed in a hasty, approximate, temporarily adequate manner, but not exact, fully formed, or reliable for a long period of time.
What you do is just sufficient to fulfil the immediate task. That's not a shame! But it is also not as good as it could be. The reasons why somebody acts "quick and dirty" can be of a huge variety, I will by far not exclude myself. I once had to take gearbox apart at the side of the road, and when I took the lid off, several springs appreciated their sudden freedom ... My quick and dirty fix was the only option, it brought me home and much further, but I wouldn't go out and tell a mechanic in a workshop that my way was the general way to go.
I have the feeling that's what you were trying to do with FreeCAD.
Going out to design a gearbox that can be repaired at the roadside is a different story, and that's what Abdullah proposed to improve the situation.

When you employ more or less untrained people they are trained on the job; that's normal. The training is often omitted, because there is no time, i.e. you need some help quick; in a hasty, approximate, temporarily adequate manner, but not exact, fully formed, or reliable for a long period of time. Which not only I would call quick and dirty.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Notification Area issues

Post by adrianinsaval »

abdullah wrote: Tue Mar 21, 2023 6:05 pm
xtemp09 wrote: Tue Mar 21, 2023 3:03 pm abdullah, do you have plans on adding Windows Toast notifications or KDE KNotifications as back-end?
Not really. I wanted to provide one system that would work for all our supported OSs.
Knotifications claims to support all 3, however I don't know if system notifications are really what we want here, notifications within the app seem more appropriate.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Notification Area issues

Post by abdullah »

Uwe checked the second package of improvements and it is now merged.

So, now you can control in preferences if you want to be notified while you are at other task and running your simulation, or if notifications while you are at other task are inhibited. When a notification is inhibited (if you have that preference selected), the notification area changes color to red to indicate that you have new notifications that were inhibited. Once you click on the notification area to check them, the notification area becomes its regular color again.

When you have this, please give me some feedback in this thread whether you are still missing anything or not.
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Notification Area issues

Post by openBrain »

abdullah wrote: Wed Mar 22, 2023 6:19 pm When you have this, please give me some feedback in this thread whether you are still missing anything or not.
It looks like the widget (one appearing when you click the status bar button) computes its placement before having it's actual size, so its position varies in a strange way.
Also, could you reduce the status bar button width to the needed minimum ? :)

EDIT: quick & dirty GIF for 1st point
notifwidget.gif
notifwidget.gif (464.27 KiB) Viewed 818 times
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Notification Area issues

Post by uwestoehr »

abdullah wrote: Wed Mar 22, 2023 6:19 pm When you have this, please give me some feedback in this thread whether you are still missing anything or not.
Hi @abdullah , as I wrote I miss this:
- assume a new installation, thus e.g. a new user
- intrusive notifications are on by default
result: user gets a popup on every warning

as discussed, this reverts the change we made in FC 0.20 not to bother by default users with warnings, while experts can set to see them.

Can you therefore please

- either add an option "don't show warnings" that is on by default
- or deactivate intrusive notifications by default 8so that experts can enable them
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Notification Area issues

Post by abdullah »

openBrain wrote: Wed Mar 22, 2023 6:28 pm It looks like the widget (one appearing when you click the status bar button) computes its placement before having it's actual size, so its position varies in a strange way.
Also, could you reduce the status bar button width to the needed minimum ? :)
Um... I do not have a clear idea why this happens. Maybe it is because the widget is filled on demand to avoid performance hits due to QTree intensive signaling. Thanks for reporting it. I write it down on my list of things to fix.
uwestoehr wrote: Fri Mar 24, 2023 9:21 pm Can you therefore please

- either add an option "don't show warnings" that is on by default
- or deactivate intrusive notifications by default 8so that experts can enable them
At this very moment, I am in the middle of writing a model - view for ElementsWidget.

This modification I have in mind. I will add two checkboxes to preferences:
x show warnings
x show errors

with this, you could decide whether the Notification Area subscribes (and thus shows) errors and warnings. So you will have a fine grained approach to what you get.

With respect to the default settings, I am listening to your position and that of chrisb. I accept you have your use case, but I am not convinced that your use case should be the default. I think that the arguments for keeping warnings on outweighs the drawbacks (with the proviso, that warnings need to be meaningful, which is a path we have just started walking).

However, as a general approach to preferences, I see that different companies may have different "company policies" implemented via preferences. As companies have control over the installations of FreeCAD, I wonder if it is an option to set the preferences implementing the company policy as part of the installation or right afterward (e.g. via script). If there were a public/official approach to it (possibly documented in the wiki), it could help other companies with other needs too.
Post Reply