-
Notifications
You must be signed in to change notification settings - Fork 24
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
Demo app - Record detail layout #4745
base: master
Are you sure you want to change the base?
Conversation
|
✅ Deploy Preview for unrivaled-bublanina-3a9bae ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for rad-shortbread-897892 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
} | ||
|
||
const nameProps = { | ||
width: ['xsmall', 'max-content'] |
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.
Should we include this in grommet-theme-hpe v6.0.0 as the default?
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.
oooh I like your thinking.
Perhaps we could do something similar for bottom pad on PageHeader. Maybe audit some other "we always seem to apply these props".
<Box direction="row" justify="between"> | ||
<Text>{datum.name}</Text> | ||
<Box direction="row"> | ||
<Button icon={<Edit />} size="small" /> |
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.
Agree. Fixed.
key={datum.id} | ||
background="background-contrast" | ||
round="small" | ||
pad={{ left: 'small', right: 'xsmall', vertical: 'small' }} |
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 "small" all around work?
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.
Because we have an icon only button on the right, the padding in the button + pad on the container end up making the left-right whitespace feel unbalanced. Reducing the right pad to xsmall feels more balanced.
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 agree locally I changed it to small
to be all around the same size but it felt off a little so I think even though the right
is not the same visually looks better
</ContentPane> | ||
<ContentPane | ||
gridArea="scheduled-actions" | ||
heading="Scheduled actions" |
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.
Made adjustments to improve responsive behavior.
if (typeof adjustedStr === 'number') adjustedStr = adjustedStr.toString(); | ||
adjustedStr = adjustedStr.toLowerCase(); | ||
return adjustedStr.charAt(0).toUpperCase() + adjustedStr.slice(1); | ||
} |
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.
} | |
} | |
icon: <StatusDisabled />, | ||
color: 'status-unknown', | ||
}], | ||
]); |
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.
]); | |
]); | |
)} | ||
</List> | ||
); | ||
} |
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.
Some minor comments re: responsive layout. Looking nice
|
||
export const DetailSummary: React.FC = () => { | ||
return ( | ||
<NameValueList nameProps={nameProps}> |
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.
locally Im getting a TS error for the nameProps
I wanted to check on your side if it was fine or getting same error.
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.
Yes, I get the error too. I'm leaving it because I think Grommet should update the width type definition for NameValueList as it using Grid underneath and an array with min/max values should be valid. Leaving the error as a reminder that this is something that should be fixed.
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.
agree I was thinking grommet should be enhanced!
|
||
export const ILOSecurity: React.FC = () => { | ||
return ( | ||
<NameValueList nameProps={nameProps}> |
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 TS error 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.
/> | ||
} | ||
skeleton={undefined} | ||
// animation={["slideLeft", "fadeIn"]} |
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.
should we just remove?
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.
Removed.
small comments.. layout and responsive looks good! |
Deploy Preview
What does this PR do?
Where should the reviewer start?
sandbox/grommet-app/src/pages/layouts/kinds/RecordDetail
What testing has been done on this PR?
In addition to the feature you are implementing, have you checked the following:
General UX Checks
Accessibility Checks
Code Quality Checks
How should this be manually tested?
Any background context you want to provide?
What are the relevant issues?
Screenshots (if appropriate)
Should this PR be mentioned in Design System updates?
Is this change backwards compatible or is it a breaking change?