Git Product home page Git Product logo

Comments (11)

gui-santos avatar gui-santos commented on June 26, 2024 1

IMO, they look great! It really improves the readability of the notifications πŸ‘

from forma-36.

domarku avatar domarku commented on June 26, 2024 1

Great proposal @m10l ✨ I've got couple of comments:

  • This definitely makes them more readable!
  • There should be some more vertical spacing between the text elements, spacing-2xs (4px) or even xs (8px), to make the message easier to scan and the perceived click area around the CTA larger
  • The icon should be horizontally aligned with the Title / Close button. People scan messages in the form of the letter F, but this way the eye pops back left to view the icon after reading the Title. Examples from other systems: Atlassian, Polaris, Carbon
  • Can we use the TextLink component for the CTA here? It would make it stand out a bit more and consistent with the rest of the web app.
  • Consider text wrapping in the body. The right side of the notification β€” close button with white background β€” should have similar spacing as the left side β€” icon with coloured background, so no text goes below the close button.

Questions

  • Where is the CTA when there's no body text? An example might be a "success" message with an Undo
  • Could we rename the component to Message or Toast or would that be a breaking change?
  • Should we replace the icon in the red error message with the Error Icon to make it different than the icon for the warning message?

Here's a sketch of all the details I mentioned above:
Group

from forma-36.

m10l avatar m10l commented on June 26, 2024 1

@domarku Awesome, thanks for the review and suggestions

There should be some more vertical spacing between the text elements, spacing-2xs (4px) or even xs (8px), to make the message easier to scan and the perceived click area around the CTA larger

Cool, I think this is worth tackling at the same time too so will do this as part of the same PR

The icon should be horizontally aligned with the Title / Close button. People scan messages in the form of the letter F, but this way the eye pops back left to view the icon after reading the Title. Examples from other systems: Atlassian, Polaris, Carbon

The examples linked all have a solid background for the entire notification, so I think your suggestion makes sense there, but doesn't work for what we're doing as it's a smaller section with a solid colour background.

Can we use the TextLink component for the CTA here? It would make it stand out a bit more and consistent with the rest of the web app.

Ah good spot, was using TextLink but the wrong colour.

Consider text wrapping in the body. The right side of the notification β€” close button with white background β€” should have similar spacing as the left side β€” icon with coloured background, so no text goes below the close button.

Cool, think text is already prevented from going beneath the close button, but I'll test it to make sure.

Where is the CTA when there's no body text? An example might be a "success" message with an Undo

It's always at the bottom

Could we rename the component to Message or Toast or would that be a breaking change?

That'd be a breaking change, wouldn't recommend it for now

Should we replace the icon in the red error message with the Error Icon to make it different than the icon for the warning message?

Ooo, definitely, good shout.

from forma-36.

m10l avatar m10l commented on June 26, 2024 1

Right on @m10l! Thanks for addressing all my comments. Any chance you would consider putting the CTA inline in case of no body text? Like so:
Group Copy 8

@domarku Still not in favour of doing this, I think introduces more potential problems than it tries to solve.

Pros/cons

  • βž• Everything readable on a single line
  • βž–Concerns around truncation - how to handle if the CTA and title are both super long? What if the title spans multiple lines?
  • βž–Consistency - I'd argue that moving the CTA based on number of lines of text could create a jarring experience for the user

from forma-36.

m10l avatar m10l commented on June 26, 2024 1

@domarku That'd be awesome! Shall I close this an open a PR?

from forma-36.

domarku avatar domarku commented on June 26, 2024 1

Do it 🀠

from forma-36.

wichniowski avatar wichniowski commented on June 26, 2024 1

looks really good! now if you compare the old notification to it, the old one look super outdated and wrong so 100x for the proposal

from forma-36.

domarku avatar domarku commented on June 26, 2024

I see that Github has the icon vertically centered in their Toast component. Look at others to get inspired not to prove a point! :) But, nevertheless, I still think it should be aligned to the top.

from forma-36.

domarku avatar domarku commented on June 26, 2024

Right on @m10l! Thanks for addressing all my comments. Any chance you would consider putting the CTA inline in case of no body text? Like so:
Group Copy 8

from forma-36.

domarku avatar domarku commented on June 26, 2024

Ah, good points. Although that makes me think we should have come copy guidelines for the notifications. I'll give it a go at writing and adding them to the thread later in the day.

from forma-36.

m10l avatar m10l commented on June 26, 2024

Closing as PR created here: #449

from forma-36.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.