Skip to content

Conversation

@dchyun
Copy link
Contributor

@dchyun dchyun commented Jun 3, 2025

📌 Summary

If merged this PR would make the didInsertNode arguments for the contextual Title and Description components optional to avoid any errors thrown in consumer repos by adding them as required arguments in #2879.

🛠️ Detailed description

📸 Screenshots

🔗 External links

Jira ticket: HDS-XXX
Figma file: [if it applies]


👀 Component checklist

💬 Please consider using conventional comments when reviewing this PR.

📋 PCI review checklist
  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
  • If applicable, I've worked with GRC to document the impact of any changes to security controls.
    Examples of changes to controls include access controls, encryption, logging, etc.
  • If applicable, I've worked with GRC to ensure compliance due to a significant change to the in-scope PCI environment.
    Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.

@vercel
Copy link

vercel bot commented Jun 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
hds-showcase ✅ Ready (Inspect) Visit Preview Jun 3, 2025 1:20pm
hds-website ✅ Ready (Inspect) Visit Preview Jun 3, 2025 1:20pm

@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2025

📦 RC Packages Published

Latest commit: 0c66a92

Published 2 packages

@hashicorp/[email protected]

yarn up -C @hashicorp/design-system-components@rc

@hashicorp/[email protected]

yarn up -C @hashicorp/flight-icons@rc

@dchyun dchyun removed the release-candidate Publishes release candidates to npm label Jun 3, 2025
Comment on lines +187 to +190
schedule('afterRender', (): void => {
const titleElement = this._element.querySelector(
TITLE_ELEMENT_SELECTOR
) as HTMLElement;
Copy link
Contributor

Choose a reason for hiding this comment

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

[question] was this the only way? I am a bit nervous about using DOM querySelector methods inside controllers, looks a bit contrary to what we should do.

@zamoore thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's similar to an approach used in the Stepper::Nav. I had to use a querySelector approach since when the element was being passed in it was causing the other type issues.

From the nav:

@action
didInsertStep(): void {
  // eslint-disable-next-line ember/no-runloop
  schedule('afterRender', (): void => {
    this.updateSteps();
  });
}

private updateSteps(): void {
  const steps = this._element.querySelectorAll(STEP_ELEMENT_SELECTOR);
  ...

@dchyun dchyun closed this Jun 3, 2025
@didoo
Copy link
Contributor

didoo commented Jun 4, 2025

@dchyun can you add an explanation of why it was closed, and link to the other PR? thanks

@dchyun dchyun deleted the dchyun/code-block-optional-didInsert branch September 3, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants