Releases: swiftDialog/swiftDialog
swiftDialog 2.4 RC 1
First release candidate of v2.4.
Updates since Beta 3:
- tweaks to listitem layout
Full Changelog: v2.4.0.4746...v2.4.0.4750
swiftDialog v2.4.0 Beta 3
Updates since Beta 2:
- Fixed an issue introduced in beta 2 where SF symbols were too small when used in list items. #330
- Added "subtitle" option to listitems. #331
- Added
--resizable
as a command line argument so windows can be re-sized by the user.- using this option implies
--moveable
- macOS will initiate new windows with whatever the window size was of the previous one. Take this into account when using. (this behaviour may change before release)
- using this option implies
--windowbuttons
enables all buttons by default (the maximise/zoom button is onlt enabled if the window is resizable).- individual buttons can be selectively enabled by passing in one or more of
close
min
ormax
as an argument, e.g,--windowbuttons min
will only enable the minimise button - the
close
button now properly quits dialog instead of just closing the window.
- individual buttons can be selectively enabled by passing in one or more of
swiftDialog v2.4.0 Beta 2
Updates since Beta 1:
- adjusted icon padding when using SF symbol vs app icon/computer image #323
- fixed an indexing issue with date picker
- fixed an issue where float to string to float conversion (if/when it happens) would fail if the number format for the users locale was
1.234.567,80
(this may be an issue in swift with how CGFloat is represented as a string as regardless of locale the float is converted to a string with a period instead of a locale specific decimal point - e.g.123
becomes123.0
- added an option to have live validation of textfields that have a format requirement using regex.
- Enabled with the
--textfieldlivevalidation
argument
- Enabled with the
swiftDialog v2.4.0 Beta 1
New things
-
--windowbuttons
argument - shows the close, minimize and maximise/fullscreen buttons on the window
-
computer
is a valid option wherever icon can be used (e.g.--icon computer
). shows the visual representation of the device -
New
text=
for image sources. useful for using emoji as icons for example--icon text=🙂
-
New
color=
for--background
and--bannerimage
so you can use solid colours instead of images for those commands--background color=red
--bannerimage colour=#12a4b1
-
Added
--bannerheight
so you can specify an exact height for the banner -
json processing properly accepts numbers now so
{"width" : 450}
is acceptable (as is the current method where everything needs to be treated as a string) -
Icons used in listitems are now width limited in addition to height - this is important for sf symbol rendering so they are all the same size
-
Add Missing System Font Weights and Colors - pr #321
-
--notification
can now accept--button1action
to set a default action to take when a user clicks a notification. can be a URL or command:
- e.g.
--notification --title "<text>" --message "<text>" --button1action "open -a Safari.app"
--notification --title "<text>" --message "<text>" --button1action "https://swiftdialog.app/"
- You can specify an additional action and define the button labels :
--notification --title "<text>" --message "<text>" --button1text "Do Something" --button1action "/do/something" --button2text "Do Something Else" --button2action "/do/something/else/"
--button1action
will remain the default action if either the notification or button1 is actioned. button2action will only trigger if button2 is actioned.
- e.g.
-
Added
--hidedefaultkeyboardaction
argument. Changes the default "Return" or "Escape" keys to require cmd+shift. This helps mitigate against non-intentional dismissal of dialogs. #125 -
Added a property to non switch style checkboxes that allows them to affect button1. This is useful for terms and conditions style checkboxes where you want to disable the button until the user has agreed to the terms.
-
Initial work on a date picker #224
- Example:
--textfield "Choose a date",isdate=true
- No validation at this point in time. Just puts the selected date into the textfield.
- Example:
-
A bunch of code stuff under the hood that won't be noticed but makes my life a little easier 😉
swiftDialog v2.3.3
What's Changed
- Enable User's Preferred Accent Colour & Fix
auto
Symbol Rendering by @macserv in #305- use
colour=auto
orcolour=accent
- use
- Added titlefont and bannerimage to command file commands. #311
- Added new command
--displaylog <path>
. Will stream content sent to the file located at<path>
( @macvfx for inspiration) - Added new command
--positionoffset <num>
. Used with the--position
command lets you set the screen edge offset (distance of the dialog to the screen edges. default is16
) - Added
--eula
as a mode. Converts the message area to monospace font with background- This mode has no logic behind it and only changes the display behaviour. Accepting an EULA is the responsibility of the script author to prompt for and process any actions required. e.g.
dialog --message "https://raw.githubusercontent.com/swiftDialog/swiftDialog/main/LICENSE.md" --eula --checkbox "I agree"
with some script logic to process whether the "I Agree" checkbox was actioned
- This mode has no logic behind it and only changes the display behaviour. Accepting an EULA is the responsibility of the script author to prompt for and process any actions required. e.g.
![](https://private-user-images.githubusercontent.com/3598965/281216453-884ad250-0e87-4711-afe2-48379ee599a7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIxNjEwMDUsIm5iZiI6MTcyMjE2MDcwNSwicGF0aCI6Ii8zNTk4OTY1LzI4MTIxNjQ1My04ODRhZDI1MC0wZTg3LTQ3MTEtYWZlMi00ODM3OWVlNTk5YTcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjhUMDk1ODI1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MTBhODI0YWQ1Mjk3ZDBlOWZiMmY0NzllZjQzNTMyNjIyMWExZTRmYzk5MmJkZjZlNjc5OWFmZTZkZmQ2MTFiMyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.LmT4wX0dntXK6QkBnHwACG-eF95r1G2TGa51D3N_0PU)
- Added initial support for animated SF symbols (macOS 14 only).
- Example usage:
--icon sf=rainbow,colour=auto,animation=variable
- Limited support at this time using the following animation types:
"variable":
"variable.reversing"
"variable.iterative"
"variable.iterative.reversing"
"variable.cumulative"
"pulse"
"pulse.bylayer"
- Example usage:
- Fixed centreicon + image results in duplicate icon below image #302
- Fixed Additional blank window in fullscreen mode #308
New Contributors 🎉
swiftDialog 2.3.3 Beta 1
What's Changed
- Enable User's Preferred Accent Colour & Fix
auto
Symbol Rendering by @macserv in #305- use
colour=auto
orcolour=accent
- use
- Added titlefont and bannerimage to command file commands. #311
- Added new command
--displaylog <path>
. Will stream content sent to the file located at<path>
( @macvfx for inspiration) - Added new command
--positionoffset <num>
. Used with the--position
command lets you set the screen edge offset (distance of the dialog to the screen edges. default is16
) - Added initial support for animated SF symbols (macOS 14 only).
- Example usage:
--icon sf=rainbow,colour=auto,animation=variable
- Limited support at this time using the following animation types:
"variable":
"variable.reversing"
"variable.iterative"
"variable.iterative.reversing"
"variable.cumulative"
"pulse"
"pulse.bylayer"
- Example usage:
- Fixed centreicon + image results in duplicate icon below image #302
- Fixed Additional blank window in fullscreen mode #308
New Contributors 🎉
swiftDialog v2.3.2
- All error reporting and output is now sent to
stderr
instead ofstdout
so genuine results output is not polluted with any unrelated error or warning messages./usr/local/bin/dialog
has cleaner error handling- General error and log handling has been updated to print error and debug output to stderr
- Command file processing changes:
- Added a check of launch time which is compared against command file modification date. If the command file is older, existing commands stored within will not be processed. Fixes any issues resulting from commands from previous dialogs (like
quit:
) influencing future dialogs. - Command file processing is now less dependent on ownership or permissions. As long as the file is readable by the process running swiftDialog (usually as the console user). Errors in this department also provide more detail and output to stderr and should only occur if the file is not readable.
- Added a check of launch time which is compared against command file modification date. If the command file is older, existing commands stored within will not be processed. Fixes any issues resulting from commands from previous dialogs (like
- button1 respects
button1disabled
if centred - progress text will populate if updated by command file if dialog was launched with no progress text visible initially
isDNDEnabled()
refactored to work under macOS 12+ (thanks @ryangball). Currently not used but a future release will have some implementation that respects user preferences for Focus modes (i.e. "do not disturb") in some form.
swiftDialog 2.3.1
No new features in this release, just fixes.
Fixes:
- Fix issue where vector formats (
PDF
andSVG
) wouldn't work as an image source. #296 #295- This reverts to the previous
v2.2.1
or earlier process for displaying vector images which are not performed asynchronously. Bitmap images useAsyncImage
and are safer.
- This reverts to the previous
- Update image interpolation to
.high
(was previously.medium
). This should help when rendering bitmap images on non-retina displays. - Fix an issue where SF symbols, when used as images for list items, would appear super small
- Update help message link colours (thanks @joncrain )
- Fix
/usr/local/bin/dialog
use oflaunchctl asuser
(thanks @scriptingosx, I read the blog post properly this time instead of skimming it)
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.
![Screenshot 2023-08-10 at 9 06 14 am](https://private-user-images.githubusercontent.com/3598965/259570895-5fd6bb4a-a5b6-46c3-9fc9-7beace658420.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIxNjEwMDUsIm5iZiI6MTcyMjE2MDcwNSwicGF0aCI6Ii8zNTk4OTY1LzI1OTU3MDg5NS01ZmQ2YmI0YS1hNWI2LTQ2YzMtOWZjOS03YmVhY2U2NTg0MjAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjhUMDk1ODI1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NTgyZWYxMDQyNWJhMDlkMWM4MDAyMDVkNjNkYjhjM2I0NWYzZTJmNjYxOTMyM2JjYzFhNTg0ZTkwYzc1Yzk2MiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.9tl148wrcMxcE9kKupUCrcLwzwSGEHnpjmoNnurgv3Y)
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
![image](https://private-user-images.githubusercontent.com/3598965/255385497-92cb1603-79a2-483b-91ad-72c9aecdbc48.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIxNjEwMDUsIm5iZiI6MTcyMjE2MDcwNSwicGF0aCI6Ii8zNTk4OTY1LzI1NTM4NTQ5Ny05MmNiMTYwMy03OWEyLTQ4M2ItOTFhZC03MmM5YWVjZGJjNDgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjhUMDk1ODI1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NGU2ODk3NzBlZjgxMzBlM2YxY2NjZWQwMTQ0Yzg1M2RmZWIxNTlhMTFiMDcxYjIyMzFkMzA0OGZjZWZhMDYwMiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.HwSRHXIV0sXUM4Feaa2NgMdirWH6ksWoWGcSthLfwDc)
--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
:
![image](https://private-user-images.githubusercontent.com/3598965/255385313-53add8af-3407-4152-b374-486db664b8e9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIxNjEwMDUsIm5iZiI6MTcyMjE2MDcwNSwicGF0aCI6Ii8zNTk4OTY1LzI1NTM4NTMxMy01M2FkZDhhZi0zNDA3LTQxNTItYjM3NC00ODZkYjY2NGI4ZTkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjhUMDk1ODI1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NzRjZWIxMjcxNTljOTcyODk4M2I3MDBlMWJkNDlmYTc4ZThjYTNjZjZjYWNkNTMxNjljMmZmNGJkNmNmYjlmYSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.LvHiyU9vNDQ1Mh5T6HvTOfsahmR8ej3T2ed6MBxSGbs)
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 🙂
swiftDialog 2.3.0 Release Candidate 1
All the additional of previous beta release quirks and features with the following extra bits:
- Installer should handle the upgrade process from earlier versions to 2.3. Since the bundle id has changed this can cause macOS installer to not install directly into place.
<br>
can be used in--message
as well as in the command file for creating a line break. Equates to\n
to ensure a break is created (e.g.Line 1<br>Line 2
)--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. This means message and help alignments are no longer linked #291 - Spacing between icon and message area is now proportional to the icon size. Smaller icon, smaller space.
Pull request created #293