Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spankykong theme release #1146

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Spankykong theme release #1146

wants to merge 4 commits into from

Conversation

dfsm
Copy link
Contributor

@dfsm dfsm commented Apr 23, 2022

I have categorised this list into High, Medium and Low to indicate the most in-need-of-review to least.

Lots of files have been touched, but there aren't that many significant changes.

HIGH

App/Theming/All the CSS files*.css

  • Added support for iPad full custom titles
  • Added support for ghost dead tweet Lottie

Question: I never did figure out how to load ghost.json using awful://. I did confirm that the file is being bundled. Perhaps it's the way I added the file to the project, though I tried both. It's currently being hosted on Lottiefiles.com and this will need to change.

App/View Controllers/Posts/PostsPageRefreshSpinnerView.swift

  • Added new end-of-thread Frog Lottie, replacing the old arrow spinner

Question: Is there a way to make the frog a tappable Back button?

App/Theming/Themes.swift

  • Added support for rounded fonts, set by theme
  • Added support for label-free tab bar icons, set by theme (requires restart)

Question: Is there any way to refresh the tab bar view (i.e. show and hide Forums, Bookmarks, Messages, etc. labels on theme change) without a restart? I think this would be simple with state and SwiftUI, but for UIKit I'm struggling

AwfulCore/Sources/AwfulCore/Model/Awful.xcdatamodeld/Awful 6.1.xcdatamodel/contents

  • New values added in CoreData for raw versions of datetime strings

App/Settings/SettingsView.swift

  • New SwiftUI Settings page, made to reflect the old one. Functional, but still finishing it up atm

App/Misc/HTMLRenderingHelpers.swift

  • Added another preprocessing function here (addQuoteIcons()) to add an HTML element to quotes so that I could set the quote icon colour using themes.

AwfulCore/Sources/AwfulCore/Scraping/Helpers.swift

  • scrapeAvatarURLString function, scrapeCustomTitle function

MEDIUM

App/View Controllers/Threads/UIContextMenuConfiguration+ThreadListItem.swift

  • New menu

App/Views/AppIconPickerView.swift

  • New SwiftUI view for picking app icon

App/Views/BookmarkColorPicker.swift

  • New SwiftUI view for picking bookmark colour
    Note: This currently opens as a full sheet popup, but the intent is to make it a 1/4 size popup. Will address in future.

App/Main/RootViewControllerStack.swift

  • Added new SwiftUI Settings page for ios14+, otherwise load old UIKit version.
  • Added some shadowImage and backgroundImage fix to allow for clean hairline-free chrome (determined by theme)

App/Data Sources/MessageListDataSource.swift

  • Added new shorter date formatting more suited to messages
  • Added support for rounded fonts, set by theme
  • Adjusted font sizes for various elements
  • Modified empty tag to new version that adjusts its colour based on theme

App/Extensions/ChidoriAnimationController.swift,
App/Extensions/ChidoriMenu.swift,
App/Extensions/ChidoriMenuTableViewCell.swift,
App/Extensions/ChidoriPresentationController.swift

  • Added this dependency as local files and modified them to add theming support

App/Extensions/UIFont+MonospacedDigits.swift

  • Added the roundedFonts function to extension UIFontDescriptor here

App/View Controllers/Messages/MessageListCell.swift

  • Tag overlay image, raw date, reorganised layout

App/View Controllers/Messages/MessageViewController.swift

  • Haptics, font, back button, detect iPad and display custom titles
  • Raw date times

App/Views/LoadingView.swift

  • Modified to use V Lottie
  • Posted Toot Lottie defined here also

AwfulCore/Sources/AwfulCore/Model/User.swift

  • Add regdateRaw and avatarURLString
  • Remove extractAvatarURL function

AwfulCore/Sources/AwfulCore/Persistence/PostPersistence.swift

  • postDateRaw
  • Public extension PostsPageScrapeResult

AwfulCore/Sources/AwfulCore/Scraping/AuthorSidebarScrapeResult.swift

  • avatarURLString, regdateRaw, scrapeAvatarURLString

App/View Controllers/Posts/PostViewModel.swift

  • Haptics, font, back button, detect iPad and display custom titles
  • Raw date times

LOW

