Skip to content
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

[IOPLT-144] Map Legacy buttons versions to the context attribute #59

Merged
merged 17 commits into from
Sep 12, 2023

Conversation

CrisTofani
Copy link
Contributor

@CrisTofani CrisTofani commented Sep 8, 2023

⚠️ THIS PR DEPENDS ON #56

Short description

This PR implements the handler to chenge UI representation of the button components to use the legacy view based on IOExperimentalDesignContext

How to test

Check on the example app in the button section components changes on toggle value change

Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-09-08.at.11.43.48.mp4

@CrisTofani CrisTofani requested review from dmnplb and a team as code owners September 8, 2023 09:40
Copy link
Collaborator

@dmnplb dmnplb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a reminder about this legacy button context mapping activity. Our first goal is not to optimize the code, but rather to make the removal of the legacy code as easy and quick as possible. For example, if the component logic contains more than four/five conditions on the context value, we should consider splitting the code logic completely between the legacy and new variants, even at the cost of duplicate code.

Last but not least, we should restore the previous comments ("start/end legacy code") to make future removal even easier.

src/components/buttons/ButtonSolid.tsx Outdated Show resolved Hide resolved
@dpulls
Copy link

dpulls bot commented Sep 11, 2023

🎉 All dependencies have been resolved !

Base automatically changed from IOPLT-143 to main September 11, 2023 12:38
@CrisTofani
Copy link
Contributor Author

@dmnplb added in c589fae some TODOs comments as a reference to remove all legacy code.

Talking about code optimization, I can't totally agree, since a good organized code may be easier to read even if a wide part of it should be deleted in a future step. To have a legacy view doesn't always mean to have wide code duplication, that's what I meant removing the legacy component file. 😄

@CrisTofani CrisTofani merged commit a453f29 into main Sep 12, 2023
2 checks passed
@CrisTofani CrisTofani deleted the IOPLT-144 branch September 12, 2023 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants