Releases: swiftDialog/swiftDialog
swiftDialog 2.5 Beta 2
Fixes:
- Fixed issue where checkboxes were not being appended to the correct array if configured via json. thx @joncrain
- Fixed issue where
name=
property was not being properly picked up for either selectitems or checkboxes when specified with json - Add updated carousel timer. can be disabled with
--hidetimer
#366 - Fixed issue where using timer and hidetimerbar parameters disables the button entirely #368
- Fixed issue where using small dialog window with hidden timer is cutting button text short #355
swiftDialog 2.5 Beta 1
New
Presentation Mode
--presentation
Presentation mode is a display only mode that can be used as a richer display of content during background processes. The window is divided into roughly one third info area and two thirds content area with a progress bar underneath. Presentation mode is intended to be used in conjunction with a command file for receiving updates.
The info area can display one of:
- An
--infobox
text view, coloured background and icon didplay. - One or more images that can be commanded to transition through available images using
--autoplay
- A web view
The content area can display either:
- Any
--message <text>
in any of the supported forms. - One or more
--listitem <item>
in any of the supported forms.
The footer of the window is always visible and dedicated to a full width progress bar and buttons.
Custom View Ordering #143
--vieworder <csv>
With the exception of Images and message content, window elements can be re-ordered.
The default order is textfile, webcontent, listitem, checkbox, textfield, radiobutton, dropdown. This can now be re-arranged to suit display needs, e.g. --vieworder "dropdown, textfield, checkbox"
"Stack" style for buttons - @jonesiscoding
--buttonstyle stack
Displays button 1 and button 2 in a full width stack.
Built in variables #362
swiftDialog now contains built in variables that will populate with host specific info. Include into your text strings as {variablename}
The included variables are:
{computername} - hostname of the computer
{computermodel} - computer model, e.g. "Mac mini (2023)"
{serialnumber} - serial number
{username} - current username, e.g. `johndoe`
{userfullname} - full name, e.g. `John Doe`
{osversion} - macOS version, e.g. `14.4.1`
{osname} - macOS name, e.g. `Sonoma`
Any environment variables are also accessable in this way
Set alternate name for user input fields
User input fields like textfield, checkbox and selectitem have an additional modifier name=<text>
. This allows for expressive labels with easy to parse names in the output.
e.g.
--textfield "What is your favourite colour?",name=colour
will return the output
colour : <value>
Other fixes
- The image carousel has been replaced with an updated image processing view. Images fade into view and the "time until next image" progress indicator has been removed.
- Sending multiple notifications now causes notifications to stack in notification centre instead of only displaying the last notification #356
- Added support for
prompt=
to secure fields - Window title value is now set. This wasnt used previously but if using
--windowbuttons
and the dialog window is minimised, the correct window title is displayed on hover in the Dock - Fixed an issue when using
--timer
and--button1text
would not cause the button to be disabled for the first three seconds in contrast to the documented behaviour #363 - Any data entered into user entry fields is output to stdout regardless what button is pressed, not jsut on a successful exit
Known Issues
- Sending message or image updates to a dialog in presentation mode may have undesirable effects. This will be fixed in a future release.
swiftDialog 2.4.2
Bug fixes:
- Fixed an issue where sending
height
orwidth
commands to the command file would cause the app to quit #351 - Fixed the warning message that is sent to stderr when notifications are not available to only occur when
--notification
is specified.
swiftDialog 2.4.1
Update release
Fixes:
- listitem spacing should be back to how it appeared pre 2.4.0 #345
- dialog windows should display properly on all spaces, including fullscreen apps when using
--ontop
- when using a blank or null
--message ""
, it should now be blank and not default to the boilerplate text - images used in notifications (when specified with
--icon
which gets attached as an image) should work again - notifications can now trigger the default notification sound with
--enablenotificationsounds
- notification with a single action will now show the button label on hover
swiftDialog 2.4.1 Beta 1
Fixes:
- listitem spacing should be back to how it appeared pre 2.4.0 #345
- dialog windows should display properly on all spaces, including fullscreen apps when using
--ontop
- when using a blank or null
--message ""
, it should now be blank and not default to the boilerplate text - images used in notifications (when specified with
--icon
which gets attached as an image) should work again - notifications can now trigger the default notification sound with
--enablenotificationsounds
- notification with a single action will now show the button label on hover
SwiftDialog 2.4.0
New features
Notifications
-
--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/"
-
Additionally, You can specify an additional action and define 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.
List Items
-
Added "subtitle" option to listitems.
Listitems can now have a subtitle. This expands the space used by all listitems and allows for up to 2 lines of additional descriptive text.
--listitem "Some Item Title",subtitle="Some Item subtitle with additional details"
Advanced example courtesy of @dan-snelson and Setup Your Mac
Window Controls
-
New
--windowbuttons
argument - shows the close, minimize and maximise/fullscreen buttons on the window- This enables all buttons by default (the maximise/zoom button is only enabled if the window is also 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
-
New
--resizable
option which enables the window to be resizable by clicking and dragging the window corners.- Using this option implies
--moveable
- NOTE: macOS will initiate new rezizable windows with the same window dimentions as the last run swiftdialog window. i.e. if a dialog has dimentions 800x600 when it is closed and a new resizable dialog is launched, it will also have dimentions 800x600 regardless of what
--width
or--height
options are specified. Take this behaviour into account when using this option.
- Using this option implies
Other New Features
-
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
-
New
--bannerheight
to specify an exact height for the banner -
Add Missing System Font Weights and Colors - pr #321
-
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.
-
Added basic support for a date picker #224
- Example:
--textfield "Choose a date",isdate=true
- NOTE: There is no date validation at this point in time. This capability simply puts the selected date into the textfield.
- Example:
-
Added an option to have live validation of textfields that have a format requirement using regex.
- Enabled with the
--textfieldlivevalidation
argument
dialog --textfield "Enter in 4 numbers",regex="^\d{4}$" --textfieldlivevalidation
- Enabled with the
Fixes
-
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
-
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
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 😉