App/Data Sources/ForumListDataSource.swift

  • Made new expansionTintColor and favoriteStarTintColor theme properties (previously used tintColor)

App/View Controllers/Rap Sheet/RapSheetViewController.swift

  • Root tab bar label

App/Composition/ComposeTextViewController.swift

  • Replaced MRProgress overlay when post successful with Lottie going toot
  • Added haptics on submit and cancel

App/Posts/ReplyWorkspace.swift

  • Replaced MRProgress overlay when post successful with Lottie going toot

App/Data Sources/ThreadListDataSource.swift

  • Added support for rounded fonts, set by theme
  • Changed rating images used to new version that adjusts its “empty” colour based on theme

App/Extensions/UIKit.swift

  • Added support for rounded fonts in UINavigationItem title, set by theme
  • Added stroke image extension

App/In-App Actions/IconActionItem.swift

  • Changed copy-thread-title to copy-title

App/Model Presentation/Thread+Presentation.swift

  • Changed thread rating images to newer version. (Old images have been kept in Assets in case of outrage)

App/Navigation/NavigationBar.swift

  • Added support for rounded fonts, set by theme
  • Added some shadowImage and backgroundImage fix to allow for clean hairline-free chrome (determined by theme)
  • extended UIViewController here to for custom back button

App/Navigation/NavigationController.swift

  • Added support for rounded fonts, set by theme
  • Added some shadowImage and backgroundImage fix to allow for clean hairline-free chrome (determined by theme)


 AwfulCore/Sources/AwfulCore/Networking/ForumsClient.swift

  • Added setBookmarkColor function

App/Thread Tags/ThreadTagLoader.swift

  • Layered image that allows theming

App/View Controllers/Posts/PostsPageView.swift

  • Added refreshControl check so that pull to refresh arrow appears below the toolbar, but the end of thread frog Lottie sits above

App/Templates/Announcement.html.stencil

  • Updated the stencil to use raw date time strings provided by the forums. Uses new fields authorRegdateRaw and postedDateRaw

App/Templates/Post.html.stencil

  • Changed the h1 tag for username to be a span instead. This solved an issue that I can’t quite recall
  • Removed “Joined” from template
  • Added custom title html for iPads only
  • Adjusted footer divider and changed date times to forum-provided strings

App/Templates/PostsView.html.stencil

  • Added 100px of height to account for replacement of End Of The Thread text with frog lottie

App/Templates/PrivateMessage.html.stencil

  • Added custom title html for iPads only
  • Changed date times to forum-provided strings

App/Templates/Profile.html.stencil

  • Changed date times to forum-provided strings

App/Theming/Themes.plist

  • Added some additional keys

App/Settings/Settings.plist

  • Added haptics setting

App/Settings/UserDefaults+Settings.swift

  • Added haptics setting

App/Theming/ViewController.swift

  • Added niggly refresh Lottie

App/Theming/posts-view-spankykong-light.css

  • New CSS

App/Theming/posts-view-spankykong-oled-dark.css

  • New CSS

App/URLs/AwfulURLRouter.swift

  • Haptics

App/Composition/CompositionViewController.swift

  • Added haptics on cancel

App/View Controllers/AnnouncementViewController.swift

  • Haptics and raw date things

App/View Controllers/Forums/ForumListCell.swift

  • Haptics and arrow star location swap

App/View Controllers/Forums/ForumsTableViewController.swift

  • Haptics, font

App/View Controllers/Messages/MessageListViewController.swift

  • Added support for label-free tab bar icons, set by theme (requires restart)
  • Haptics, font

App/View Controllers/Posts/PostsPageRefreshArrowView.swift

  • Haptics, theme controlled arrow colour

App/View Controllers/Posts/PostsPageSettingsViewController.swift

  • Haptics

App/View Controllers/Posts/PostsPageTopBar.swift

  • Haptics, rounded font

App/View Controllers/Posts/PostsPageViewController.swift

  • Adding new context menus (Chidori)
  • Haptics

App/View Controllers/Posts/ReportPostViewController.swift

  • Haptics

App/View Controllers/ProfileViewController.swift

  • Raw string datetime and avatarurl

App/View Controllers/RootTabBarController.swift

  • Added haptics
  • Review against main

