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

feat: Add extra to tabs #136

Merged
merged 6 commits into from
Jun 21, 2023
Merged

feat: Add extra to tabs #136

merged 6 commits into from
Jun 21, 2023

Conversation

JackyxCS
Copy link
Contributor

@JackyxCS JackyxCS commented Jun 20, 2023

  • adds an extra action(s) option to tabs

image

image

  • required for cluster summarization:

image

image

@github-actions
Copy link

github-actions bot commented Jun 20, 2023

size-limit report 📦

Path Size
dist/components.cjs.production.min.js 162.41 KB (+0.04% 🔺)
dist/components.esm.js 111.67 KB (+0.04% 🔺)

@JackyxCS JackyxCS marked this pull request as ready for review June 20, 2023 17:32
@JackyxCS JackyxCS requested a review from mikeldking June 20, 2023 17:32
@@ -33,14 +33,14 @@ const tabListCSS = css`
--tab-hover-color: ${transparentize(0.2, theme.colors.arizeBlue)};
--tab-selected-border-color: ${theme.colors.arizeBlue};

button {
button[role='tab'] {
Copy link
Collaborator

Choose a reason for hiding this comment

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

it might be worth figuring out a way to keep a specificity of 1 here. Having a specificity higher makes customization a bit harder

@@ -66,11 +66,17 @@ const tabListCSS = css`
border-color: var(--tab-selected-border-color);
}
}
.ac-tabs__extra-content {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is the extra wrap right? probably worth not naming it content.

className="ac-field-label__label-extra"

@@ -154,6 +168,7 @@ export function Tabs({
</button>
);
})}
{extra && <div className="ac-tabs__extra-content">{extra}</div>}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
{extra && <div className="ac-tabs__extra-content">{extra}</div>}
{extra && <div className="ac-tabs__extra">{extra}</div>}

Comment on lines 70 to 73
display: flex;
align-items: center;
justify-content: flex-end;
flex-grow: 1;
Copy link
Collaborator

Choose a reason for hiding this comment

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

this means the extra takes up the entire width on the right-hand side - I think it's probably worth just having the content aligned left and let it form it's own layout rather than forcing flex.

@JackyxCS JackyxCS merged commit c41193a into main Jun 21, 2023
4 checks passed
@JackyxCS JackyxCS deleted the add-extra-to-tabs branch June 21, 2023 00:28
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.

None yet

2 participants