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
Night mode #69
Night mode #69
Conversation
Did someone already create a custom map-style for a dark mode? |
I think we have to wait until the sdk provides a public api for dark mode or a way to style maps locally. The problem ist that custom styles for mapViews requires a webservices that provides the svg |
@mltbnz excellent question! @cbalster and I did some research on custom map tiles for Android based on OSM. The option is to host an own tile server, which might be quite expensive, or use a paid service. There are Mapbox and Thunderforest. The second could be an option in the future - they look quite open source friendly. Maybe there can be some cooperation, but I haven't reached out yet. That might be a job for @stephanlindauer with a better understanding of our traffic and approximately needed data package. |
Seems like it is possible with a |
Found one here https://wiki.openstreetmap.org/wiki/Tile_servers but it doesn't look really nice I think |
Very cool @mltbnz . Can you please add it also to the CHANGELOG.md? https://github.com/criticalmaps/criticalmaps-ios/blob/master/CHANGELOG.md#added https://keepachangelog.com/en/1.0.0/ Thanks :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great you took a look at the draft. The cell hightlightColor is one of the things on my list. Also changing the textColor of the overlay. I will also make the navigationBar non transparent. Another thing is the color of the chatBubble that is not handled and also I think I will create a seperate cell for each switch cell in settings since sometimes it seems to loose the reference to its selector I guess. Didn’t had the time to look into it properly. Other then that I am pretty happy with the result. The very dark map works kind of good. |
CriticalMass/AppController.swift
Outdated
.init(representation: NavigationOverlayItem.Representation(button: kniggeButton), | ||
action: .navigation(viewController: getRulesViewController)), | ||
.init(representation: NavigationOverlayItem.Representation(button: settingsButton), | ||
action: .navigation(viewController: getSettingsViewController)), | ||
]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated these to be buttons also for accessability
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this change needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes applying a theme easier since it is only one kind. For using the app with voice over it also makes sense. Plus shortens code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't make a difference for VoiceOver and Theming because both solution are using UIButtons in the end. I don't like that we know have UIButton instances in the AppController
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated to PR to roll back to the previous solution
There is still an issue with the night mode switch that sometimes is not switching the theme... Working on that. But the rest can be reviewed |
settings switch cell issue should be fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So for top 1: Seems out of my reach since it is a 3rd party. Could not manipulate it so far. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! The general implementation looks good to me, however there is still some work to do before we can merge it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* add thirdTitleTextColor * add usernameLabel to tweetCell
* add gray600 * standardize color property structure
* added unit tests
That must have slipped back somewhere. I fixed it and added two unit tests for safety 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
💪 |
Night Mode
Checklist
Before creating the PR