I am developing a mobile application, and one of the features is a “story” that is essentially a series of screens. The screens can be of three main templates:
-
A “video” template where a video takes up the whole screen with a button at the bottom to go to the next screen
-
A “text” template which shows a modal with text for the user with a button at the bottom to go to the next screen
-
A “poll” template which shows a modal with an option for a poll for the user, with a button at the bottom to go to the next screen
A “story” can be made up of any number of these type of screens, in any order. The data for the story and it’s sections is in the StoryData object, with information about the sections being contained in an array with a section_type
field that can be text
, poll
, or video
.
I have two distinct approaches I can think of for the design:
- I can develop this as three separate screens that I navigate between using my navigation library
- I can develop this as one screen with a render function that renders the screen differently based on what type of section the user is currently on
What approach would be the more clean from a design perspective and allow for better scaling as I add features?
0