App/View Controllers/Settings/AppIconPickerCell.swift

  • Changed AppIcon and findAppIcons() from private to public. Using these in the newer SwiftUI version

App/View Controllers/Settings/SettingsViewController.swift

  • iOS 13 will still fall back to this UIKit settings view

App/View Controllers/Thread Tags/ThreadTagPickerViewController.swift

  • Added haptics, changed spacing from 3 to 5
  • Added corner radius to thread tags

App/View Controllers/Threads/BookmarksTableViewController.swift

  • Haptics, showRootTabBarLabel

App/View Controllers/Threads/ThreadComposeViewController.swift

  • Haptics

App/View Controllers/Threads/ThreadListCell.swift

  • Changed page icon from a scripted image to an actual image
  • Added corner radius to thread tags

App/View Controllers/Threads/ThreadsTableViewController.swift

  • Haptics, back button, rounded fonts

App/Views/NigglyRefreshLottieView.swift

  • Niggly Lottie

AwfulCore/Sources/AwfulCore/Model/Announcement.swift

  • authorRegdateRaw, postedDateRaw

AwfulCore/Sources/AwfulCore/Model/Post.swift

  • Add postDateRaw

AwfulCore/Sources/AwfulCore/Model/PrivateMessage.swift

  • Add sentDateRaw

AwfulCore/Sources/AwfulCore/Persistence/AnnouncementPersistence.swift

  • Added saving of raw date strings

AwfulCore/Sources/AwfulCore/Persistence/AuthorPersistence.swift

  • Added saving of raw date strings
  • Plain avatarurlstring

AwfulCore/Sources/AwfulCore/Persistence/IndexPersistence.swift

  • regdateRaw

AwfulCore/Sources/AwfulCore/Persistence/PrivateMessagePersistence.swift

  • sentDateRaw

AwfulCore/Sources/AwfulCore/Scraping/AnnouncementListScrapeResult.swift

  • Added scraping for dateRaw, regdateRaw

AwfulCore/Sources/AwfulCore/Scraping/PostScrapeResult.swift

  • postDateRaw

AwfulCore/Sources/AwfulCore/Scraping/PrivateMessageFolderScrapeResult.swift

  • sentDateRaw

AwfulCore/Sources/AwfulCore/Scraping/PrivateMessageScrapeResult.swift

  • sentDateRaw

AwfulScraping/Sources/AwfulScraping/IndexScrapeResult.swift

  • regdateRaw

@nolanw
Copy link
Member

nolanw commented Apr 23, 2022

@dfsm heck yeah!

This is too much for me to review in one go, so I'ma figure out some smaller chunks that might work as separate PRs. I'm happy to do that splitting up, but for now let's keep this PR open (so I can start again after screwing up a few times).

I ran into a couple build issues:

  1. Hardcoded "Development Team" build setting in the "Awful" and "SmilieKeyboard" targets. You should be able to use a Local.xcconfig file (mentioned in the read me) to set your developer team to yours, which appears to be HYV8H97F7J.
  2. Two resources point to a AwfulSpankyKong2022 directory, which I don't have :) they are ghost.json and platinum-member.png. Looks like those files do exist in App/Resources/Posts View Theming. If those are the right files, can you update their paths in Xcode? Right sidebar, first tab, under "Location" click the folder icon. Thanks!

@dfsm
Copy link
Contributor Author

dfsm commented Apr 23, 2022

@dfsm heck yeah!

This is too much for me to review in one go, so I'ma figure out some smaller chunks that might work as separate PRs. I'm happy to do that splitting up, but for now let's keep this PR open (so I can start again after screwing up a few times).

Haha no worries. This is still in Draft cuz I was hoping to make that easier for you. I'd say a third of the updates are images, which don't need review. Then the second third are small updates to many files since I had to add Haptics and the new plain string datetime values into many different places.

The final third is the stuff that will actually need proper review. That's why I was ordering the updates in the original comment.

BUT we can do whatever, I'm game. :)

I ran into a couple build issues:

1. Hardcoded "Development Team" build setting in the "Awful" and "SmilieKeyboard" targets. You should be able to use a `Local.xcconfig` file (mentioned in the read me) to set your developer team to yours, which appears to be `HYV8H97F7J`.

