Skip to content

Releases: swiftDialog/swiftDialog

swiftDialog 2.4 RC 1

02 Feb 07:10
Compare
Choose a tag to compare
swiftDialog 2.4 RC 1 Pre-release
Pre-release

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

21 Jan 08:35
Compare
Choose a tag to compare
Pre-release

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)
  • --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 or max 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.

swiftDialog v2.4.0 Beta 2

16 Jan 12:32
Compare
Choose a tag to compare
Pre-release

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 becomes 123.0
  • added an option to have live validation of textfields that have a format requirement using regex.
    • Enabled with the --textfieldlivevalidation argument

swiftDialog v2.4.0 Beta 1

02 Jan 05:38
Compare
Choose a tag to compare
Pre-release

New things

  • --windowbuttons argument - shows the close, minimize and maximise/fullscreen buttons on the window
    image

  • 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:
    image

    • 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.
  • 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.

    • Example: dialog --checkbox "I Agree",enableButton1 --button1disabled
      image image
  • Initial work on a date picker #224

    • Example: --textfield "Choose a date",isdate=true
    image
    • No validation at this point in time. Just puts the selected date into the textfield.
  • A bunch of code stuff under the hood that won't be noticed but makes my life a little easier 😉

swiftDialog v2.3.3

08 Nov 00:07
78122aa
Compare
Choose a tag to compare

What's Changed

  • Enable User's Preferred Accent Colour & Fix auto Symbol Rendering by @macserv in #305
    • use colour=auto or colour=accent
  • 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 is 16)
  • 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
  • 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"
  • 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

09 Oct 23:08
Compare
Choose a tag to compare
Pre-release

What's Changed

  • Enable User's Preferred Accent Colour & Fix auto Symbol Rendering by @macserv in #305
    • use colour=auto or colour=accent
  • 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 is 16)
  • 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"
  • Fixed centreicon + image results in duplicate icon below image #302
  • Fixed Additional blank window in fullscreen mode #308

New Contributors 🎉

swiftDialog v2.3.2

31 Aug 00:20
85e07b4
Compare
Choose a tag to compare
  • All error reporting and output is now sent to stderr instead of stdout 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.
  • 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

21 Aug 08:18
ee225c6
Compare
Choose a tag to compare

No new features in this release, just fixes.

Fixes:

  • Fix issue where vector formats (PDF and SVG) 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 use AsyncImage and are safer.
  • 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 of launchctl asuser (thanks @scriptingosx, I read the blog post properly this time instead of skimming it)

swiftDialog 2.3

14 Aug 13:51
b87caf2
Compare
Choose a tag to compare

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.
  • 🚨 App domain changed from au.bartreardon.dialog to au.csiro.dialog

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

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

--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

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: and inbox: commands can now add additional lines to existing content by prepending + to the message content (plus symbol and space). usage echo "message: + <new content>" >> /<commandfile> or echo "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: and infobox: 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 uses launchctl asuser instead of sudo -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: or width: commands would cause swiftDialog to crash
  • setting button1text to none 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

10 Aug 00:09
Compare
Choose a tag to compare
Pre-release

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