[Sketcher] Non-Intrusive Notifications

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

[Sketcher] Non-Intrusive Notifications

Post by abdullah »

Lately I have been working on non-intrusive notifications. Here are some initial example screenshot/videos.

Aside from providing a less intrusive alternative to the Report View, I am looking forward to also offer a non-intrusive alternative to those Sketcher dialogs where the user can only click "Ok", but still has to click (at least as a configurable preference, as probably some collectives, as newcomers, may prefer the intrusive version).

One example could be this one:
IntrusiveSketcherNotification.png
IntrusiveSketcherNotification.png (12.94 KiB) Viewed 2263 times
Which should turn into something like this:
NoHorizontalOnCurve.gif
NoHorizontalOnCurve.gif (43.61 KiB) Viewed 2263 times
There are three categories of messages (at least for this kind of notifications), "Error", "Warning" and "Message". The system is common for the errors and warnings we are used to (from the Report View) and this new non-intrusive UI notifications. This means that these notifications will also appear in the Report View (if the report view is configured to sink the category used for non-intrusive UI notifications).

I have never paid too much attention to this UI notifications. It happens that they are "Warnings". This means that in the non-intrusive notification (as it is the case with the intrusive dialog), a Warning sign appears next to the message. There are two other options, "Errors" (red cross icon) and "Messages" (info sign). If they are kept as "Warnings" they will also be represented in the ReportView with the "Warning" color.

Personally, I have no clear opinion of whether they should be "Warning" or other category. At a first glance they may appear to be "Errors", but I wonder if it would be useful to put them on the same level as other errors currently appearing in the Report View. They may be warnings, in the sense that they warn the user that something could not be executed due to wrong input from the user. They could also be "Messages", but I tend to think that maybe just "for information" does not convey too clearly the idea that something has gone wrong (although it is generally clear that what the user thought to be asking has not been executed).

So here I have two questions:
1. Do you see something you do not like? Something should be done differently?
2. What do you think about the category of this UI notifications?
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: [Sketcher] None Intrusive Notifications

Post by chrisb »

These are user errors, but not FreeCAD errors. The set of elements and constraints is not in error, there is nothing which must be handled immediately.

Other argument: these are less severe than e.g. conflicting constraints, and even the latter are not (always) shown in report view. They are worth a message to the user that he should learn how to use the Sketcher properly.

Thus I would not show these as errors in report view.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [Sketcher] None Intrusive Notifications

Post by abdullah »

chrisb wrote: Wed Jan 04, 2023 11:25 pm These are user errors, but not FreeCAD errors. The set of elements and constraints is not in error, there is nothing which must be handled immediately.

Other argument: these are less severe than e.g. conflicting constraints, and even the latter are not (always) shown in report view. They are worth a message to the user that he should learn how to use the Sketcher properly.

Thus I would not show these as errors in report view.
I see. Sometimes it is not straightforward for me to define whether an error is a FC error or a user error, as FC prominently fails due to the user input it receives. But I see the "education vector" of these messages, as opposed to others.

About the non-consistent showing of FC errors (in the report view), this is something I am trying to address too as part of this effort.

Let me summarise your position (to see if I am understanding the whole):
- You would like to have non-intrusive notifications.
- You fancy that these appears as autoclosing message in the notification area.
- You do not like this "user" notifications to be reported in the report view.
- You may not like this "user" notifications to be recorded in the notification area (see screenshot).
NotificationAreaWidget.png
NotificationAreaWidget.png (56.98 KiB) Viewed 2132 times
N.B.: In this screenshot you have:
1. Warnings (not sure if this would qualify as a FC warning or a user warning), "The sketch has partially redundant constraints", as it came as a result of the user action (the user could have done better), but what the user asked is not fully unreasonable.
2. "CriticalMessage"s "Parabolas were migrated", which are intended to appear in the report view, and if the user triggered the load of a file containing them (as opposed to a script doing it), it will block the load of the file until the user confirms he got it (only the first critical message in a load is blocking when the user confirms he wants it so). This is intended to prevent problems with forward compatibility, when users jump between versions of FreeCAD.
3. The UI message of the first post, this time marked as information message (which currently does appear in the report window too and is recorded in the notification area).

To prevent this last message from appearing in the report window, it is possible to create a new category of message that is not handled by the report window at all. I would still record it in the notification area, so that if the non-intrusive notification fades away (because the user inadvertently clicked with the left mouse button), the user still has access to this information. However, the notification area widget could be extended with a filter to select, by a user, what is shown and what is not.

How could we name this category of message, "UserError" or "UserMessage", "UserNotification", ... ? We would also need an icon for that (at least of an idea of what should be in the icon).
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Sketcher] Non-Intrusive Notifications

Post by Kunda1 »

An aside but relevant:
There is an effort ongoing by FC users (@mangojellysolutions) on twitter to create a help directory consisting of all possible reasons for different FreeCAD errors/warnings. Using Abdullah's approach here there may be a usecase and a UI methodology to quickly link to a page displaying said possible reasons.

