setup-your-mac / Setup-Your-Mac

Setup Your Mac aims to simplify initial device configuration by leveraging swiftDialog and Jamf Pro Policy Custom Events to allow end-users to self-complete Mac setup post-enrollment.
https://snelson.us/sym
MIT License
249 stars 56 forks source link

SYM `1.10.0`: Updating `title` instead of `bannertitle` #54

Closed dan-snelson closed 1 year ago

dan-snelson commented 1 year ago

Describe the bug Line 1572 currently updates title, but should most likely be updating bannertitle.

Thanks for the report, Brian Klotz!

dan-snelson commented 1 year ago

Steps to reproduce (?)

In one Terminal window, issue the following commands:

rm -v /var/tmp/dialog.log

dialog --infotext --moveable --bannerimage https://img.freepik.com/free-photo/dramatic-white-clouds-blue-sky-from-airplane-window-view-colorful-sunset-cloudscape-background_90220-1208.jpg --bannertitle "An Important Message"
Screenshot 2023-05-09 at 5 04 11 PM

In a second Terminal window, issue the following commands:

echo "bannertitle: Updated Banner Title" >> /var/tmp/dialog.log
# Observe no change

echo "message: Updated message" >> /var/tmp/dialog.log
# Observe the message is updated
Screenshot 2023-05-09 at 5 08 26 PM
echo "title: Updated Title" >> /var/tmp/dialog.log
# Observe the `bannertitle` is updated

echo "bannertitle: Updated Banner Title" >> /var/tmp/dialog.log
# Observe no change
Screenshot 2023-05-09 at 5 08 42 PM
echo "title: Updated Title 2" >> /var/tmp/dialog.log
# Observe the `bannertitle` is updated
Screenshot 2023-05-09 at 5 09 03 PM
dan-snelson commented 1 year ago

After counseling with Bart Reardon, this above behavior is "working as designed."

(Perhaps I'm looking at the wrong line in SYM.)

dan-snelson commented 1 year ago

See Bart's response.

brianhm commented 1 year ago

I'm not sure that Bart is fully understanding what the issue is. And this also applies to any of the areas where "title" is used in the "Finalise User Experience" block of code. The issue is that if you use the "title" tag it does not behave the same way as the "bannertitle" tag. If you use "title" and put \n characters in for a line break, they display as plain text and not as line breaks. If you use "bannertitle" and put the \n characters in, they display properly as line breaks.

dan-snelson commented 1 year ago

Thanks for the update, @brianhm.

dan-snelson commented 1 year ago

@brianhm:

As this is a swiftDialog-related issue, I'll close it as "not planned."

Thanks.