-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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(aci): grid cell components for monitors #84281
base: master
Are you sure you want to change the base?
Conversation
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.
Shaping up well! Few small suggestions to tighten up the API surface
${Wrapper} { | ||
color: ${p => (p.disabled ? p.theme.disabled : p.theme.textColor)}; | ||
font-size: ${p => p.theme.fontSizeMedium}; | ||
} |
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.
Selecting nested components like this is usually a sign something about the component needs to be more flexible than it is...
color
and font-size
are both inheritable, so we should be able to set these on the IssueWrapper
root itself and nested components should respect it. Maybe we modify the ShortId
component so that the font-size
is inheritable and move the current font-size declaration to its wrapper?
display: flex; | ||
flex-direction: row; | ||
gap: ${space(0.5)}; | ||
color: ${p => p.theme.subText}; |
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.
Would prefer using <Flex gap={space(0.5)} />
for this
const text = (type: 'monitor' | 'automation', length: number) => { | ||
if (type === 'monitor') { | ||
return tn('%s monitor', '%s monitors', length); | ||
} | ||
return tn('%s automation', '%s automations', length); | ||
}; |
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.
Instead of a type
prop that is limited to monitor | automation
, what if this component accepted a renderSuffix
function? That would be slightly more composable and avoid hardcoding this logic inline.
TitleCell
refactored + renamed
AutomationTitleCell
so that it can be used for monitors and automationsConnectionCell
refactored + renamed
MonitorsCell
so that it can be used for connected monitors and automationsIssueCell
Screen.Recording.2025-01-29.at.3.15.26.PM.mov
NumberCell