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

Add functional search to header #9

Merged
merged 2 commits into from
Oct 15, 2021
Merged

Add functional search to header #9

merged 2 commits into from
Oct 15, 2021

Conversation

iandunn
Copy link
Member

@iandunn iandunn commented Sep 29, 2021

See WordPress/wporg-news-2021#6

Builds on top of #8

Should roughly match the mockup, but not be pixel perfect. On mobile, click the icon to open menu; on desktop hover over it. searches should go to w.org/search to cover all sites.

@iandunn iandunn added the [Type] Enhancement New feature or request label Sep 29, 2021
@iandunn iandunn self-assigned this Sep 29, 2021
@iandunn
Copy link
Member Author

iandunn commented Oct 13, 2021

This is blocked on WordPress/gutenberg#35572

If that gets traction, then I think we're good to go ahead w/ the wp:search block. If not, then I think we'll have to build a custom form.

@iandunn iandunn added the [Status] Blocked Can't move forward until something outside the issue/PR is resolved label Oct 13, 2021
@iandunn iandunn force-pushed the search branch 2 times, most recently from fdfdaa1 to 6779dd7 Compare October 14, 2021 22:00
@iandunn iandunn removed the [Status] Blocked Can't move forward until something outside the issue/PR is resolved label Oct 14, 2021
@iandunn iandunn added this to the News launch milestone Oct 14, 2021
@iandunn iandunn marked this pull request as ready for review October 14, 2021 22:11
@iandunn iandunn requested a review from coreymckrill October 14, 2021 22:11
Copy link
Contributor

@coreymckrill coreymckrill left a comment

Choose a reason for hiding this comment

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

Code looks fine, and well-documented.

Here are a few alignment issues I see in Firefox, running trunk for wporg-news-2021 and this branch for wporg-mu-plugins. I realize this PR is not meant to be pixel-perfect, so feel free to disregard if these will be fixed later.

There's a very narrow window where the menu items wrap to a second line before they get hidden by the ellipses:

line-wrap

Also in that screenshot, you can see that the handle of the magnifier icon gets cut off.

On narrower screens, the right edge of the magnifier icon gets cut off:

trimmed-magnifier

When opening the mobile search menu item, the input label is doubled up:

double-search

@iandunn
Copy link
Member Author

iandunn commented Oct 15, 2021

narrow window where the menu items wrap to a second line before they get hidden by the ellipses

Huh, I don't get that on mine. You've got 4bf2721 pulled, right?

If so, is increasing @custom-media --desktop-wide to 1450px enough to account for whatever small variation is causing that?

the handle of the magnifier icon gets cut off.

I don't see it much on my machine, but d826d31 should hopefully fix it

opening the mobile search menu item, the input label is doubled up

huh, that's explicitly hidden, and it works on my system:

& .wp-block-navigation-item__label {
display: none;
}

when you inspect that element, is the above rule absent? or is it overridden by something?

@iandunn
Copy link
Member Author

iandunn commented Oct 15, 2021

I'm gonna merge this to avoid juggling branches, but I'll iterate based on your responses to my previous comment.

@iandunn iandunn merged commit 703ca5d into trunk Oct 15, 2021
@iandunn iandunn deleted the search branch October 15, 2021 20:52
@coreymckrill coreymckrill restored the search branch October 15, 2021 21:54
@coreymckrill coreymckrill deleted the search branch October 15, 2021 21:55
@coreymckrill
Copy link
Contributor

Huh, I don't get that on mine. You've got 4bf2721 pulled, right?

I've got the search branch checked out, which does appear to have that commit...

If so, is increasing @Custom-Media --desktop-wide to 1450px enough to account for whatever small variation is causing that?

The Openverse link stops wrapping to a second line at 1478px.

when you inspect that element, is the above rule absent? or is it overridden by something?

🤔 When I inspect that element, the classname is .wp-block-navigation-link__label rather than .wp-block-navigation-item__label. This is with WP 5.9-alpha-51906 and GB 11.7.0.

@iandunn
Copy link
Member Author

iandunn commented Oct 15, 2021

🤔 huh, I'll open a new issue and look into it next week 👍🏻

@iandunn iandunn mentioned this pull request Oct 15, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants