Skip to content

Conversation

gribnoysup
Copy link
Collaborator

This patch updates leafygreen Code component to latest to fix the copy button behavior: seems like in our current version it doesn't work inside the leafygreen chatbot element. Most notable changes are inside the "Export to language" feature: the Code component now doesn't include the code selector panel by default, so code around there had to be changed to account for that. Otherwise it's just slight visual changes in a couple of places:

image image image

Checks are passing, but pretty sure this will break tests that rely on testids, opening PR already to see how big the damage is.

Also package-lock update looks ridiculous because leafygreen deps are pulling in their whole toolchain inside our dependencies. I asked them about this and waiting for them to clean this up.

@gribnoysup gribnoysup requested a review from a team as a code owner October 6, 2025 11:59
@gribnoysup gribnoysup requested a review from lerouxb October 6, 2025 11:59
@@ -9643,6 +10107,482 @@
"@leafygreen-ui/leafygreen-provider": "^5.0.4"
}
},
"node_modules/@lg-tools/build": {
Copy link
Collaborator Author

@gribnoysup gribnoysup Oct 6, 2025

Choose a reason for hiding this comment

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

Most of 4k+ LoC changes in this file are due to this, seems like one of the packages that code pulls in has their whole build toolchain in dependencies. I think we should wait for LG team to fix this before merging (I asked about it in their channer)

@gribnoysup gribnoysup changed the title chore(components): update Code to latest; adjust component usage to new interface chore(components): update Code to latest; adjust component usage to new interface COMPASS-9925 Oct 6, 2025
Copy link
Contributor

@lerouxb lerouxb left a comment

Choose a reason for hiding this comment

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

Looks good. I have no idea why I ran the script and got a different result 😬

// exit details
// leafygreen autofocus triggers a tooltip on the error code element,
// "Tab" to remove the focus
await browser.keys('Tab');
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

All three e2e tests failing after the update were caused by the leafygreen autofocus first thing in the modal behavior. The way of dealing with it is the same everywhere and it's more than two places, but I still didn't feel like it warrants a shared helper of some kind. Tell me if you have a different opinion on this

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

Successfully merging this pull request may close these issues.

3 participants