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

Demo app - Record detail layout #4745

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

Demo app - Record detail layout #4745

wants to merge 16 commits into from

Conversation

halocline
Copy link
Collaborator

Deploy Preview

What does this PR do?

  • Adds an example record detail layout to demo-app

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

  • Small, medium, and large screen sizes
  • Cross-browsers (FireFox, Chrome, and Safari)
  • Light & dark modes
  • All hyperlinks route properly

Accessibility Checks

  • Keyboard interactions
  • Screen reader experience
  • Run WAVE accessibility plugin (Chrome)

Code Quality Checks

  • Console is free of warnings and errors
  • Passes E2E commit checks
  • Visual snapshots are reasonable

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?

Copy link

changeset-bot bot commented Jan 28, 2025

⚠️ No Changeset found

Latest commit: 56bd791

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@halocline halocline requested a review from taysea January 28, 2025 00:16
Copy link

netlify bot commented Jan 28, 2025

Deploy Preview for unrivaled-bublanina-3a9bae ready!

Name Link
🔨 Latest commit 56bd791
🔍 Latest deploy log https://app.netlify.com/sites/unrivaled-bublanina-3a9bae/deploys/67ae8af4f1054100080d8139
😎 Deploy Preview https://deploy-preview-4745--unrivaled-bublanina-3a9bae.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 28, 2025

Deploy Preview for rad-shortbread-897892 ready!

Name Link
🔨 Latest commit 56bd791
🔍 Latest deploy log https://app.netlify.com/sites/rad-shortbread-897892/deploys/67ae8af4f1054100080d813b
😎 Deploy Preview https://deploy-preview-4745--rad-shortbread-897892.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

}

const nameProps = {
width: ['xsmall', 'max-content']
Copy link
Collaborator

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?

Copy link
Collaborator Author

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" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2025-01-27 at 9 38 19 PM

The spacing/text hierarchy feels awkward here. Feels like we could use a bit more spacing below "Update firmware"

Copy link
Collaborator Author

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' }}
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator

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"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2025-01-27 at 9 40 48 PM

Getting some overlap here -- not sure if that content pane should have overflow or the page should respond earlier to a single column layout

Copy link
Collaborator Author

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);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
}

icon: <StatusDisabled />,
color: 'status-unknown',
}],
]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
]);
]);

)}
</List>
);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
}

Copy link
Collaborator

@taysea taysea left a 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

@halocline halocline requested a review from taysea February 3, 2025 18:44
@halocline halocline requested a review from britt6612 February 12, 2025 18:08

export const DetailSummary: React.FC = () => {
return (
<NameValueList nameProps={nameProps}>
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

Copy link
Collaborator

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}>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same TS error here

Copy link
Collaborator Author

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"]}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we just remove?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

@britt6612
Copy link
Collaborator

small comments.. layout and responsive looks good!

@halocline halocline requested a review from britt6612 February 14, 2025 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants