Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#20584 closed defect (bug) (fixed)

Styling and RTL style fixes for user/site autocomplete

Reported by: ocean90's profile ocean90 Owned by: ryan's profile ryan
Milestone: 3.4 Priority: normal
Severity: normal Version: 3.4
Component: RTL Keywords: has-patch commit
Focuses: Cc:

Description

Related: #19810

Attachments (9)

20584.patch (671 bytes) - added by ocean90 13 years ago.
wp-autocomplete.png (19.7 KB) - added by helenyhou 13 years ago.
20584.styling.diff (2.5 KB) - added by helenyhou 13 years ago.
wp-autocomplete-2.png (16.6 KB) - added by helenyhou 13 years ago.
20584.styling2.diff (4.3 KB) - added by helenyhou 13 years ago.
autocomplete-width.png (35.8 KB) - added by dgwyer 13 years ago.
Comparison of top border designs
autocomplete-long.png (24.5 KB) - added by helenyhou 13 years ago.
20584.2.diff (3.8 KB) - added by helenyhou 13 years ago.
20584.3.diff (4.6 KB) - added by helenyhou 13 years ago.

Download all attachments as: .zip

Change History (29)

@ocean90
13 years ago

#1 follow-up: @nacin
13 years ago

Maybe in the process we could make it look slightly better overall?

#2 in reply to: ↑ 1 @helenyhou
13 years ago

Replying to nacin:

Maybe in the process we could make it look slightly better overall?

Perhaps something like this? Can upload the patch to this ticket and repurpose it or make another one for general styling.

http://core.trac.wordpress.org/raw-attachment/ticket/20584/wp-autocomplete.png

#3 follow-up: @nacin
13 years ago

Looks great. Perhaps chop off the rounded corners on the top so it integrates nicely into the input. Or maybe not. I don't care. Looks way better than we have now.

#4 @helenyhou
13 years ago

  • Summary changed from RTL style fixes for user/site autocomplete to Styling and RTL style fixes for user/site autocomplete

#5 in reply to: ↑ 3 @helenyhou
13 years ago

Replying to nacin:

Perhaps chop off the rounded corners on the top so it integrates nicely into the input.

20584.styling2.diff accomplishes this (also changes the input focus border color for blue in general - there wasn't one at all before):

http://core.trac.wordpress.org/raw-attachment/ticket/20584/wp-autocomplete-2.png

Otherwise, 20584.styling.diff

Edit: note that neither of my patches includes the RTL fixes from ocean90.

Last edited 13 years ago by helenyhou (previous) (diff)

#6 @ocean90
13 years ago

  • Keywords commit added

#7 @ryan
13 years ago

  • Owner set to ryan
  • Resolution set to fixed
  • Status changed from new to closed

In [20705]:

Styling and RTL style fixes for user/site autocomplete. Props ocean90, helenyhou. fixes #20584

#8 @dgwyer
13 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

I have been experimenting with the autocomplete jQuery widget included in the core to pull in post titles. Because the length of any post can be longer than expected this results in the autocomplete box being longer than the input box and causes an issue with the top border (see attached screenshot).

In circumstances like this the original design where the top border retains the rounded corners works best. If you could always guarantee that they would both match then the revised design would be preferable.

For unexpectedly long autocomplete results the matching input box would have to be very long too which wouldn't look great. Trying to go to extra lengths to match both widths wouldn't be worth it anyway?

P.S. Apologies for reopening ticket. Not sure whether I should reopen or start a new ticket.

@dgwyer
13 years ago

Comparison of top border designs

#9 @SergeyBiryukov
13 years ago

  • Keywords commit removed

#10 @SergeyBiryukov
13 years ago

The ability to use the autocomplete widget for post titles sounds like a separate enhancement. I'd suggest creating a new ticket.

#11 @dgwyer
13 years ago

I'm not requesting an enhancement to support post titles as such. That was just an example to illustrate the point that the autocomplete results can potentially extend beyond the input box width (as per my screenshot).

To safeguard against this it may be better to use Helen's original CSS with the top rounded corners.

#12 @SergeyBiryukov
13 years ago

  • Keywords ui-feedback added

#13 @nacin
13 years ago

I think the bottom two in https://core.trac.wordpress.org/attachment/ticket/20584/autocomplete-width.png look fine. Not great, but better than the top two.

The top two would look better if there was a pixel between the input and the autocomplete. I don't care either way. I think this is probably good enough for 3.4.

@helenyhou
13 years ago

#14 @helenyhou
13 years ago

  • Keywords ui-feedback removed

20584.2.diff does two things:

  • Lengthens the inputs in the Right Now network dashboard widget
  • Does some JS magic so we can have a border around the whole autocomplete widget/list

Looks like this when an item is longer (shorter items still look the same as before):

http://core.trac.wordpress.org/raw-attachment/ticket/20584/autocomplete-long.png

#15 @helenyhou
13 years ago

Actually, it does a third thing: removes some CSS color cruft from the main stylesheet and de-dupes the JS closures for open/close callbacks.

#16 @dgwyer
13 years ago

Looks great!

#17 follow-up: @nacin
13 years ago

Good here. Can .ui-autocomplete not be assigned margin-top: -1px in the CSS?

#18 in reply to: ↑ 17 @helenyhou
13 years ago

Replying to nacin:

Can .ui-autocomplete not be assigned margin-top: -1px in the CSS?

No, it gets absolutely positioned and is wrong the first time it appears. Have a better solution, actually, and am looking at how it actually displays in RTL, so will re-patch soon.

@helenyhou
13 years ago

#19 @nacin
13 years ago

  • Keywords commit added

Suggest commit on 20584.3.diff.

#20 @ryan
13 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In [20984]:

Site/user autocomplete fixes.

  • Lengthen the inputs in the Right Now network dashboard widget
  • Border around the whole autocomplete widget/list
  • Handle long strings
  • Remove some CSS color cruft from the main stylesheet and de-dupe the JS closures for open/close callbacks.

Props helenyhou
fixes #20584

Note: See TracTickets for help on using tickets.