* [Core] Visual improvements to notifications
- Notification title was previously missing; it's back!
- Fixed window and label backgrounds to be correctly/consistently transparent.
The click-thru bit is only partially working (transparent areas are click-thru).
* [Core] Reduce notification font size to avoid wrapping
Now that titles work, I noticed a few notification titles were wrapping. Examples:
- System Discovery Complete (from Evaluator)
- Minimum Distance Reached (from BioInsights)
To address, I made the following adjustments:
* Made the test notification title longer by adding the word "Popup" so it is now "Test Popup Notification".
* Reduced the Title font size to 20 (from 24).
* Moved the content box up to close the gap a bit.
* [Core] Exclude the notification popup colour picker button from themes
Noticed it was not the colour it should be and thought the setting was always being reset -- turns out the setting was correct, the button colour was not.
Here's a quick hack to fix.
* [Core] Further notification title tweaking
Now "System Discovery Complete" *actually* fits.
* [Core] Widen the native pop-up font selector so you can see variants
The previous width was a little bit narrow for the family of fonts like Segoe UI Variable...
The new width is 2x the original size and fits all fonts on my system and should do the trick for the moment.
This proposes a *new method* on IObservatoryCore: `SetGridItems(worker, items)` which does 2 things:
* Clears the grid
* Adds the given items.
Effectively replaces the entire content of the grid -- which is something a handful of plugins now do.
Why add this when you could just call Core's Clear + AddGridItems methods?? So it can all be done within the same rendering suppression "scope" to reduce flickering and increase rendering speed. Speaking of rendering suppression, I have implemented such rendering suppression "scope" which uses Listview's built-in Begin/EndUpdate() in combination with temporary removal of the sort comparer (as is done for read-alls). This was also applied to the existing AddGridItems(worker, items) method as well, addressing a TODO.
Pre-reading is good. And turns out a number of plugins kinda depend on it now. Time to make it default.
Also, comment out settings upgrades so settings are carried over from version to version when running in the IDE -- which makes using it far better.
Just shuffled code within conditional compiler directives because when publishing, it seems "RELEASE" is not set. This ensures in the non PORTABLE case, the default path is set.
(Discovered while testing my publishing script with signing.)
Add checkboxes to the PluginList which allow you to enable/disable each plugin on-the-fly (it will no longer respond to events, but you can still configure it, etc.). These settings are preserved in a new Core setting. Also enabled full-row select for easier selection in the listview.
Also increased the height of the PluginList slightly. (Personally, I'd like it even taller.)
Also made slight sizing adjustments to the plugin tabs, which now show 3 letters when collapsed and has a bit of extra space so the longest one does not get cut-off when selected/bolded. Furthermore, the list of plugins is now sorted alphabetically.
Finally, set the plugin listview Dock = Fill (vs. Anchored). This seems to have fixed the listview resize problem I was experiencing.
* [Core] Settings improvements: Grouping w/labels, support for doubles
Layout improvements:
* Plugins can set `[SettingSuggestedColumnWidth(123)]` on a settings class to adjust the settings view column width to make it wider or narrower to fit things nicely.
* Plugins can set `[SettingNewGroup("label")]` on any setting property to force a "new paragraph", or group, of settings. If "label" is also provided, a grouping header with that text will also be created.
* A double precision up/down numeric control has been added. In support of this, there is now a precision value on the existing `[SettingNumericBounds]` attribute to specify the number of digits of precision the control displays/allows.
Plugins:
* The above have been applied/demonstrated on the Botanist and Explorer plugin settings.
This will allow notifications to be sent to Notification listeners during read-all to enhance testability.
This is controlled by the `DEBUG` compiler directive, so Release versions will not have this behaviour.
However, Herald, being a plugin itself, should ignore these otherwise the results are.... unfortunate. #askmehowiknow
CarrierJump w/ OnFoot is needed for many location tracking things -- ATTN MattG as this is causing problems with BioInsights.
I'm requesting Statistics for use by StatsScanner.
After populating the list of plugins, auto-size the columns once. In the Resize event handler, do what you did before but account for the scrollbar width too. Prevents horizontal scrollbar appearing except for really fast resize movements.
I didn't try it yet with fewer than a scrollable # of plugins yet.
This cleans up my commented out code from #128.
Polishing a few rough edges:
* Enable scrolling on the Plugin List view. It only fit 6 or 7. I have 13.
* I fiddled a bit with column auto-sizing (left it commented out, see comment).
* A whole bunch of tweaks to the settings view:
* first row of controls was cut off at the top (under the window title bar)
* fixing that revealed uneven spacing between columns
* action buttons were teensy tiny and unreadable
* settings view columns were too narrow (200 px).
* added some spacing to help with readability
* settings windows now start in center of current screen rather than some random place.
Add a try-catch in ReadAllLines to handle a read failure if a file is locked.
Add a check for a non-existing export folder when exporting and prompt for new path if it doesn't exist.
* Implement click-through windows for X11
* Adjust the "platform specific" comment
* Get rid of accidental whitespace
* Move else declaration into next line
For plugin developers: Adds a new method to the IObservatoryCore interface to add multiple grid items in 1 call -- which only invokes the UI thread once (and potentially only scrolls to bottom once) providing a small performance improvement and providing some modest convenience.
I've had this occur a number of times (twice in a row yesterday) where if you receive new records while doing a long read-all, this exception crashes ObsCore.
So may need some further digging, but in the meantime, it won't crash here.
Tab separated output facilitates much more efficient opening of exported content in a spreadsheet for further data analysis, furthermore, it vastly reduces file size at the cost of human-readability. However, for the spreadsheet junkies among us, this is a welcome option.
To complement this, there is now an "Export Options" expander in the Core settings panel. Here one can select their preferred export style (default remains Fixed width) and now one can pre-select the export folder.
With this change, clicking export *will not* prompt for an export folder if one is already set. It will simply immediately export data.
Enjoy!
The recently updated avalonia seemed to change behavior in a way that caused notifications to steal focus from the game (often at at inopportune times). Not all users experienced this.
Symptoms: App takes a very long time to start up, sluggish response to events because it's reading and processing every ancillary file 10x instead of just once when successful.
* Add file association for .eop, prompt for install dir
* Handle .eop or .aip file passed as arg.
* VS2022 version bump
* Filter neutron stars and black holes from fast spinning criteria.
* Adjustments for new "high value" check
* Refactor herald cache
* Fix element order and namespaces for voice moods.
* Add explicit .Stop() between audio player calls.
* Use nullsafe member access instead of skipping
* Don't queue up a title that's already queued.
* Improve body ordinal handling for explorer speech titles.
* Escape strings being inserted into xml
* Handle flip-flopping JSON type
* Converter for flip-flopping property type
* Use the converter
* Escape characters *before* we wrap it in xml.
* Give Eahlstan his clear button. :D
* Exclude all stars from fast rotation check.
* Close outstanding popup notifications on exit.
* TO DONE
* [Herald] Suppress duplicate notification titles for spoken notifications
If you have notifications from multiple plugins producing notifications with the same title in quick succession (ie. "Body A 1 e" from both Explorer and BioInsights), the title on successive notifications will not be spoken again to save the breath of our friendly Azure speakers.
* Doc update
* Remove unintended member hiding
* Fix export errors when exporting BioInsights data, cleanup
Discovered a couple issues with exporting BioInsights data resulting from using two different types of objects in the data grid; improved error handling as well.
Also cleaned up some old-style read all code.
* Add read-all on launch setting
* Updated framework xml
* Improve high-value body description text
Co-authored-by: Fred Kuipers <mr.fredk@gmail.com>
* WIP: Grid export and plugin extraction
* Tweak export process
* Check for recursion of the same assembly load.
* Individual screens aren't always primary?
* Wait for cache to be writable
* Export selection only.
* Update built xml docs
* Ignore invalid archives.
* Need to ensure task is started.
* Expose core error logger to plugins and report custom criteria errors
Fixes#77
This adds an error logging method on the IObservatoryCore interface that writes the exception details to ObservatoryCore's central error log (found in `${Documents}/ObservatoryErrorLog.txt`). In addition, added a timestamp to each error log.
Also updates the Explorer to report Custom Criteria file load errors and execution errors to the log. Also updates HeraldNotifier to report CacheIndex.json parse failures to the error log as well.
* Expand debugging/error logging in Herald; cleanup empty mp3 files
Herald crashes if attempting to play 0-byte mp3s so if detected, delete, re-request (empty files can occur in some azure failure cases (ie. out of quota). Trap and log errors in other places in HeraldQueue to avoid hard crashes due to weird and wonderful unexpected stuff.
* Add speech rate setting
* Add volume slider
* New speech manager skeleton
* User API key from resx
* Implement voice list retrieve via new api
* Rewrite to use ObAPI, remove all dependancies
* Use volume setting
* Clean up using statements
* Volume and timing adjustments
* Lookup rate value
* Use numeric rates for tighter spread
* Manage plugin data folder via core interface
* Add check that nullable settings are not null.
* Get file size before it's deleted.
* Improve old settings migration.
* Ignore cache sizes below 1MB
* Re-index orphaned files in cache, purge legacy wav files.
* Call top level error logging for native voice exception.
* Async title and detail requests to remove pause
* Remove NetCoreAudio use of temp files.
* Remove orphan using.
Random occurrence triggered by a plugin's grid update. It's either fairly rare (related to something I was doing in-app) or new with a recent update to the plugin that caused it (just updated it last night).