-
Notifications
You must be signed in to change notification settings - Fork 30
Dashboard, Utilization: Render in narrow container #314
Conversation
Pull Request Test Coverage Report for Build 1285
💛 - Coveralls |
9412d92
to
e953526
Compare
e953526
to
f703b8c
Compare
I would expect that the component behaviour would be more dynamic, controlled by actual size of the card, not by |
@rawagner , not yet but I can give it a try. Based on documentation, it looks great. |
f703b8c
to
544ce69
Compare
The use of Let's see it in action for a moment, it might make sense to replace the |
@mareklibra looks great! Can you center Loading and Not Available texts ? |
chart = <SparklineChart id={id} data={chartData} axis={axis} unloadBeforeLoad />; | ||
} | ||
|
||
if (isBound('narrow')) { |
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.
maybe it would be easier to maintain if we keep only one return statement and parametrize Column sizes and Chart part. For the first div with different className with can use classNames
function
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.
the component structure is different, I use two <Row>
components in the narrow
case
I know I think the desired functionality can be achieved with |
Good point with the maintenance ... |
how about react-measure ? It seems to be a lot more active than react-bounds |
The Utilization component renders different sub-component structure for a narrow container.
544ce69
to
af70084
Compare
The |
LGTM. @suomiy any objections against react-measure ? |
I think it could make more sense to give the graph more space and use only the narrow version only? Also the x axis + units are missing. Although |
I like the wider (recent) design more if space is available.
I will play with the X-axis independently together with the time-period dropdown selector. I can not use X-axis features of the C3chart for that to meet recent design. The units will be implemented within this PR, thanks for spotting it.
This gives us wider flexibility. Using media breakpoints will not solve resizing of an inner component based on available space. Recently, the same component will be used either in wide central column or narrow right-column. Without checking boundary on the component-level, this is hard to achieve. |
X-axis will be solved in a followup issue. |
The Utilization component renders different sub-component structure
for a narrow container.