Closed Bug 905260 Opened 11 years ago Closed 11 years ago

[messages] padding issues in the recipient panel

Categories

(Firefox OS Graveyard :: Gaia::SMS, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: julienw, Assigned: jugglinmike)

References

Details

(Keywords: polish)

Attachments

(4 files, 1 obsolete file)

Various problems I've seen while reviewing bug 884890:

* the margin (or padding, I don't know) top is a little too large in multiline mode
* we should remove the padding for placeholders; when we add a big big recipient (that takes all the available space), then the placeholder is at the next line, and the cursor does not seem to be at the right place. It's really aligned with the start of the text in the above recipient, but since placeholders don't have borders, it doesn't look good.
Attached image screenshot
This screenshot shows both issues.
Note that people in our target market usually have very long names ;)
Summary: [messages] padding issues in the recipient panem → [messages] padding issues in the recipient panel
Mike's next work ? ;)
Flags: needinfo?(mike)
We can also see the second problem when typing a long recipient and it gets moved to the next line while the user is typing because it's too long. While it's not in "finished" state (with the border) we see the extra padding.
I'll take this and begin work as soon as we land Bug 905273 (which necessarily modifies the structure of this component).
Assignee: nobody → mike
Depends on: 905273
Flags: needinfo?(mike)
Attached patch 905260-recipients-padding.patch (obsolete) — Splinter Review
Hi Julien,

From comment 0:

> * we should remove the padding for placeholders; when we add a big big recipient (that takes all the available space), then the placeholder is at the next line, and the cursor does not seem to be at the right place. It's really aligned with the start of the text in the above recipient, but since placeholders don't have borders, it doesn't look good.

If we remove the padding, then recipients will suddenly shift when they become "assimilated". This could be especially disorienting when adding a recipient that (prior to being accepted) just fits on the final line. After accepting this recipient, it will receive additional padding and suddenly render on a new line.

I think the real problem here is that the placeholders don't have borders, so that when they are "assimilated", they shift by one pixel in both dimensions. This patch renders "contenteditable" recipients with a transparent border so that this no longer occurs.

Does this approach make sense to you?
Attachment #793726 - Flags: review?(felash)
Victoria, could you please have a look to this screenshot ? Especially I'd like to know if the vertical space (1) between the header and the recipient looks good to you, same for the vertical space (2) between the last recipient and the recipient panel border.

Currently (2) is the same as the specified space between 2 lines. But for me, the fact that (1) and (2) are different feels weird. And I don't think we should lower (1) either. Therefore I'd like your advice on this.
Attachment #793979 - Flags: review?(vpg)
(In reply to Mike Pennisi [:jugglinmike] from comment #6)
> Created attachment 793726 [details] [diff] [review]
> 905260-recipients-padding.patch
> 
> Hi Julien,
> 
> From comment 0:
> 
> > * we should remove the padding for placeholders; when we add a big big recipient (that takes all the available space), then the placeholder is at the next line, and the cursor does not seem to be at the right place. It's really aligned with the start of the text in the above recipient, but since placeholders don't have borders, it doesn't look good.
> 
> If we remove the padding, then recipients will suddenly shift when they
> become "assimilated". This could be especially disorienting when adding a
> recipient that (prior to being accepted) just fits on the final line. After
> accepting this recipient, it will receive additional padding and suddenly
> render on a new line.
> 
> I think the real problem here is that the placeholders don't have borders,
> so that when they are "assimilated", they shift by one pixel in both
> dimensions. This patch renders "contenteditable" recipients with a
> transparent border so that this no longer occurs.

Yep this is a good change, thanks.

However, it still looks weird when the placeholder is the first in a line, and there are other recipients above. I understand your argument though, and I have a counter argument ;)

Could we, for placeholders, nullify the left-padding, but double the right-padding ? This way the whole placeholder would have the same width as a assimilated recipient, and would correctly go to the next line if necessary.

