-
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-20800] - CSS for widget size control and feedbacks #10951
upcoming: [DI-20800] - CSS for widget size control and feedbacks #10951
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.
@venkymano-akamai Left couple comments in the initial review, Will take a deeper look later today. Please revolve the conflicts.
@@ -131,7 +131,7 @@ export const CloudPulseDashboardLanding = () => { | |||
} | |||
|
|||
return ( | |||
<Grid container spacing={2}> | |||
<Grid container paddingTop={'8px'} spacing={2}> |
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 theme values instead of hardcoded values here?
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, changed to paddingTop={1} = 8px, also tried to use theme.spacing wherever possible
sx={{ | ||
marginBlockEnd: 'auto', | ||
borderColor: '#F4F5F6', |
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.
Same here
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.
@cpathipa , the color '#F4F5F6' is not present in themes, i have used grey5 that seems to be very similar, any chance here we can go with '#F4F5F6' this color itself
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.
@gitkcosby/ @cpathipa We have got this color from Dominik( ACLP UX), Would you able to help us to provide the appropriate theme color for this?
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 Domink confirmed that we are good to use grey5 (#f7f7fa) as its almost same color. We can use the same.
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!!, grey5 we will go
…ure/widget_size_controls # Conflicts: # packages/manager/src/features/CloudPulse/Utils/CloudPulseWidgetUtils.ts # packages/manager/src/features/CloudPulse/Widget/CloudPulseWidget.tsx # packages/manager/src/features/CloudPulse/Widget/components/Zoomer.tsx
This reverts commit c8615b2.
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.
Looks good overall - just a few comments
height: theme.spacing(67.5), // 540px | ||
maxHeight: theme.spacing(67.5), // 540px | ||
}, | ||
})); |
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.
I don't think any of this is necessary now that we've set an overflow/scroll for the legends.
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.
@jaalah-akamai , we fixed this height because, we need to show error, while there is an issue from metrics API or any un-related errors, where we don't render the graph at all
Even in the error case, the spacing should remain the same
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.
Yea so when I see maxHeight, that's usually a red flag for me because we're cropping the natural growth of elements (unless it's absolutely necessary). You just want the error state to always match the other containers, and that can be accomplished without these styles by adding this:
Replaced StyledWidgetWrapper
with just Paper
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.
In CloudPulseWidget.tsx
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.
@jaalah-akamai , this works as well, I have removed the wrapper. Thanks for the suggestion
packages/manager/src/features/CloudPulse/Dashboard/CloudPulseDashboardWithFilters.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/CloudPulse/Widget/components/CloudPulseLineGraph.tsx
Show resolved
Hide resolved
packages/manager/src/features/CloudPulse/Widget/CloudPulseWidget.tsx
Outdated
Show resolved
Hide resolved
</Typography> | ||
<Stack | ||
alignItems={'center'} | ||
direction={{ sm: 'row' }} | ||
gap={{ md: 2, xs: 1 }} | ||
gap={2} | ||
maxHeight={`calc(${theme.spacing(10)} + 5px)`} |
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.
maxHeight
- Doesn't appear to be doing much, and do we need it? I don't think those controls should grow at all
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.
@jaalah-akamai , yes we need , because if we introduce more filters, possibly include a dimension filter, and another thing to start listing down the selected filters, we can fix the height and introduce a scroll for views. Because, in one widget, i might select three dimension filter and start listing down that and in another widget i only might select two filters, again the size of the widget is growing dynamically and we will have two different sized widgets
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 is a use case in future we need to support another control like split by within a widget, so there is a quite chance it can grow.
@jaalah-akamai , if it is regarding the styles of legend rows it is actual behaviour of linegraph, this involves changes in actual line graph component i think, anyway as we are migrating to recharts, we don't want to touch the actual line graph component. Let me know your thoughts on this Also to achieve this we need to the changes in LineGraph.styles.ts and remove all styles involving theme.breakpoints.down('md'). We hope this might have already handled if we go for recharts, so we don't need now Also , if this is mandatory and no one is using linegraph, we can remove those styles and commit it, please confirm |
@jaalah-akamai , I addressed most of comments and replied my thoughts on some of the comments, can you please check once? |
My recommendation is not to touch the existing linegraph as its a generic component and we anyway planned to migrate to recharts in next sprint (2 weeks from now) and any changes to linegraph might be a throw away code again. |
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.
Verified described CSS fixes ✅
Code review ✅
packages/manager/src/features/CloudPulse/shared/CloudPulseDashboardFilterBuilder.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/CloudPulse/shared/CloudPulseDashboardFilterBuilder.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/CloudPulse/Widget/CloudPulseWidget.tsx
Outdated
Show resolved
Hide resolved
packages/manager/.changeset/pr-10951-upcoming-features-1726561825358.md
Outdated
Show resolved
Hide resolved
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.
…et.tsx Co-authored-by: Dajahi Wiley <114682940+dwiley-akamai@users.noreply.github.com>
…825358.md Co-authored-by: Dajahi Wiley <114682940+dwiley-akamai@users.noreply.github.com>
…boardFilterBuilder.tsx Co-authored-by: Dajahi Wiley <114682940+dwiley-akamai@users.noreply.github.com>
…boardFilterBuilder.tsx Co-authored-by: Dajahi Wiley <114682940+dwiley-akamai@users.noreply.github.com>
Will merge if pipeline passes 👍 |
…anager into feature/widget_size_controls
…ure/widget_size_controls
Yes!! Thats expected, User has the ability to Zoom in/Zoom out the widget, based on that size of the widget varies. |
Thanks!! @jaalah-akamai |
Awesome, thanks for clarifying! 🤦 |
Coverage Report: ✅ |
Description 📝
CSS updates according to UX feedback for widgets and main bar
Changes 🔄
Target release date 🗓️
01-10-2024
Preview 📷
How to test 🧪
As an Author I have considered 🤔
Check all that apply