I am searching for a design pattern i can use so i can feature toggle UI elements.
I have a simple screen that has a horizonal list at the bottom and at the top is a photo. clicking the list updates the photo. Anyway, thats not the issue. This screen and code already exist. I have a task to change what the list items look like. I have a task to create a toggle such that the business can test this feature out, if they dont like it they want to revert back to the old design by simply using a feature toggle.
I dont want to copy all the files and make duplicates with a if else condition on the files if i can avoid it, (if you think its the better way let me know) i was thinking there is a design pattern something like a strategy pattern i could use to do this more cleanly. even chain of responsilbity could be used. but anyway, im not sure the best way to do this, how have you all handled feature toggles on UI elements ?
Aucun commentaire:
Enregistrer un commentaire