Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: New static error summary component#3107

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
AbhineetJain merged 6 commits intomainfromabhineetjain/error-summary-component
Jul 22, 2022

Conversation

AbhineetJain
Copy link
Contributor

This PR repurposes the existing ErrorSummary component to create a static component to display error messages with details from the backend.

We want to make the details section collapsible and the error summary optionally dismissible.

Subtasks

  • create new component with collapsible details section
  • add an option to dismiss the component
  • add unit tests
  • add stories

Fixes#3106

Screenshots

Screen Shot 2022-07-22 at 1 01 00 AM

Dismissible

Screen Shot 2022-07-22 at 1 01 35 AM

Collapsed details

Screen Shot 2022-07-22 at 1 02 00 AM

With details

Screen Shot 2022-07-22 at 1 02 09 AM

@AbhineetJainAbhineetJain requested a review froma team as acode ownerJuly 22, 2022 05:04

return (
<Stack>
<Stack className={styles.root}>
Copy link
Member

Choose a reason for hiding this comment

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

Does this outermost element need to be aStack or can it just be a fragment, i.e.<></>?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Adds thegap for theretry component. I am fine with keeping this as aStack.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Refactored it now!

Kira-Pilot reacted with hooray emoji
Copy link
Member

Choose a reason for hiding this comment

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

Nice, that looks great!

const useStyles = makeStyles<Theme, StyleProps>((theme) => ({
root: {
background: `${theme.palette.error.main}60`,
margin: `${theme.spacing(2)}px`,
Copy link
Member

Choose a reason for hiding this comment

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

Just a suggestion: this component might be a little more flexible if we leave off the margin and instead let the parent decide what the margin should be (it will probably vary). If you feel like it, you could even pass in astyle prop so that the parent can pass through its own styles.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we're going to use this component a lot and I'd like it to look decent without additional styling. Maybe we can give it margins we think are typical and then override when necessary.

AbhineetJain reacted with thumbs up emoji
Copy link
Member

@Kira-PilotKira-Pilot left a comment

Choose a reason for hiding this comment

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

This looks super!

Copy link
Contributor

@presleyppresleyp left a comment

Choose a reason for hiding this comment

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

Great finishing touches!

@AbhineetJainAbhineetJainenabled auto-merge (squash)July 22, 2022 19:10
@AbhineetJainAbhineetJain merged commit1b19a09 intomainJul 22, 2022
@AbhineetJainAbhineetJain deleted the abhineetjain/error-summary-component branchJuly 22, 2022 19:10
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@Kira-PilotKira-PilotKira-Pilot approved these changes

@presleyppresleyppresleyp approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Create new component to display error messages with details
3 participants
@AbhineetJain@presleyp@Kira-Pilot

[8]ページ先頭

©2009-2025 Movatter.jp