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

Fix adding classes in MenuItem #2905

Merged
merged 1 commit into from Feb 22, 2024
Merged

Fix adding classes in MenuItem #2905

merged 1 commit into from Feb 22, 2024

Conversation

romainmenke
Copy link
Contributor

@romainmenke romainmenke commented Jan 29, 2024

Related:

N/A

Issue

In Timber V1 MenuItem would have classes with their own ID e.g. menu-item-123.
In Timber V2 this was missing.

Solution

Upon investigation I found that add_class had an inverted boolean check for in_array.
Correcting this fixes the issue.

Impact

This changes improves backwards compat with V1.

Usage Changes

N/A

Considerations

N/A

Testing

I assume that tests are missing or incorrect for this feature because it is a boolean flip.
Might be best if someone increased coverage.

@coveralls
Copy link

Coverage Status

coverage: 88.749% (+0.02%) from 88.726%
when pulling 7b0b6ab on romainmenke:patch-2
into 71111e1 on timber:2.x.

@gchtr gchtr added the 2.0 label Jan 29, 2024
Copy link
Member

@Levdbas Levdbas left a comment

Choose a reason for hiding this comment

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

Good catch @romainmenke

@Levdbas Levdbas added this to the 2.1.0 milestone Feb 22, 2024
@romainmenke romainmenke mentioned this pull request Feb 22, 2024
@nlemoine nlemoine merged commit 7e00eeb into timber:2.x Feb 22, 2024
27 of 28 checks passed
@romainmenke romainmenke deleted the patch-2 branch February 22, 2024 10:58
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.

None yet

5 participants