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

feat: add skeleton error states #727

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

Conversation

ryanomackey
Copy link
Contributor

Updates

Demo screenshot or recording

2020-07-28 12 43 41

Review checklist (for reviewers only)

  • Demos all features
  • Documented/annotated
  • Matches UI/UX specs
  • Meets the code style guide
  • Accessible
  • Mobile first (responsive)
  • RTL support (bidirectional text)
  • Performant (limited bloat)

@ryanomackey ryanomackey requested review from sophiiae and removed request for a team July 28, 2020 17:46
Copy link
Contributor

@natashadecoste natashadecoste left a comment

Choose a reason for hiding this comment

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

The demos are looking good, i'll re-review after the conflicts are fixed 👍

errorIcon.exit().remove();

// Exclamation point

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

Copy link
Contributor

@natashadecoste natashadecoste left a comment

Choose a reason for hiding this comment

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

when i hover on orange status icon, it turns purple 🟣
image
image

you can see it in: https://deploy-preview-727--carbon-charts-core.netlify.app/?path=/story/line--line-error

@ryanomackey
Copy link
Contributor Author

when i hover on orange status icon, it turns purple 🟣

Ha. I almost hate to fix that.

natashadecoste
natashadecoste previously approved these changes Aug 6, 2020
Copy link
Member

@theiliad theiliad left a comment

Choose a reason for hiding this comment

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

mainly for me the icon is standing out. it isn't the exclamation carbon-icon which is a problem. @natashadecoste could you assist @ryanomackey here with how you used that icon in MeterChart?

loading: false,
error: {
title: "No data available",
subtitle: "Lorem ipsum dolor sit."
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should use a real subtitle here to make for a better demo? e.g. Unable to reach application servers at this time

@@ -422,3 +422,29 @@ export const lineSkeletonOptions = {
loading: true
}
};

// line - error
export const lineErrorData = [];
Copy link
Member

Choose a reason for hiding this comment

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

What happens if data is provided? would it still show the error?

this.removeSkeleton();
this.removeErrorMessage();
}
}
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't the error be shown at all times regardless of whether the chart is loading or not? Errors probably won't always just be contained to the data, they could be about anything, and if you don't want an error to show you'd probably just remove it from options...?


const exclamationPoint = errorContainer
.selectAll("text.bx--cc--error-message__exclamation-point")
.data(["!"]);
Copy link
Member

Choose a reason for hiding this comment

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

we should be using the correct carbon-icon here rather than an !

.classed("bx--cc--error-message__subtitle", true)
.merge(errorSubtitle)
.attr("x", "2.65em")
.attr("y", height / 2 + 18)
Copy link
Member

Choose a reason for hiding this comment

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

what does / 2 + 18 do?

.append("text")
.classed("bx--cc--error-message__title", true)
.merge(errorTitle)
.attr("x", "2.25em")
Copy link
Member

Choose a reason for hiding this comment

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

what's 2.25em?

.data([
{
cx: "1em",
cy: height / 2 - 5,
Copy link
Member

Choose a reason for hiding this comment

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

what does / 2 - 5 do?

@theiliad
Copy link
Member

theiliad commented Aug 7, 2020

Also, I'm still seeing the purple hover state in the demos
image

@theiliad
Copy link
Member

theiliad commented Aug 18, 2020

Tyler or Jeannie, could you please review? Do we just need to support error states here or should we support other icons & statuses for other types of messages?

e.g.
image

@loganmccaul
Copy link
Contributor

@jeanservaas could you take a look at @theiliad's questions?

@ryanomackey could you respond to some of @theiliad's questions?

@theiliad
Copy link
Member

@jeanservaas could you take a look at @theiliad's questions?

@ryanomackey could you respond to some of @theiliad's questions?

I've just msged Jeannie to review. I think overall I'd like to know if we should add support for more icons or other error styling that we might need.

Being able to also add an action might be useful, most use cases that I've seen want to show a button (e.g. no activities to visualize right now => upload some activity data)

@jeanservaas
Copy link

jeanservaas commented Oct 15, 2020

@theiliad I would def just start with support icons here. Eventually we want to create a more comprehensive set of status icons (there's def and issue somewhere in the carbon backlog) but it hasn't moved forward yet.

ps, right now (in Safari) I'm seeing the icons but without the adornments (the exclamation mark)

image

Copy link
Member

@theiliad theiliad left a comment

Choose a reason for hiding this comment

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

Let's fix the react & angular issues and we can do a final code review 💯

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.

None yet

5 participants