swiftDialog 2.3
swiftDialog 2.3
馃毃 Major Changes 馃毃
This release includes breaking changes. Please look at the following updates carefully:
- 馃毃 Minimum requirement is now macOS 12.
- macOS 11 is no longer supported
- 馃毃 Markdown UI updated to v2.1.0
- This is a biggie. The way message text is rendered is all new. As a consequence
--messagefont
currently does not support changing the font family/name and support for changing font colour will not affect all markdown blocks, e.g. code blocks and some heading styles.
- This is a biggie. The way message text is rendered is all new. As a consequence
- 馃毃 App domain changed from
au.bartreardon.dialog
toau.csiro.dialog
- You will need to update any configuration profiles for notifications to include
au.csiro.dialog
otherwise notifications may not work as you expect. - the postinstall script has some logic for performing an upgrade from previous versions to 2.3 given the bundle id change. If this failes for some reason and
Dialog.app
is not present in the/Library/Application Support/Dialog
directory, re-run the install.
- You will need to update any configuration profiles for notifications to include
New UI
Markdown Options
swiftDialog 2.3 contains a much improved markdown experience. Elements such as tables and code blocks are available
In addition, --message
and --infobox
can accept a local or remote (http) markdown file for describing content. Simply pass in the path to your markdown document (local or URL) as the argument to the message
or infobox
options.
Some notes about markdown support:
- Issue #266 is addressed but due to the way markdown is rendered and how SwiftUI behaves with selections across views, selecting text only works within a single paragraph/block.
- Inline images to local sources is not supported #196
- Inline images support markdown
![image](https://path.to/image.png)
formatting but not<img src="https://path.to/image.png>
at this time.
--buttonstyle
- Configure how the button area is displayed
Only option so far is for centred
(or centered)
Positions button 1 (optionally also button 2) in the centre of the button area at the bottom of the dialog window
NOTE: When using this mode, --timer
and --infobutton
are not available
--style
- Configure a pre-set window style
Changes the default values to alter how a dialog is displayed.
馃挜 Styles other than --mini
have no special attributes and the visual appearance can be acheived by using the various arguments to set window properties.
馃挜 centered
, alert
and caution
will use the value from --title
and add it as a heading to the message area and then disable the title. This places the title underneath the centre displayed icon.
"mini" is functionally equavelent to --mini
"centered" will set all the options for centered content
"alert" sets a pre-configured dialog window 300x300 and centered content
"caution" and "warning" are the same as "alert" with the icon configured
Example of dialog --style alert
:
This is the equavelent of typing:
dialog --title none --iconsize 80 --message "### An Important Message \n\nThis contains important message content\n\nPlease read" --messagealignment centre --buttonstyle centre --centreicon --width 300 --height 300
Behaviour of --ontop
with --blurscreen
and existing dialog windows
If an existing dialog is present with --blurscreen
active, using --ontop
will cause subsequent dialogs to appear above the blur layer. This allows for running a background dialog and launch additional dialogs and have them visible. It should be noted that if you plan to interact with these dialogs programatically, ensure you use unique command files for each.
Authoris(z)ation 馃攼
swiftDialog can now optionally look for a authorisation key and if present will require it to run.
Expanded details of how this operates are available in the wiki
Other Changes
- Info box content is correctly constrained to the sidebar area if there is more content that can be displayed. Previously it would continue into the button area and off the end of the dialog window.
- Processing of images (local, http) is now performed asynchronously which should result in better performance. For slow loading resources, you may see a blank placeholder image before the image loads. maybe fixes #235 and #208. #167 was also fixed in an earlier release but gets an honourable mention.
- Under the hood processing of lists, drop downs and textfields have been removed from the main app state. This should give a bit of a performance boost when a lot of user content (particularly if there are one or more dropdowns with a lot of content) (#233)
- File select can now select folders (type=folder) (#273)
- Text spacing in the message area has been increased from 1.0 to 1.3 (#278)
- Spacing between user input types has been adjusted (#277)
- Spacing between icon and message area is now proportional to the icon size. Smaller icon, smaller space.
- Setting icon to "none" no longer disables the info box (#272)
message:
andinbox:
commands can now add additional lines to existing content by prepending+
to the message content (plus symbol
andspace
). usageecho "message: + <new content>" >> /<commandfile>
orecho "infobox: + <new content>" >> /<commandfile>
<br>
can be used in--message
for creating a line break. Equates to\n
to ensure a break is created (e.g.Line 1<br>Line 2
)message:
andinfobox:
commands can also accept<br>
to specify a newline instead of trying to do the "escape newline characters" dance (#270).- Issues where text fields sometimes do not appear to be selectable at launch should be fixed (various reports and maybe #279)
- swiftDialog version is now written to
/Library/Application Support/Dialog/postinstall.log
#280 (also an undocumented and untested feature for the curious) - added
--key
and--checksum
arguments - added
position:
as a command file command (e.g.position: topleft
) /usr/local/bin/dialog
now useslaunchctl asuser
instead ofsudo -u
which should make user environment stuff happier (e.g. copy and paste)- built in help has been updated to include new features
- fixed an issue where sending
height:
orwidth:
commands would cause swiftDialog to crash - setting
button1text
tonone
will hide button 1. Note that this also disables the use of[return]
to close a dialog. - if
progresstext
is not present the text area for it will not be rendered. This allows for tighter spacing of the progress bar to the bottom of the dialog window if progress text is not required. If progresstext will be needed, initiate with--progresstext " "
to avoid visible UI layout changes. --image
and--message
can be used together. Images are displayed prior to the message (no UI element ordering at this stage) #194- Added
--helpalignment
argument. Same as--messagealignment
but only affects the help message. - played musical chairs with code layout.
- pkg certificates have a much longer expiry date.
Known Issues and other behaviour
--builder
remains in an alpha/experimental state. Not all options are available and some may operate in unexpected ways or not at all--bannerimage
may not fill the entire top of the dialog if the banner width to height ratio is too high- Dynamically updating content or dialog size from the command file that adds or removes elements may not result in the UI rendering the same as it would if the dialog was built with those arguments from the outset. for example, replacing a short message with a longer one may result in message truncation with no way to scroll if other elements are present on screen. Replicating this behaviour is a cause for celebration and you should create an issue demonstrating how to replicate.
- Not an issue as such but a reminder in case you missed it above, Asynchronous loading of images means you may see a placeholder until a remote resource is loaded. This is normal.
- In the theme of the previous point,
--messagefont
does not support changing the font family/name as a result of the upgrade in the markdown framework. There is no plan to rectify this. Apologies to #283
馃悶馃悰 Software has bugs. Some of then are undocumented. If you can assist, please do so by documenting an issue with steps to reproduce 馃檪