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

Ios 9244 button link accesibility #305

Merged
merged 7 commits into from
Sep 25, 2023
Merged

Conversation

alexanegon
Copy link
Contributor

🎟️ Jira ticket

IOS-9244

πŸ₯… What's the goal?

We must enable that the right image of the MisticaButton follows the accesibility property

🚧 How do we do it?

We have a new property wrapper in iOS 14 called ScaledMetric it is to define numbers that should scale automatically according to the user’s Dynamic Type settings.

To use it due to support iOS 13 we have to create a new struct not available prior to iOS 14 called ScaledMisticaButton which receives a content, height and width in its init to keep the functionality of the old modifiers and extend them with the scale

πŸ§ͺ How can I verify this?

Accesibility.mov

@github-actions
Copy link

github-actions bot commented Sep 22, 2023

Screenshot tests report

βœ”οΈ All passing

@alexanegon alexanegon force-pushed the IOS-9244-ButtonLink-accesibility branch from d05240d to 719f2e3 Compare September 25, 2023 07:44
@alexanegon alexanegon marked this pull request as ready for review September 25, 2023 08:28
Comment on lines +58 to +63
.padding(.vertical, verticalPadding)
.padding(.horizontal, horizontalPadding)
.background(backgroundColor)
.foregroundColor(foregroundColor)
.border(radiusStyle: .button, borderColor: borderColor)
.padding(EdgeInsets(top: 0, leading: leadingInset, bottom: 0, trailing: trailingInset))
Copy link
Contributor

Choose a reason for hiding this comment

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

those lines don't depend on the scale, could we put in common with the other approach?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was the my first approach but they modify the button layout and breaks the tests :(

@alexanegon alexanegon merged commit 05d77d9 into main Sep 25, 2023
2 checks passed
@alexanegon alexanegon deleted the IOS-9244-ButtonLink-accesibility branch September 25, 2023 11:08
@tuentisre
Copy link
Collaborator

πŸŽ‰ This PR is included in version 26.2.0 πŸŽ‰

The release is available on GitHub release

Your semantic-release bot πŸ“¦πŸš€

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants