-
Notifications
You must be signed in to change notification settings - Fork 5
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
[Playground] Add identifier component #11
base: develop
Are you sure you want to change the base?
Conversation
${masthead.disclaimer} <a href="${primary_agency.url}">${primary_agency.name}</a> | ||
${secondary_agency ? html`${masthead.conjunction} <a href="${secondary_agency.url}">${secondary_agency.name}</a>`: null}${taxpayer ? html`. ${taxpayer}`: null} | ||
</p> | ||
<nav slot="links"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question:
Do we want to keep the slot on the wrapper here or should we have named slots for each individual link (e.g., <a slot="about-link"
)?
I opted for adding the slot name to the wrapper here so that the user can have the flexibility to control the order of their own list and also the ability to add links to the list if they ever need to (Right now the code just loops through each child of "links", wraps it, and puts it on the page). If we want to remove that flexibility and better control the link order and link types, I can add the slot names to the links instead. Curious what you all think is better here!
if (this.disclaimer.innerHTML.includes("An official")) { | ||
this.disclaimer.innerHTML = this.disclaimer.innerHTML.replace( | ||
"An official", | ||
'<span aria-hidden="true">An</span> official' | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Todo
Manipulating the innerHTML here causes an error any time you try to manipulate the story controls. Need to find an alternate method.
Error message:
This
ChildPart
has noparentNode
and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element'sinnerHTML
ortextContent
can do this.
@amyleadem is this safe to close because new work is captured in #21? |
Summary
Created a playground for potential options for the a
usa-identifier
web component.Important
This is no longer the most current work on the identifier component.
The current identifier web component work now lives in PR #21. PR #21 will focus on developing and evolving the declarative markup version of the identifier found here. At this time it will not include the attribute-based implementations found in this PR. I am leaving this playground PR open for reference in case anyone wants to look at the attribute-based options.
Please add any comments about the identifier web component to PR #21, not this PR.
Related issues
Closes #10