What do you think ?
(In reply to Julien Wajsberg [:julienw] from comment #8)

> Could we, for placeholders, nullify the left-padding, but double the
> right-padding ? This way the whole placeholder would have the same width as
> a assimilated recipient, and would correctly go to the next line if
> necessary.

As discussed on IRC, when doing this, when assimilated the recipient would "jump" to the right. I just tried on gmail, and they're actually doing just this. I think this is also less important than you think because usually users will choose an existing contact from the suggestion list rather than typing a whole number.

Another solution that was suggested by Jeremie Patonnier, is to have a pale border for placeholders.

Flagging NI on Victoria for guidance on this issue.
Flags: needinfo?(vpg)
Also note that the vertical spacing above the first line (1) is necessary to provide a visual affordance of the recipients list in single-line mode. If we reduce that spacing during multi-line mode, we will have to re-position the "To:" label when switching modes, which seems undesirable.
Hi Julien, I am attaching the original specs for this. As you can see, you'll never have this panel that big, the recipients will be placed behind the header leaving a small portion visible giving a hint of more information sitting there. So when the user adds recipients, the list would move up (behind the header). Therefore, the advise you're asking for is a bit obsolete. Is there a strong reason why this is not following the specs? Please let me know. 

Thanks!
Victoria, these screenshots are when we slide down the panel. I agree you gave a specification for when the panel is slid up, but we have no specification for this when the panel is slid down.
Flags: needinfo?(vpg)
Hi Julien et all,

I understand what you say about 2 different sizes on top and bottom, but the spacing you show in this screenshot looks good for a few reasons:

1. Since we gave room to have a hint of what it is hidden behind the header, that bigger spacing before the header is needed to make a part of the hidden bubbles visualble and It's better not to reposition the "to" field and the "+" after pulling down that area.
2. If we do not move the to space and the +, moving the recipients bubbles upper will missalign them from this elements.
3. The user needs space to tap into the bubbles.

So I would put first all the above fundaments before changing those spaces for the sake of modularity.

Thanks!
Victoria

 (In reply to Julien Wajsberg [:julienw] from comment #7)
> Created attachment 793979 [details]
> screenshot with the patch
> 
> Victoria, could you please have a look to this screenshot ? Especially I'd
> like to know if the vertical space (1) between the header and the recipient
> looks good to you, same for the vertical space (2) between the last
> recipient and the recipient panel border.
> 
> Currently (2) is the same as the specified space between 2 lines. But for
> me, the fact that (1) and (2) are different feels weird. And I don't think
> we should lower (1) either. Therefore I'd like your advice on this.
Flags: needinfo?(vpg)
If it looks good for you, it looks good for me :) Thanks !

There is another question for you in comment 9 ;-)

To summarize:
See attachment 790331 [details]: when on a new line, the cursor for the currently-editing placeholder is aligned with the text above, which looks not good to me. I'd rather see it aligned with the left border instead.

However, this is not possible to do this technically. Therefore, there are 2 possible solutions:

* solution 1: we remove the padding-left for placeholders, but we double the padding-right (+). The consequence to this is that when the user types a number and then press enter, the number will "jump" to the right.
I just tried this on gmail, and they're actually doing just this. I think this is also probably less important than what we might think because usually users will choose an existing contact from the suggestions list rather than typing a whole number.

(+) doubling the padding-right ensures that the number will go on the next line if necessary, just like an "assimilated" recipient.

* solution 2: we have a border for placeholders, just like "assimilated" recipients. Of course, the border would be a lot paler and lighter, and we would still have a white background. For this solution.

So... we need to choose between those solutions... or just keep what we have now, but I think either of these solutions would be better.

For solution 2, we'll need the color you propose for the border.

Thanks Victoria !
Flags: needinfo?(vpg)
Hi Julien,
I think the best is Solution Nbr 1, i've seen it many times and that "jump" is not uncomfortable, so let's move forward with it.

Thanks!
Flags: needinfo?(vpg)
Attachment #793979 - Flags: review?(vpg)
So Mike, we have our way forward now :)
Yessir! I hope to get to this later today
Mike, do you think you could wrap-up this today ? I think there is not much to do to land it, right ?
Hey Julien,

You're right--there was very little to update based on Victoria's feedback :)
Attachment #793726 - Attachment is obsolete: true
Attachment #793726 - Flags: review?(felash)
Attachment #798542 - Flags: review?(felash)
Comment on attachment 798542 [details] [diff] [review]
905260-recipients-padding-v2.patch

r=me

thanks !
Attachment #798542 - Flags: review?(felash) → review+
master: https://github.com/mozilla-b2g/gaia/commit/bca41fe990f748d23035c1c4588cff73c21b8ad4

Thanks Julien and Victoria!
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: