forem / DEV-ios

DEV Community iOS App
GNU General Public License v3.0
357 stars 97 forks source link

Feature: Flexible Theming #240

Closed chickdan closed 3 years ago

chickdan commented 3 years ago

What type of PR is this? (check all applicable)

Description

NOTE: This builds off of #239 so please merge it first

This PR moves [almost] all theme handling to a new ThemeManager class with the addition of the pink theme. The ThemeManager can easily be extended by adding the theme name to the ForemWebViewTheme enum and adding a new ThemeConfig that holds the respective colors.

Related Tickets & Documents

Closes #236

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Simulator Screen Shot - iPhone 11 Pro - 2020-11-27 at 19 35 35

Added to documentation?

[optional] What gif best describes this PR or how it makes you feel?

alt_text

chickdan commented 3 years ago

@fdoxyz I fixed the conflict and do agree that we should maintain consistency so I made the suggested changes for the pink theme.

I think in the future we can send some of the color logic upstream to ForemWebView

I was wanting to ask about this. From what I've read Forem is intended to be a platform that anyone can grab and host themselves. Is it desired to include all of the themes from DEV or should it be open for communities to create their own themes? Unless it's only intended for software communities, it would be a bit strange for a cooking or medical community to have the X-Hacker theme haha