Skip to content
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

fix: tabs alignment #6768

Merged
merged 2 commits into from
Apr 3, 2024
Merged

fix: tabs alignment #6768

merged 2 commits into from
Apr 3, 2024

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Apr 3, 2024

About the changes

Screenshot 2024-04-03 at 11 01 07

Important files

Discussion points

Copy link

vercel bot commented Apr 3, 2024

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

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 3, 2024 10:09am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Apr 3, 2024 10:09am

@@ -272,20 +272,23 @@ export const Project = () => {
tab.isEnterprise ? 'end' : undefined
}
icon={
<span>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this span was breaking alignment and it was added recently

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 1 findings(s) 🚩

View detailed results in CodeScene

@@ -272,20 +272,23 @@ export const Project = () => {
tab.isEnterprise ? 'end' : undefined
}
icon={
<span>
<>

Choose a reason for hiding this comment

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

❌ Getting worse: Complex Method
Project already has high cyclomatic complexity, and now it increases in Lines of Code from 276 to 278

Suppress

Beta
</StyledBadge>
// extra span to avoid badge getting color override from the overly specific parent component
<span>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moving this span around the styled badge to escape css rule with direct tab span child selector that gets the purple color

Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be sensible to update the styling on the tab span instead of adding the extra span? Feels like this fixes the symptom but not the cause. We might need to do the same thing again later? 💁🏼

Copy link
Contributor

Choose a reason for hiding this comment

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

Would probably also make codescene happier

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tab is a material UI component with a very specific rule for its direct span child. I'd need to overrider Material UI internals which I didn't want to do.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, right. Seems weird that they'd add that, but yeah, happy with your reasoning there.

Beta
</StyledBadge>
// extra span to avoid badge getting color override from the overly specific parent component
<span>
Copy link
Contributor

Choose a reason for hiding this comment

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

Would probably also make codescene happier

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 1 findings(s) 🚩

View detailed results in CodeScene

@kwasniew kwasniew merged commit e0ea257 into main Apr 3, 2024
12 of 13 checks passed
@kwasniew kwasniew deleted the fix-tabs-alignment branch April 3, 2024 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants