<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Happy &#8211; Wade Tregaskis</title>
	<atom:link href="https://wadetregaskis.com/tags/happy/feed/" rel="self" type="application/rss+xml" />
	<link>https://wadetregaskis.com</link>
	<description></description>
	<lastBuildDate>Tue, 24 Sep 2024 18:03:21 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://wadetregaskis.com/wp-content/uploads/2016/03/Stitch-512x512-1-256x256.png</url>
	<title>Happy &#8211; Wade Tregaskis</title>
	<link>https://wadetregaskis.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">226351702</site>	<item>
		<title>presentedWindowStyle is not windowStyle</title>
		<link>https://wadetregaskis.com/presentedwindowstyle-is-not-windowstyle/</link>
					<comments>https://wadetregaskis.com/presentedwindowstyle-is-not-windowstyle/#respond</comments>
		
		<dc:creator><![CDATA[]]></dc:creator>
		<pubDate>Mon, 23 Sep 2024 23:12:29 +0000</pubDate>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Feedback Assistant]]></category>
		<category><![CDATA[Happy]]></category>
		<category><![CDATA[presentedWindowStyle]]></category>
		<category><![CDATA[SwiftUI]]></category>
		<category><![CDATA[Undocumented]]></category>
		<category><![CDATA[windowStyle]]></category>
		<guid isPermaLink="false">https://wadetregaskis.com/?p=8460</guid>

					<description><![CDATA[This post is mostly to herald a pretty good Apple bug report response, which as we know is a too-rare event. But it might also help others with this confusing SwiftUI API. What&#8217;s the difference between presentedWindowStyle(_:) and windowStyle(_:)? Well, one does something, the other doesn&#8217;t, basically. I tried using the former, and observed that&#8230; <a class="read-more-link" href="https://wadetregaskis.com/presentedwindowstyle-is-not-windowstyle/" data-wpel-link="internal">Read more</a>]]></description>
										<content:encoded><![CDATA[
<p>This post is mostly to herald a pretty good Apple bug report response, which as we know is a too-rare event.  But it might also help others with this confusing SwiftUI API.</p>



<p>What&#8217;s the difference between <code><a href="https://developer.apple.com/documentation/swiftui/view/presentedwindowstyle(_:)" data-wpel-link="external" target="_blank" rel="external noopener">presentedWindowStyle(_:)</a></code> and <code><a href="https://developer.apple.com/documentation/swiftui/scene/windowstyle(_:)" data-wpel-link="external" target="_blank" rel="external noopener">windowStyle(_:)</a></code>?</p>



<p>Well, one does something, the other doesn&#8217;t, basically.</p>



<p>I tried using the former, and observed that it never has any effect.  I filed FB14892608 about it, a month ago.  While the long delay isn&#8217;t great, the response I got today was actually pretty helpful:</p>



<pre class="wp-block-preformatted">We’re sorry you ran into trouble with that API.<br><br>To adjust the style of a window group’s windows, you have a couple of options. If all of the windows in the group should have the same style, then using the windowStyle() scene modifier is what you want:<br><br>struct MyApp: App {<br>    var body: some Scene {<br>        WindowGroup {<br>            ContentView()<br>        }<br>        .windowStyle(.hiddenTitleBar)<br>    }<br>}<br><br>If you need to adjust the style on an individual basis using state for that window, there are also some related view modifiers:<br>struct MyApp: App {<br>    var body: some Scene {<br>        WindowGroup {<br>            ContentView()<br>                .toolbar(removing: .title)<br>                .toolbarBackgroundVisibility(.hidden, for: .windowToolbar)<br>        }<br>    }<br>}</pre>



<p>A simple apology followed by clear and specific instructions on how to actually achieve what I wanted.  I genuinely applaud Apple &#8211; or perhaps I should more specifically thank the individual(s) within DTS that actually provided this response.  Either way, it was a very pleasant surprise.</p>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-dots"/>



<p>Now, it still leaves unanswered the question of what <code>presentedWindowStyle(_:)</code> is supposed to be for, and in what situations it actually <em>does</em> anything.  So not a perfect reply, per se, but really the proper solution for that is either:</p>



<ol style="list-style-type:upper-alpha" class="wp-block-list">
<li>Fix the API to not have such confusingly similar modifiers.</li>



<li>Improve the documentation to:
<ul class="wp-block-list">
<li>Explicitly point out the other, similarly-named modifier.</li>



<li>Distinguish them.</li>
</ul>
</li>
</ol>



<p>Currently the documentation is just:</p>



<figure class="wp-block-pullquote"><blockquote><p>Sets the style for windows created by this scene.</p><cite><a href="https://developer.apple.com/documentation/swiftui/scene/windowstyle(_:)" data-wpel-link="external" target="_blank" rel="external noopener"><code>windowStyle(_:)</code> documentation</a></cite></blockquote></figure>



<p>Versus:</p>



<figure class="wp-block-pullquote"><blockquote><p>Sets the style for windows created by interacting with this view.</p><cite><a href="https://developer.apple.com/documentation/swiftui/view/presentedwindowstyle(_:)" data-wpel-link="external" target="_blank" rel="external noopener"><code>presentedWindowStyle(_:)</code> documentation</a></cite></blockquote></figure>



<p>The latter might <em>technically</em> convey something important here, in the <em>created by interacting with this view</em> part, but so much in SwiftUI is modifiers stuck haphazardly in weird and arbitrary places, that I&#8217;m been conditioned to ignore the fact that I&#8217;m often applying modifiers to views that don&#8217;t actually affect those views.  And for all I know in SwiftUI parlance views <em>do</em> &#8220;create&#8221; and/or &#8220;interact&#8221; with their parent windows (a <em>lot</em> about SwiftUI is backwards, part of its nature as a declarative API).</p>



<p>Especially if that&#8217;s the first candidate API you stumble across, when searching for a way to style a window, it&#8217;s very easy to presume it&#8217;s the right API.  Why would there be <em>multiple</em> APIs for styling the window; why would you continue searching after finding one?</p>



<p>Similarly, the <code>presentedWindowStyle(_:)</code> variant is the <em>only</em> one that appears in Xcode&#8217;s auto-complete if you try to add the modifier to your main view, which is both where you sometimes <em>have</em> to add window-level modifiers and also just a really easy mistake to make (instead of adding the modifier to the <code><a href="https://developer.apple.com/documentation/swiftui/windowgroup" data-wpel-link="external" target="_blank" rel="external noopener">WindowGroup</a></code>, one indentation level up).</p>



<p>Lastly, it doesn&#8217;t help that I can&#8217;t find <em>any</em> situation in which <code>presentedWindowStyle(_:)</code> has any effect, even knowing it&#8217;s not intended to style the parent window. One might assume it&#8217;s somehow related to sheets or somesuch, but apparently not? Presumably I&#8217;m overlooking some use-case &#8211; or maybe it <em>doesn&#8217;t</em> actually do anything on macOS, only iDevices? I welcome clues or tips.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://wadetregaskis.com/presentedwindowstyle-is-not-windowstyle/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">8460</post-id>	</item>
		<item>
		<title>Sync Now</title>
		<link>https://wadetregaskis.com/sync-now/</link>
					<comments>https://wadetregaskis.com/sync-now/#comments</comments>
		
		<dc:creator><![CDATA[]]></dc:creator>
		<pubDate>Fri, 26 Jul 2024 22:05:22 +0000</pubDate>
				<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[Happy]]></category>
		<category><![CDATA[iMessage]]></category>
		<category><![CDATA[Sync Now]]></category>
		<guid isPermaLink="false">https://wadetregaskis.com/?p=8317</guid>

					<description><![CDATA[I&#8217;m very glad Apple&#8217;s Messages team somehow snuck this one little button past the corporate bureaucracy (Apple infamously likes to pretend their software is infallible and therefore doesn&#8217;t need things like useful error messages or rectification tools). It&#8217;s of course not great that iMessages don&#8217;t reliably sync between Apple devices to begin with, but at&#8230; <a class="read-more-link" href="https://wadetregaskis.com/sync-now/" data-wpel-link="internal">Read more</a>]]></description>
										<content:encoded><![CDATA[<div class="wp-block-image">
<figure class="alignright size-full"><img decoding="async" width="262" height="148" src="https://wadetregaskis.com/wp-content/uploads/2024/07/sync-now-love.avif" alt="A macOS button labelled &quot;Sync Now&quot; surrounded by love hearts." class="wp-image-8316" srcset="https://wadetregaskis.com/wp-content/uploads/2024/07/sync-now-love.avif 262w, https://wadetregaskis.com/wp-content/uploads/2024/07/sync-now-love-256x145.avif 256w, https://wadetregaskis.com/wp-content/uploads/2024/07/sync-now-love@2x.avif 524w" sizes="(max-width: 262px) 100vw, 262px" /></figure>
</div>


<p>I&#8217;m very glad Apple&#8217;s Messages team somehow snuck this one little button past the corporate bureaucracy (Apple infamously likes to pretend their software is infallible and therefore doesn&#8217;t need things like useful error messages or rectification tools).</p>



<p>It&#8217;s of course not great that iMessages don&#8217;t reliably sync between Apple devices to begin with, but at least there&#8217;s a simple way to fix that when it occurs.</p>



<p>In case you&#8217;re unfamiliar with it, this button is in the &#8220;iMessage&#8221; tab of the Messages Settings &#8211; although placed dangerously close to the &#8220;Sign Out&#8221; button. 🤨</p>
]]></content:encoded>
					
					<wfw:commentRss>https://wadetregaskis.com/sync-now/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			<media:content url="https://wadetregaskis.com/wp-content/uploads/2024/07/sync-now-love.avif" medium="image" />
<post-id xmlns="com-wordpress:feed-additions:1">8317</post-id>	</item>
		<item>
		<title>Mail &#038; Preview working together</title>
		<link>https://wadetregaskis.com/mail-preview-working-together/</link>
					<comments>https://wadetregaskis.com/mail-preview-working-together/#respond</comments>
		
		<dc:creator><![CDATA[]]></dc:creator>
		<pubDate>Fri, 09 Feb 2024 23:06:27 +0000</pubDate>
				<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[Apple Mail]]></category>
		<category><![CDATA[Apple Preview]]></category>
		<category><![CDATA[dialog]]></category>
		<category><![CDATA[Happy]]></category>
		<category><![CDATA[macOS]]></category>
		<category><![CDATA[PDF]]></category>
		<guid isPermaLink="false">https://wadetregaskis.com/?p=7685</guid>

					<description><![CDATA[It&#8217;s the little things that sometimes impress me the most. Like when this dialog appeared: …after I&#8217;d filled out a form PDF that was emailed to me. It had exactly the option I wanted first and foremost, to send the completed PDF back to the sender. Sure, manually digging up the completed PDF from disk&#8230; <a class="read-more-link" href="https://wadetregaskis.com/mail-preview-working-together/" data-wpel-link="internal">Read more</a>]]></description>
										<content:encoded><![CDATA[
<p>It&#8217;s the little things that sometimes impress me the most.  Like when this dialog appeared:</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img fetchpriority="high" decoding="async" width="372" height="450" src="https://wadetregaskis.com/wp-content/uploads/2024/02/Save-Changes-dialog-for-PDF-form-related-to-an-email-message.webp" alt="Screenshot of a macOS dialog saying: &quot;Do you want to save the changes made to the document &quot;Waste Disposal Forms requiring signatures copy&quot;, with the buttons: &quot;Reply to lora…&quot;, &quot;New Mail Message&quot;, &quot;Save&quot;, and &quot;Cancel&quot;." class="wp-image-7686" srcset="https://wadetregaskis.com/wp-content/uploads/2024/02/Save-Changes-dialog-for-PDF-form-related-to-an-email-message.webp 372w, https://wadetregaskis.com/wp-content/uploads/2024/02/Save-Changes-dialog-for-PDF-form-related-to-an-email-message-212x256.webp 212w, https://wadetregaskis.com/wp-content/uploads/2024/02/Save-Changes-dialog-for-PDF-form-related-to-an-email-message@2x.webp 744w" sizes="(max-width: 372px) 100vw, 372px" /></figure>
</div>


<p>…after I&#8217;d filled out a form PDF that was emailed to me.  It had exactly the option I wanted first and foremost, to send the completed PDF back to the sender.</p>



<p>Sure, manually digging up the completed PDF from disk and dragging it into a Mail Compose [Reply] window isn&#8217;t <em>hard</em>, but it just feels so <em>thoughtful</em> when the system saves me the effort.  Knowing that someone, somewhere, actually thought through how Mail &amp; Preview might be used, and thought enough of their users to go to the trouble of implementing this.</p>



<p>Kudos to whomever was behind this sweet little feature.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://wadetregaskis.com/mail-preview-working-together/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://wadetregaskis.com/wp-content/uploads/2024/02/Save-Changes-dialog-for-PDF-form-related-to-an-email-message.webp" medium="image" />
<post-id xmlns="com-wordpress:feed-additions:1">7685</post-id>	</item>
		<item>
		<title>A perfect little feature: Universal Clipboard</title>
		<link>https://wadetregaskis.com/a-perfect-little-feature-universal-clipboard/</link>
					<comments>https://wadetregaskis.com/a-perfect-little-feature-universal-clipboard/#respond</comments>
		
		<dc:creator><![CDATA[]]></dc:creator>
		<pubDate>Thu, 01 Feb 2024 19:27:48 +0000</pubDate>
				<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[AirDrop]]></category>
		<category><![CDATA[AirPlay]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Apple Watch Unlock]]></category>
		<category><![CDATA[Continuity]]></category>
		<category><![CDATA[Happy]]></category>
		<category><![CDATA[SMS Forwarding]]></category>
		<category><![CDATA[Universal Clipboard]]></category>
		<guid isPermaLink="false">https://wadetregaskis.com/?p=7639</guid>

					<description><![CDATA[Perhaps in karmic balance of my previous post critical of one of Apple&#8217;s APIs, I want to highlight an Apple OS feature that I use every day, that ironically is so simple, obvious, and reliable that I almost never stop to appreciate it. Universal Clipboard basically just means you can copy something on one device&#8230; <a class="read-more-link" href="https://wadetregaskis.com/a-perfect-little-feature-universal-clipboard/" data-wpel-link="internal">Read more</a>]]></description>
										<content:encoded><![CDATA[
<p>Perhaps in karmic balance of <a href="https://wadetregaskis.com/bad-api-example-filemanagers-urlforinappropriateforcreate/" data-wpel-link="internal">my previous post</a> critical of one of Apple&#8217;s APIs, I want to highlight an Apple OS feature that I use every day, that ironically is so simple, obvious, and reliable that I almost never stop to appreciate it.</p>



<p><a href="https://support.apple.com/en-us/102430" data-wpel-link="external" target="_blank" rel="external noopener">Universal Clipboard</a> basically just means you can copy something on one device and paste it on another, as long as they&#8217;re physically near each other and signed into the same Apple ID.  <a href="https://www.youtube.com/watch?v=XSNqTgd9SXU" data-wpel-link="external" target="_blank" rel="external noopener">There is no step 3</a>.</p>



<p>It&#8217;s such a beautiful feature, in concept and execution.  Admittedly most of the time I use it merely to shuffle authentication codes from my iPhone to my Mac, but still &#8211; I love not having to temporarily memorise arbitrary numbers and then type them in manually.</p>



<p>I think what really elevates it to perfection is that <em>it works</em>.  It sounds like such a vapid point, but it really makes all the difference.  Nominally Universal Clipboard is just one of a family of similar features, under the <a href="https://support.apple.com/en-au/102426" data-wpel-link="external" target="_blank" rel="external noopener">Continuity</a> moniker, but it&#8217;s the only one that actually works reliably and predictably.  <em>The only one!</em></p>



<p>Many of the other Continuity features are similarly great in concept, but just don&#8217;t work reliably.  <a href="https://support.apple.com/en-us/102545" data-wpel-link="external" target="_blank" rel="external noopener">SMSes</a> sometimes don&#8217;t sync to my Macs.  <a href="https://support.apple.com/en-au/102661" data-wpel-link="external" target="_blank" rel="external noopener">AirPlay</a> sometimes just won&#8217;t connect, or the video quality is comically bad.  <a href="https://support.apple.com/en-us/102442" data-wpel-link="external" target="_blank" rel="external noopener">Unlocking my Macs with my Watch</a> is a guessing game as to whether it feels like working today.  <a href="https://support.apple.com/en-kz/guide/mac-help/mh35868/mac" data-wpel-link="external" target="_blank" rel="external noopener">AirDrop</a> is so fussy and unreliable that it actually gives me anxiety if I even think of using it.</p>



<p>I wish Apple&#8217;s products had more features like Universal Clipboard.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://wadetregaskis.com/a-perfect-little-feature-universal-clipboard/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			<media:content url="https://wadetregaskis.com/wp-content/uploads/2024/02/Universal-Clipboard.webp" medium="image" />
<post-id xmlns="com-wordpress:feed-additions:1">7639</post-id>	</item>
	</channel>
</rss>
