-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix: make the file name in <BaseError> wrap anywhere. #22271
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
Conversation
Thanks for taking the time to open a PR!
|
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.
Thanks @sainthkh, a few small tweaks then LGTM
@@ -12,7 +12,7 @@ | |||
@click="onClick" | |||
> | |||
<i-cy-document-text_x16 class="h-16px m-12px mr-8px w-16px icon-dark-indigo-500 icon-light-indigo-100" /> | |||
<code>{{ fileText }}</code> | |||
<code class="fileText">{{ fileText }}</code> |
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.
Let's replace this with class="break-all"
. It gives us the same behavior and is a native tailwind class so we don't have to have a style tag.
file: { | ||
id: `FileParts:/absolute/full/path/cypress/e2e/file.cy.js`, | ||
__typename: 'FileParts', | ||
relative: 'veryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryverylong/cypress/e2e/file.cy.js', |
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.
For brevity:
const longFileName = `${'very'.repeat(20)}long/cypress/e2e/file.cy.js`
...
relative: longFileName
...
cy.findByText(`${longFileName}:12:25`).should('have.class', 'break-all')
Co-authored-by: Zachary Williams <[email protected]>
User facing changelog
File name in error message wrap anywhere.
Additional details
<BaseError>
didn't wrap correctly. It is not a severe bug, but it's a bit annoying.Any implementation details to explain?
Steps to test
The best way to see this failure is to use the
renders the header and message slots with codeframe
test atBaseError.cy.tsx
. Make the relative path very long likeveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryverylong/cypress/e2e/file.cy.js
.How has the user experience changed?
Before:
After:
PR Tasks
cypress-documentation
?type definitions
?