- Set the highlighted text color on labels in table cells. This will be used
for both the highlight and selected states automatically. (And since it is
used for both states, we avoid anachronistic state where we have black
text on a dark blue background in light mode as we transition from none ->
highlighted -> selected.)
- Keep the selected/highlighted overrides to adjust colors for non-UIControl
subelements.
Defined a semantic color for the selection color which is identical to
netNewsWireBlue.
MasterFeedTableViewCell and MasterTimelineTableViewCell now subclass
NNWTableViewCell and no longer directly customize their selected background
view.
The fix used for iOS (keep a queue of preloaded web views) isn't appropriate
for macOS since the first view is used immediately. That approach would
solve the flash of white when first searching, but not the flash of white
when launching the application.
Instead, use a modification of the original solution used for iOS:
- wrap the web view in a box with an appropriate background color
- hide the web view at creation
- show the web view after* the first load
This doesn't suffer the latency problem that the same solution on iOS had
because the first load is always local, "No Selection" HTML.
[*] Showing the view immediately after the first load still causes the flash
to white. Waiting 0.05 seconds avoids this. That's a fairly terrible hack,
but I don't have a better solution at present.
Added a noContentHTML to ArticleRenderer. Use that for the initial content
for queued web views so that we don't see a temporary flash of "No
Selection" when pushing to an article that doesn't load instantly.
WKWebView has an awful behavior of a flash to white on first load when in
dark mode.
Keep a queue of WebViews where we've already done a trivial load so that by
the time we need them in the UI, they're past the flash-to-shite part of
their lifecycle.
Specify a container view in the storyboard and create+install the web view
at viewDidLoad time.
This lets us experiment with solutions for providing a web view that avoids
the flash-to-white problem.