[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!
chrisb
Veteran
Posts: 53922
Joined: Tue Mar 17, 2015 9:14 am

Re: [Sketcher] Non-Intrusive Notifications

Post by chrisb »

abdullah wrote: Sat Jan 28, 2023 8:40 am Who could activate one for me?
Send a PM to Yorik and Kunda1 (Jim is also listed, but sadly I haven't seen him here since long time) containing your email. See also https://forum.freecadweb.org/viewtopic.php?f=21&t=6830.

:lol: :lol: : It's good that you explained what you want to do in the wiki, so you are not kept for a spammer! :lol:
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 »

Thanks, I asked Kunda1.
chrisb wrote: Sat Jan 28, 2023 9:30 am :lol: :lol: : It's good that you explained what you want to do in the wiki, so you are not kept for a spammer! :lol:
:lol: :lol:

Well, I am going to try not to appear a spammer :)

Where should information about the notification area be put?
chrisb
Veteran
Posts: 53922
Joined: Tue Mar 17, 2015 9:14 am

Re: [Sketcher] Non-Intrusive Notifications

Post by chrisb »

abdullah wrote: Sat Jan 28, 2023 8:04 pm Where should information about the notification area be put?
I would say it can live well behind Basics of constraint sketching, but I'm very open for other suggestions.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
FBXL5
Posts: 979
Joined: Sat Aug 03, 2019 8:45 pm

Re: [Sketcher] Non-Intrusive Notifications

Post by FBXL5 »

chrisb wrote: Sun Jan 29, 2023 2:16 am I would say it can live well behind Basics of constraint sketching, but I'm very open for other suggestions.
+1 at the moment...

I prepared a new section to start, This could be rearranged at a later point. 8-)

For the original pages it is a good idea to start with a sandbox and later transfer the finished content into the proposed spot in one step. This way there is hardly a chance to appear like a spammer.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [Sketcher] Non-Intrusive Notifications

Post by abdullah »

chrisb wrote: Sun Jan 29, 2023 2:16 am
abdullah wrote: Sat Jan 28, 2023 8:04 pm Where should information about the notification area be put?
I would say it can live well behind Basics of constraint sketching, but I'm very open for other suggestions.
Chris, the feature is broader than the Sketcher. I understand I am being misleading because I put "Sketcher" in the title of the Thread. But this is a mechanism that any workbench and any python macro will be able to use.
chrisb
Veteran
Posts: 53922
Joined: Tue Mar 17, 2015 9:14 am

Re: [Sketcher] Non-Intrusive Notifications

Post by chrisb »

abdullah wrote: Sun Jan 29, 2023 6:51 pm Chris, the feature is broader than the Sketcher.
I had thought about that, but came to the conclusion that it belonged to Sketcher. For broader usage I would put it in this section about Exploring the interface.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
FBXL5
Posts: 979
Joined: Sat Aug 03, 2019 8:45 pm

Re: [Sketcher] Non-Intrusive Notifications

Post by FBXL5 »

chrisb wrote: Sun Jan 29, 2023 7:00 pm For broader usage I would put it in this section about Exploring the interface.
And preparations removed from the sketcher page... :roll:
I as well thought it was mainly a sketcher extension.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: [Sketcher] Non-Intrusive Notifications

Post by abdullah »

I ended up coding quite some more than I originally intended. Now, I think it is sufficiently finished.

I have split the whole thing into palatable PRs so that the code can be reviewed easily (or at least easier-ly).

Two first PRs:
https://github.com/FreeCAD/FreeCAD/pull/8350
https://github.com/FreeCAD/FreeCAD/pull/8352

When those are merged, there will still be some 4 or so:
- NotificationArea itself
- The Preferences page controlling all the parameters (preferences) of Notification area
- Intrusive/non-intrusive notification framework (fancy name for a tiny PR with some functions so that WBs can provide intrusive and non-intrusive dialogs based on the preferences of the notification area).
- Sketcher 1: Non-intrusive notifications used in the Sketcher WB for constraints and some relevant solver messages.

In pictures:
1- Non-intrusive notifications next to the "Notification Area":
Screenshot_20230205_005240.png
Screenshot_20230205_005240.png (60 KiB) Viewed 1013 times
2- Notification area messages (widget with received notifications):
Screenshot_20230205_005325.png
Screenshot_20230205_005325.png (56.61 KiB) Viewed 1013 times
3- Preferences to adapt it to the taste of users:
Screenshot_20230205_005157.png
Screenshot_20230205_005157.png (71.07 KiB) Viewed 1013 times
3.1 - Yes, the notification area can be completely disabled if the user wants to. Just as before.
3.2 - Yes, the non-intrusive notifications can be disabled altogether if a user does not want to be bothered, but still wants to have a quick access to notifications. Unread notification counter shows the unread notifications in the widget. New notifications appear in bold within the widget.
3.3 - Yes, the user can regulate the maximum time notifications will stay on the screen. Although notifications disappear before that time (and after the minimum duration) if the user continues working and presses a mouse button anywhere in the screen.
3.4 - Yes, the user can regulate a minimum time notifications will stay on the screen. During this time a notification will only disappear is popped out (clicked inside it). This ensures notification is not dismissed directly before the user having a chance of seeing it due to continue working and clicking.
3.5 - Yes, there is a limit on the number of notifications simultaneously being shown (otherwise the whole screen could be filled in and that would not be much non-intrusive anymore). The amount can be changed to adapt to the screen size.
3.6 - Yes, a limit can be set to the amount of messages stored in the widget. Older messages get discarded.
3.7 - Yes, user notifications (messages to the user about how to use the tools, "the edge already has a horizontal constraint") are not much relevant after the fact. If the "auto-remove" function is checked, after the "Maximum Duration" for notifications lapses, the notification disappears from the message list (from the widget). If you want to track how many times you used a tool incorrectly, you may leave it unchecked.

FAQ:
Q1. But I wanted the intrusive dialogs, are they gone?
A1. No, it depends on how the workbenches will adopt the non-intrusive notifications (those WB which decide to adopt them). The "Intrusive/non-intrusive notification framework" will provide a way to conveniently adopt the facility while allowing intrusive dialogs depending on the preferences (if the non-intrusive notifications are disabled). The Sketcher will use this framework. Those who want the blocking versions (for example for training purposes), they will be there for you.

Q2. I have a macro that produces 50 notifications in one second, what happens with the limit to the number of notifications in preferences?
A2. The first 15 (or other configured number in preferences) will appear as non-emergent on-screen, an indication appears that more notifications were received and that could not be shown. They are available for inspection in the widget.

Of course, I am sure that users will come with more questions, observations or ideas...
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: [Sketcher] Non-Intrusive Notifications

Post by GeneFC »

abdullah wrote: Sun Feb 05, 2023 12:19 am
Looks like a great start!

One peripheral issue that may be appearing is that the "General" category of Preferences is getting a bit overloaded with tabs. Several are not visible without scrolling. At least some users may not realize that those tabs are not shown.

Perhaps a split between numeric and non-numeric tabs could be considered.

Gene
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: [Sketcher] Non-Intrusive Notifications

Post by onekk »

GeneFC wrote: Sun Feb 05, 2023 2:28 am One peripheral issue that may be appearing is that the "General" category of Preferences is getting a bit overloaded with tabs. Several are not visible without scrolling. At least some users may not realize that those tabs are not shown.

Or maybe split them using some sense.

- Python Console
- Editor
- Macro
- Report View
- Output Window

Could maybe go in a separate "category"
"Panels" could be a reasonable name as some of them are grouped under this "item name" on:

View >> Panels

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
Post Reply