Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Add option to select color of device frame #15
@mmcc007 this PR is just a suggestion to support all the various chromes I saw you had in the sketch template files. could also be cool to add configs in the
happy to revise this or disregard it if you already had this in progress
Thanks for the PR!
Currently there is no choice for device frames, it's whatever the default is in screens.yaml.
Providing frame options is a good thing.
This would require adding a feature for over-riding a screen's default frame with provided alternatives. This would probably be configurable from the screenshots.yaml.
Facebook publishes the sketch files and pngs device frame alternatives for all the screen sizes. So for frames, the art is out there.
Let's say device frames are consistently Chrome (for the selected android and iOS devices) across all currently supported screen sizes.
Say we want to add Black as a color option. We would have to provide the black frames for all screen sizes and document how to change frame color in README.
To implement should be a matter of:
Then to trigger this code add something like the following to screenshots.yaml
No problem, happy to help. I decided to fork the repo since we needed the black frames for our app submission and thought it might be useful to PR back in, get the conversation going...
Your implementation approach sounds good. I can continue on that path and update this PR accordingly. If you have a particular workflow process let me know (e.g. prefer creating feature branches).
Also noticed you released v1.1.5
The default frame color is 'Silver' for iOS and 'Black' for android at the moment.
It might make sense to default to a single default color like Black for both iOS and android (might ultimately be easier for users to follow?). Users could then pick and choose which screens should have which alternative color (eventually can add other color selection methods, like 'Silver for iOS', etc...)... Ultimately, I leave it up to you.. maybe makes more sense to see how color feature works first before tweaking it some more if necessary.
BTW: should probably add checks to the Config validator, to confirm that color options are valid before starting a run.
Merging the PR into dev (as you are doing) seems like a good way to go. I will then later merge it into master.
Thanks for taking a stab at this... should be a cool feature.
Yeah I thought I had included my modified sketch source files on this PR. Agreed that will be best approach for all the frame artwork. I did notice the top of the frames could use some margin. Our app was recently approved and the screenshots look a bit cut off at the top and bottom so I'm going to make some tweaks and try again.
I'll just close this PR for now and re-open once I feel it's ready to go. Glad to get the discussion going and maybe we could transfer some of this to an issue, to document more precise requirements, which device frames to support (vote?), etc... I don't have much time this week but will see what I can do.