Whoops, I'll revert that.

2. Two resources point to a `AwfulSpankyKong2022` directory, which I don't have :) they are `ghost.json` and `platinum-member.png`. Looks like those files do exist in `App/Resources/Posts View Theming`. If those are the right files, can you update their paths in Xcode? Right sidebar, first tab, under "Location" click the folder icon. Thanks!

Oh thank you, this has been bugging me for a long time. I couldn't figure out which files were causing a second Origin to appear and it was giving me errors with every commit!

Also, finally, I do have ~10 thread tag images. I tried pulling a recursive clone from github and making my changes, even created a second branch on Thread Tags, but that broke all my subsequent github commit attempts. I think because I don't have access to the Thread Tag repo?

Anyway, I don't plan on touching thread tags ever again so I think I'll just give you those files to upload before we go to beta.

@dfsm dfsm marked this pull request as ready for review May 5, 2022 07:45
@dfsm
Copy link
Contributor Author

dfsm commented May 5, 2022

I did the best I could with updating the original comment. If ya still want to break it up into smaller pieces, that's cool with me too

@nolanw
Copy link
Member

nolanw commented May 9, 2022

@dfsm Thanks for your patience! I do indeed still want to break it up :) I've started the process over on branch spankykong-nolanw-resequence. Still got a couple more parts to tease out. As mentioned, if it goes ok I'll point this branch to that resequencing.

In the meantime, I noticed that all your stylesheet changes/additions are directly to the .css files? In the past we've used LESS as a preprocessor to gain some handy features. I'm not conceptually opposed to dropping LESS, especially now that we can rely on some newer CSS features thanks to our deployment target bump, but as it sits now your changes will get blown away as soon as someone runs less to regenerate the .css files. Are you up for porting your CSS changes over to the .less files? There's instructions in the read me to set up less. If not, that's ok, I'll have a go when I get there :)

@dfsm
Copy link
Contributor Author

dfsm commented May 9, 2022

In the meantime, I noticed that all your stylesheet changes/additions are directly to the .css files? In the past we've used LESS as a preprocessor to gain some handy features. I'm not conceptually opposed to dropping LESS, especially now that we can rely on some newer CSS features thanks to our deployment target bump, but as it sits now your changes will get blown away as soon as someone runs less to regenerate the .css files. Are you up for porting your CSS changes over to the .less files? There's instructions in the read me to set up less. If not, that's ok, I'll have a go when I get there :)

Ahh the less thing. So, for the longest time I thought that was an old reference in the readme since only profile.less is actually referenced in the project in xcode. Only recently did I actually look at the css files in Finder and see .less files for each theme!

However, on two laptops now I've had node and less installed. Never have I had the css files modified after a build. Have you tried it recently? I know that the magic cake css is not in any less file and that works fine in your official builds!

So I think that perhaps Less hasn't been working as intended for as long as I've been annoying ya :)

Could we leave it as-is for this one and raise a separate enhancement to officially find a modern solution for css? Because we can use css variables now, as you say. In one of my earlier builds I had the css as a big string block, injecting in colour values from the theme plist. This string was a :root css element defining the colour variables, which I loaded into the webview. The css files just used variable names and didn't have colours defined in them.

Anyway, to sum up: I'd rather not deal with less if possible thanks lol

@nolanw nolanw force-pushed the spankykong-theme-release branch 4 times, most recently from 51715fe to 6446b72 Compare June 1, 2022 02:30
@nolanw nolanw force-pushed the spankykong-theme-release branch 3 times, most recently from 8d92fb3 to 9b131b8 Compare June 12, 2022 22:56
nolanw and others added 4 commits August 20, 2022 14:00
…s over

Critical changes in this commit for the new SpankyKong theme, new model for additional fields, updated stencils and adding lotties

Adding updates to scraping and views. Adding Chidori menu

Updating post view images and adding bookmark colour picker view

Slight cleanup and navigation bar changes

Fix lotties

Small fixes

Final cleanup pass 1

Cleanup

More cleanup

Fixed platinum-member.png and ghost.json locations. Removed my account from SmileyKeyboard signing settings

Changing posted toot back to 100x100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants