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

Alert: Redesign with tinted background #66918

Merged
merged 13 commits into from May 1, 2023
Merged

Alert: Redesign with tinted background #66918

merged 13 commits into from May 1, 2023

Conversation

torkelo
Copy link
Member

@torkelo torkelo commented Apr 20, 2023

Our current inline banners just look so "meh", and I have been wanting to move to a move "transparent" and common design for years.

Current:
Screenshot from 2023-04-20 10-22-20
Screenshot from 2023-04-20 10-22-36
Screenshot from 2023-04-20 10-22-49

New design (in collaboration with Staton and Erik)

Screenshot from 2023-04-28 16-40-07

Screenshot from 2023-04-28 16-15-42

Screenshot from 2023-04-28 16-40-12

Screenshot from 2023-04-28 16-40-26

Screenshot from 2023-04-28 16-50-20

Screenshot from 2023-04-28 16-47-54

@torkelo torkelo added this to the 10.0.0 milestone Apr 20, 2023
@torkelo torkelo marked this pull request as ready for review April 28, 2023 14:51
@torkelo torkelo requested review from a team as code owners April 28, 2023 14:51
@torkelo torkelo requested review from andresmgot, ashharrison90 and L-M-K-B and removed request for a team April 28, 2023 14:51
@torkelo
Copy link
Member Author

torkelo commented Apr 28, 2023

@staton-hyse11 pushed the latest changes, must rush to school now!

@torkelo torkelo changed the title InlineBanner: POC of redesign for G10 Alert: Redesign for G10 Apr 28, 2023
@torkelo torkelo removed request for a team, andresmgot and L-M-K-B April 28, 2023 15:16
@torkelo torkelo changed the title Alert: Redesign for G10 Alert: Redesign with tinted background Apr 28, 2023
@torkelo torkelo added the no-backport Skip backport of PR label Apr 28, 2023
@torkelo torkelo requested review from ergoerik and JoaoSilvaGrafana and removed request for amy-super April 28, 2023 15:17
@torkelo
Copy link
Member Author

torkelo commented Apr 28, 2023

Here is an example of how it really improves large info boxes:

Screenshot from 2023-04-28 17-31-54

Screenshot from 2023-04-28 17-32-48

Copy link
Contributor

@JoaoSilvaGrafana JoaoSilvaGrafana left a comment

Choose a reason for hiding this comment

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

These do look so much better, nice job! 👏

packages/grafana-data/src/themes/createColors.ts Outdated Show resolved Hide resolved
<IconButton aria-label="Close alert" name="times" onClick={onRemove} size="lg" type="button" />
<Button
Copy link
Contributor

Choose a reason for hiding this comment

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

What was the reason for changing to Button? Is it just the "squareness" of it? Just curious for our own investigation of unifying these two options

Copy link
Member Author

Choose a reason for hiding this comment

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

@JoaoSilvaGrafana yea, two reasons the squareness (which looks good when it matches the shape of the corner it's in) and the color of the hover effect for a secondary fill button is transparent so it takes on the color tint of the background which looks really good.

@@ -113,6 +120,7 @@ const getStyles = (
) => {
const color = theme.colors[severity];
const borderRadius = theme.shape.borderRadius();
const borderColor = tinycolor2(color.border).setAlpha(0.2).toString();
Copy link
Contributor

Choose a reason for hiding this comment

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

This just made me realize that we actually use setAlpha in a bunch of places, so we need to remember this during the color tokens exploration so we can take these into account.

Copy link
Member Author

Choose a reason for hiding this comment

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

@JoaoSilvaGrafana yes, if we need this weak colored border in many places it should be added as a token in theme. but so far this and the Badge is are the only two I know of we do this with the border color .

pkg/kinds/dashboard/dashboard_gen.go Outdated Show resolved Hide resolved
Copy link
Contributor

@staton-hyse11 staton-hyse11 left a comment

Choose a reason for hiding this comment

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

LGTM! I've created a backlog item for the follow-up tasks here

@torkelo torkelo merged commit d2bc270 into main May 1, 2023
15 checks passed
@torkelo torkelo deleted the alert-redesign-G10 branch May 1, 2023 13:50
@teddyba
Copy link

teddyba commented May 3, 2023

I love the new design -- I think it draws attention to the information without throwing off the visual balance of the page. We actually used this style with the transparent colored background in a few places already in Cloud products, because the traditional banner style was too overwhelming.

Great job!!

@torkelo
Copy link
Member Author

torkelo commented May 17, 2023

thanks @teddyba , yea I really think it makes the UI look a bit more fresh and soft. Not as hard and solid :)

@zerok zerok modified the milestones: 10.0.0, 10.0.0-preview May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants