HandySwiftUI icon indicating copy to clipboard operation
HandySwiftUI copied to clipboard

Make `previewScreens` and `previewComponents` configurable

Open Jeehut opened this issue 4 years ago • 1 comments

Expected Behavior

The number of variants, the device sizes, the languages and the text styles should all be configurable.

Actual Behavior

The previewScreens and previewComponents have a preconfigured set of variants with opinionated decisons. While they might work for some and are a good starting point, users might want to configure the sizes, languages etc.

Jeehut avatar Dec 15 '20 17:12 Jeehut

For the languages, we might add a list of common languages and sort them by average text length to then automatically choose the right languages based on the supported languages of the project. Users can still override these defaults if ever needed. But this should probably come "batteries included" without the need for extra configuration. The screens should also be chosen and updated regularly to cover the smallest, most common and largest screen sizes.

Jeehut avatar May 15 '21 23:05 Jeehut

I removed these helpers as Apple broke many aspects (such as the language override) and decided to go a different direction (with the #Preview macro).

Jeehut avatar Oct 29 '24 11:10 Jeehut