Here is another idea that would could potentially be easier to access with non-intrusive notifications
[FR] right click context menu in Report tab links to code on GH: https://forum.freecadweb.org/viewtopic.php?f=8&t=64873
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [Sketcher] Non-Intrusive Notifications

Post by abdullah »

Kunda1 wrote: Thu Jan 05, 2023 2:02 pm An aside but relevant:
Technically, if I were to include a link, I would include it in the widget. So the user will see the non-intrusive notification, and will open the notification area showing the widget. Then, each previous message may have a link to click (or open a context menu with all possible links).

The problem I have with external links is the maintainability of the links and availability of the resources. At the end, if these resources exist and are searchable by search engine bots, I am not sure anything would be much better than copying the error to the clipboard and pasting it in your favourite web search engine...
freedman
Veteran
Posts: 3436
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: [Sketcher] Non-Intrusive Notifications

Post by freedman »

If a user error occurs in Sketcher and a message is displayed I would like a message that pops-up for maybe 2 seconds and closes, I don't want to click on anything. IMO

Also, if you mean to link to something on the web; I would think any error handling should be build-in to the application, not dependent on web access. IMO
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: [Sketcher] None Intrusive Notifications

Post by chrisb »

abdullah wrote: Thu Jan 05, 2023 9:08 am Let me summarise your position (to see if I am understanding the whole):
- You would like to have non-intrusive notifications.
- You fancy that these appears as autoclosing message in the notification area.
Yes. Although I have to add, that I'm meanwhile experienced enough to not see any of these messages at all, so my opinion is based on what I see when teaching the Sketcher
- You do not like this "user" notifications to be reported in the report view.
- You may not like this "user" notifications to be recorded in the notification area (see screenshot).
I'm not sure if they should be reported in some way. But they should from my point of view not be reported as errors, and even warnings could be too much, because - depending on the preferences - they pop the report view window open and that's annoying, if it tells me nothing more than what I just saw in the message and I have to close it to get back the realestate.
1. Warnings (not sure if this would qualify as a FC warning or a user warning), "The sketch has partially redundant constraints", as it came as a result of the user action (the user could have done better), but what the user asked is not fully unreasonable.
I would qualify them as user warnings; for me they have the same quality like solver messages indicating a more serious issue.
How could we name this category of message, "UserError" or "UserMessage", "UserNotification", ... ? We would also need an icon for that (at least of an idea of what should be in the icon).
I like UserNotification.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [Sketcher] Non-Intrusive Notifications

Post by abdullah »

freedman wrote: Thu Jan 05, 2023 8:12 pm If a user error occurs in Sketcher and a message is displayed I would like a message that pops-up for maybe 2 seconds and closes, I don't want to click on anything. IMO
As I am developing while discussing, the situation now is that you get a notification next to the status bar. It will stay there for 10 seconds or until you press the mouse left button whatever happens first (the 10 seconds is configurable via parameter, it will probably find its way to preferences before merge). The notification does not interrupt your workflow, you can choose to stop to read it or continue working. You can do whatever you want while it is there. You can ignore it and continue working.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [Sketcher] None Intrusive Notifications

Post by abdullah »

chrisb wrote: Thu Jan 05, 2023 9:26 pm Yes. Although I have to add, that I'm meanwhile experienced enough to not see any of these messages at all, so my opinion is based on what I see when teaching the Sketcher
In the development branch, you can disable the non-intrusive notifications (via parameter, in the future in preferences), so you can choose not to see them at all. In fact, via another parameter you can remove the notification area in its entirety.
chrisb wrote: Thu Jan 05, 2023 9:26 pm I'm not sure if they should be reported in some way. But they should from my point of view not be reported as errors, and even warnings could be too much, because - depending on the preferences - they pop the report view window open and that's annoying, if it tells me nothing more than what I just saw in the message and I have to close it to get back the realestate.
I have not done it yet, but will extend the framework to a new category of message "UserNotification".

The popping up of the report view window is a no-go for me. I mean, I have it disabled. When the notification area is there, I do not see why anybody should have that option on. You will get all notifications in the Notifications Area. Then, the automatic popping up of the report window can maybe be disabled by default.
chrisb wrote: Thu Jan 05, 2023 9:26 pm I would qualify them as user warnings; for me they have the same quality like solver messages indicating a more serious issue.
I agree.
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: [Sketcher] None Intrusive Notifications

Post by chrisb »

abdullah wrote: Fri Jan 06, 2023 12:37 am The popping up of the report view window is a no-go for me. I mean, I have it disabled.
This is out of the scope of this discussion, and I don’t like the report view to pop up so often, but I like the possibility to get notified in a dramatic way when something dramatic happens. That’s why I have it enabled. Otherwise there are messages slipping through - especially when looking at foreign models - which need urgent intervention. “Not a DAG” is an example for this.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply