FirefoxUX / photon

Firefox’s Photon Design System.
https://design.firefox.com/photon/
Mozilla Public License 2.0
274 stars 74 forks source link

Notification buttons look odd on wide displays; could be right-aligned #248

Closed tofumatt closed 6 years ago

tofumatt commented 6 years ago

See: https://github.com/mozilla/addons-frontend/pull/4149 + https://github.com/mozilla/addons-frontend/pull/4149#pullrequestreview-88637151 for context.

Basically, I think the buttons on notifications could call a bit more attention to themselves and also look a bit nicer were they aligned far away from the text inside the notification instead of right next to the text. My amateur Pixelmator POC is here:

Before

34894376-c3cc74a0-f7a6-11e7-9a04-4aa047aad379

After

screenshot 2018-01-13 00 36 23

Would this be a design change we could make to Photon notifications? Maybe I'm missing the reason to keep them close to the text. 😄

brassy- commented 6 years ago

@tofumatt thank you for the feedback! Message bar is still pretty new as a component, and this kind of feedback are gold for us! <3

Can you make a message bar that doesn't grow as much as the parent-container?

tofumatt commented 6 years ago

We could in some cases… but then it might look a bit strange as it’s taking up less than the width of the container when everything else is full-width. It’d probably look pretty strange as well.

I think in general we'd like to keep the message bar as wide as the parent to draw attention to it as well 😄

brassy- commented 6 years ago

I think in general we'd like to keep the message bar as wide as the parent to draw attention to it as well 😄

yeah, that's the goal!

I'd just like to have all of three to try to get a more inform decision. Align the action always on the left can create weird spacing when the message has multiple-lines.

brassy- commented 6 years ago

Hey @tofumatt, Sorry for replying to you after such a long time. I'm facing a kind of issue with your request; I hope you can maybe help me to solve it from a technical perspective.

If we always align the button to the right, what is going to happen when we have a small screen situation? As you can see, this is not ideal - and somehow worst :).

mb-align-right

I think the solution here is to edit the way we're thinking the width. We can suggest having width: 100% for small media queries and width: auto for the bigger ones. How does it sound? :)

jens1o commented 6 years ago

We can suggest having width: 100% for small media queries and width: auto for the bigger ones. How does it sound? :)

I like the idea.

aminalhazwani commented 6 years ago

We see this issue as fixed. CC @pwalm to follow up with engineering.

jens1o commented 6 years ago

We see this issue as fixed. CC @pwalm to follow up with engineering.

You didn't do anything? image

aminalhazwani commented 6 years ago

hey @jens1o, you can find the updated documentation here https://design.firefox.com/photon/components/message-bars.html#message-on-multiple-lines

jens1o commented 6 years ago

Alright, I see what you propose as of now, but personally I'd like the button to always use the space and the message bar to be full-width.

brassy- commented 6 years ago

@jens1o How do you make it work when the message goes on multiple lines? Or when the message bar is also dismissable? Our rationale is the following. From a content perspective, the buttons belong with the message: what's going on + how can fix it. We want to have this union to be clear visually, that's why the buttons are close to the content.

I'm curious to understand what is your reasoning and, as always, thank you for the feedback! :)

jens1o commented 6 years ago

@brassy-

Something like this: image

The button is horizontally centered in the message box. I've added some margin between the text and the button.

The relationship is very clear and the button to dismiss the notification could be added above it(perhaps both are horizontally centered?).

jens1o commented 6 years ago

@brassy- @aminalhazwani Shall I create a new issue for that so you can discuss about it? :)