Awful / Awful.app

Something Awful Forums browser for iOS
https://forums.somethingawful.com/showthread.php?threadid=3837546&perpage=40&noseen=1
137 stars 45 forks source link

Spankykong theme release #1146

Open dfsm opened 2 years ago

dfsm commented 2 years ago

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

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

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

App/Theming/Themes.swift

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

App/Settings/SettingsView.swift

App/Misc/HTMLRenderingHelpers.swift

AwfulCore/Sources/AwfulCore/Scraping/Helpers.swift

MEDIUM

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

App/Views/AppIconPickerView.swift

App/Views/BookmarkColorPicker.swift

App/Main/RootViewControllerStack.swift

App/Data Sources/MessageListDataSource.swift

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

App/Extensions/UIFont+MonospacedDigits.swift

App/View Controllers/Messages/MessageListCell.swift

App/View Controllers/Messages/MessageViewController.swift

App/Views/LoadingView.swift

AwfulCore/Sources/AwfulCore/Model/User.swift

AwfulCore/Sources/AwfulCore/Persistence/PostPersistence.swift

AwfulCore/Sources/AwfulCore/Scraping/AuthorSidebarScrapeResult.swift

App/View Controllers/Posts/PostViewModel.swift

LOW

App/Data Sources/ForumListDataSource.swift

App/View Controllers/Rap Sheet/RapSheetViewController.swift

App/Composition/ComposeTextViewController.swift

App/Posts/ReplyWorkspace.swift

App/Data Sources/ThreadListDataSource.swift

App/Extensions/UIKit.swift

App/In-App Actions/IconActionItem.swift

App/Model Presentation/Thread+Presentation.swift

App/Navigation/NavigationBar.swift

App/Navigation/NavigationController.swift


 AwfulCore/Sources/AwfulCore/Networking/ForumsClient.swift

App/Thread Tags/ThreadTagLoader.swift

App/View Controllers/Posts/PostsPageView.swift

App/Templates/Announcement.html.stencil

App/Templates/Post.html.stencil

App/Templates/PostsView.html.stencil

App/Templates/PrivateMessage.html.stencil

App/Templates/Profile.html.stencil

App/Theming/Themes.plist

App/Settings/Settings.plist

App/Settings/UserDefaults+Settings.swift

App/Theming/ViewController.swift

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

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

App/URLs/AwfulURLRouter.swift

App/Composition/CompositionViewController.swift

App/View Controllers/AnnouncementViewController.swift

App/View Controllers/Forums/ForumListCell.swift

App/View Controllers/Forums/ForumsTableViewController.swift

App/View Controllers/Messages/MessageListViewController.swift

App/View Controllers/Posts/PostsPageRefreshArrowView.swift

App/View Controllers/Posts/PostsPageSettingsViewController.swift

App/View Controllers/Posts/PostsPageTopBar.swift

App/View Controllers/Posts/PostsPageViewController.swift

App/View Controllers/Posts/ReportPostViewController.swift

App/View Controllers/ProfileViewController.swift

App/View Controllers/RootTabBarController.swift

App/View Controllers/Settings/AppIconPickerCell.swift

App/View Controllers/Settings/SettingsViewController.swift

App/View Controllers/Thread Tags/ThreadTagPickerViewController.swift

App/View Controllers/Threads/BookmarksTableViewController.swift

App/View Controllers/Threads/ThreadComposeViewController.swift

App/View Controllers/Threads/ThreadListCell.swift

App/View Controllers/Threads/ThreadsTableViewController.swift

App/Views/NigglyRefreshLottieView.swift

AwfulCore/Sources/AwfulCore/Model/Announcement.swift

AwfulCore/Sources/AwfulCore/Model/Post.swift

AwfulCore/Sources/AwfulCore/Model/PrivateMessage.swift

AwfulCore/Sources/AwfulCore/Persistence/AnnouncementPersistence.swift

AwfulCore/Sources/AwfulCore/Persistence/AuthorPersistence.swift

AwfulCore/Sources/AwfulCore/Persistence/IndexPersistence.swift

AwfulCore/Sources/AwfulCore/Persistence/PrivateMessagePersistence.swift

AwfulCore/Sources/AwfulCore/Scraping/AnnouncementListScrapeResult.swift

AwfulCore/Sources/AwfulCore/Scraping/PostScrapeResult.swift

AwfulCore/Sources/AwfulCore/Scraping/PrivateMessageFolderScrapeResult.swift

AwfulCore/Sources/AwfulCore/Scraping/PrivateMessageScrapeResult.swift

AwfulScraping/Sources/AwfulScraping/IndexScrapeResult.swift

nolanw commented 2 years ago

@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 commented 2 years ago

@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 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

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