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(aci): grid cell components for monitors #84281

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ameliahsu
Copy link
Member

@ameliahsu ameliahsu commented Jan 29, 2025

TitleCell

refactored + renamed AutomationTitleCell so that it can be used for monitors and automations

Screenshot 2025-01-29 at 3 33 04 PM

ConnectionCell

refactored + renamed MonitorsCell so that it can be used for connected monitors and automations

Screenshot 2025-01-29 at 3 32 49 PM

IssueCell

Screen.Recording.2025-01-29.at.3.15.26.PM.mov

NumberCell

Screenshot 2025-01-29 at 3 15 00 PM

@ameliahsu ameliahsu requested a review from natemoo-re January 29, 2025 23:46
@ameliahsu ameliahsu requested a review from a team as a code owner January 29, 2025 23:46
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jan 29, 2025
Copy link
Member

@natemoo-re natemoo-re left a 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

Comment on lines +42 to +45
${Wrapper} {
color: ${p => (p.disabled ? p.theme.disabled : p.theme.textColor)};
font-size: ${p => p.theme.fontSizeMedium};
}
Copy link
Member

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?

Comment on lines +58 to +61
display: flex;
flex-direction: row;
gap: ${space(0.5)};
color: ${p => p.theme.subText};
Copy link
Member

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

Comment on lines +25 to +30
const text = (type: 'monitor' | 'automation', length: number) => {
if (type === 'monitor') {
return tn('%s monitor', '%s monitors', length);
}
return tn('%s automation', '%s automations', length);
};
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants