-
Notifications
You must be signed in to change notification settings - Fork 367
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
upcoming: [DI-20709] - CSS updates for widget level filters for ACLP #10903
upcoming: [DI-20709] - CSS updates for widget level filters for ACLP #10903
Conversation
input: { | ||
fontSize: WIDGET_FILTERS_COMMON_FONT_SIZE, | ||
}, | ||
minHeight: WIDGET_FILTERS_COMMON_HEIGHT, |
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.
FYI, Since the minHeight of textFieldInput is by default 34px and it is same everywhere in our application. We need to pass both min height and height for our use case
A couple thoughts here, because I'm not convinced this is the right approach:
|
@jaalah-akamai , Yes this is an UX ask for reducing the height of the autocomplete, and as per latest mockups it should be of 22px. Happy to discuss a more suitable approach to achieve this without affecting the styles. |
@jaalah-akamai , we have updated the implementation approach by, using styledautocomplete, that will set the minheight and padding for us, can you please look into this and let us know. If you have any new suggestions on the approach, please let us know With these current changes, the alignment of the text within the Autocomplete is off - for this comment, i think there is not alignment impact since we are controlling the placement of text within autocomplete by padding. Adjusted the padding as well |
Coverage Report: ❌ |
Just speaking from the UX side, the autocomplete input height should not be adjusted. The UX designers on this project can resolve any alignment questions. In the event a new size or style variation for a given component is needed, we can address that. |
@gitkcosby , we need to reduce the height of the Autocomplete to 22px, since the input's min height is 34px, we need to adjust the minHeight to achieve this, because, reducing the height of autocomplete to 22px, doesn't work here. |
@gitkcosby Is this applicable even for width? We shouldn't reduce it? |
@jaalah-akamai / @gitkcosby , we have reverted the height changes and kept the original, now only we have reduced the width, let us know if this is okay. Also added couple of changes for removing placeholder if an element is selected in a multi select filter component |
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.
Seeing a typecheck CI error in a test file for an unused import, which will need to be fixed: https://github.com/linode/manager/actions/runs/10830866544/job/30068135825?pr=10903
And some additional feedback just from viewing the latest UI, since I hadn't in a little while. Are there tickets to address the following in upcoming PRs?
DbaaS
is not capitalized consistently in the dashboard dropdown, readingDbaas
.
- There are white space and padding issues with the legends in the graphs.
To reiterate - we shouldn't address these in this PR, but we will want to fix them and just want to make sure they're accounted for.
@@ -39,7 +45,7 @@ export const getInSeconds = (interval: string) => { | |||
}; | |||
|
|||
// Intervals must be in ascending order here | |||
export const all_interval_options = [ | |||
export const all_interval_options: IntervalOptions[] = [ |
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.
export const all_interval_options: IntervalOptions[] = [ | |
export const allIntervalOptions: IntervalOptions[] = [ |
We use camel case for variable names throughout the codebase. Can we be consistent?
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.
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.
They used to be longer, but with the changes this looks weird. You're correct, the grid will need to be adjusted now
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.
@mjac0bs / @jaalah-akamai , for smaller screens we have made the autocomplete to occupy 100 percent width now, please check
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 @venkymano-akamai, this looks much better on small screens. I left one comment about how to write that styling rule better to rely on our theme
.
Hope this is good now. |
@venkymano-akamai any chance you can merge in the latest changes from |
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.
@venkymano-akamai Thanks for the reminder about Recharts.
My feedback about Dbaas
not being capitalized consistently in the Select still stands, and we should be using DBaaS
in copy consistently. Can you provide me with a ticket number where that fix will be made?
Left a couple of more review recommendations on my last pass, but approving pending those are addressed and tests pass.
firstIntervalIndex, | ||
all_interval_options.length | ||
allIntervalOptions.length | ||
); | ||
|
||
let default_interval = |
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.
Nit: default_interval
existed before this PR, but same comment about preferring camel case over snake case to keep in mind when going forward.
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.
done
style={{ | ||
color: theme.color.grey1, | ||
fontSize: 'x-large', | ||
height: '34px', | ||
}} | ||
data-testid="zoom-in" | ||
onClick={() => handleClick(false)} | ||
style={{ color: 'grey', fontSize: 'x-large' }} | ||
/> | ||
); | ||
} | ||
|
||
return ( | ||
<ZoomOutMap | ||
style={{ | ||
color: theme.color.grey1, | ||
fontSize: 'x-large', | ||
height: '34px', | ||
}} |
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.
Can we use the sx
prop here? (docs reference)
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.
done
label: 'StyledAutocomplete', | ||
})(() => ({ | ||
'&& .MuiFormControl-root': { | ||
'@media (max-width: 600px)': { |
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.
Using our theme.breakpoint
values is a better way to do this. For example:
export const StyledWidgetAutocomplete = styled(Autocomplete, {
label: 'StyledAutocomplete',
})(({ theme }) => ({
'&& .MuiFormControl-root': {
minWidth: '90px',
[theme.breakpoints.down('sm')]: {
width: '100%', // 100% width for xs and small screens
},
width: '90px',
},
}));
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.
done
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 @venkymano-akamai, this looks much better on small screens. I left one comment about how to write that styling rule better to rely on our theme
.
@mjac0bs , Thanks for the pass and addressed those pending comments as well. @jaalah-akamai , Can we get a second pass? |
@jaalah-akamai , we have enough approvals, Can we merge it? |
…inode#10903) * upcoming: [DI-20709] - CSS updates for widget level filters * upcoming: [DI-20709] - ES lint fixes * upcoming: [DI-20709] - Added comments * upcoming: [DI-20709] - Added changeset * upcoming: [DI-20709] - Color updates for zoomer component with use them hook * upcoming: [DI-20585] - CSS changes * upcoming: [DI-20585] - Removed unused values and imports * upcoming: [DI-20585] - Removed unused values and imports * upcoming: [DI-20585] - Use common utils * upcoming: [DI-20585] - Comment updates * upcoming: [DI-20585] - Remove any * upcoming: [DI-20585] - Removing height and adjusting width. Removed divider in widget * upcoming: [DI-20585] - Removed placeholder on selection and UT updates * upcoming: [DI-20585] - UT updates * upcoming: [DI-20585] - Using form control for width of filters * upcoming: [DI-20585] - Alignment fix * upcoming: [DI-20585] - PR comments * upcoming: [DI-20585] - PR comments * upcoming: [DI-20585] - Updated code syntax for handling small size screens * upcoming: [DI-20585] - CamelCase for properties * upcoming: [DI-20585] - Style to sx --------- Co-authored-by: vmangalr <vmangalr@akamai.com>
Description 📝
Some simple CSS updates for reducing the height and font size of the widget level filter components.
Changes 🔄
Target release date 🗓️
16-09-2024
Preview 📷
How to test 🧪
As an Author I have considered 🤔
Check all that apply