CommentFileSizeAuthor
#8 with-patch.png379.53 KBleraa
#8 without-patch.png339.31 KBleraa
#8 add-class.png65.82 KBleraa

Issue fork uswds_base-3210099

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

smustgrave created an issue. See original summary.

smustgrave’s picture

Status: Active » Needs review

mferanda credited leraa.

mferanda’s picture

Good catch @leraa... since you discovered, can you test this patch and let us know?

If you're able, snip showing the class you tried to apply and it actually showing in the html.

Thank you for your help

leraa’s picture

@mferanda,

You know, I actually wasn't applying a class, I was applying the target attribute. During testing is when I noticed that the typo change my link classes. I fixed the typo to restore original classes being put on by USWDS.

I'm happy to test, but I don't have anything to show for the class thing. Do you want to see the attribute working properly? And how do you like seeing stuff? Screenshots? Scraping code?

I could also temporarily apply a class just for show-and-tell if that seems helpful.

Let me know what's best to help out and what format is best.

mferanda’s picture

@leraa yeah! Just add some type of dummy class. Maybe a snip showing it not working in the source. Apply the patch and show after with it working. (Before/after proof of working)

leraa’s picture

StatusFileSize
new65.82 KB
new339.31 KB
new379.53 KB

Ok, using the Menu Link Attributes module, I added a class to a menu link:

adding a class to a menu item

WIthout the patch, the template does add my new class, but it removes the other class that's supposed to be put there by USWDS, and instead puts class="test-my-new-class item_classes"

without patch applied

After the patch removes the ticks, the correct USWDS-assigned class="test-my-new-class usa-nav__link" that is set inside the template at around line 107 appears:

with patch applied

leraa’s picture

I should add my organization in this contribution.

mferanda’s picture

@leraa - Add whatever you want right now before I finalize everything.

Thank you for your contribution to this issue.

mferanda’s picture

Nevermind! I see... finalizing everything. Thanks again.

mferanda’s picture

Status: Needs review » Patch (to be ported)
mferanda’s picture

Added and pushed out the typo fix as 2.10-rc2...

If anyone would like to help me test rc2 for a thumbs up, please do so on this other thread.

https://www.drupal.org/project/uswds_base/issues/3179547

I'll push out this 2.10 as stable so we move on to the 2.11 changes with some new features.

Thank you!

mferanda’s picture

Status: Patch (to be ported) » Fixed
mferanda’s picture

Status: Fixed » Closed (fixed)