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

Search form reset button #2994

Merged
merged 13 commits into from Jul 27, 2023
Merged

Conversation

xmorave2
Copy link
Contributor

There are still some issues to discuss I think (like: should this be configured to show?). But I would like to have some feedback.

@demiankatz
Copy link
Member

@xmorave2, your styling seems to be having a side effect on the language control (at least in the bootprint3 theme; I haven't looked at others yet).

Before:

image

After:

image

Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

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

Thanks, @xmorave2! I'd be interested in input from others (like @crhallberg), but from my perspective, this seems like a pretty clear and unintrusive addition that probably does not need to be made configurable as long as it passes accessibility review. In addition to the minor problem noted above, I've left a few other comments below.

themes/bootstrap3/templates/search/searchbox.phtml Outdated Show resolved Hide resolved
themes/bootstrap3/templates/search/searchbox.phtml Outdated Show resolved Hide resolved
@xmorave2
Copy link
Contributor Author

Thank @demiankatz, I (hopefully) addressed all issuses.

@demiankatz demiankatz added this to the 9.1 milestone Jul 18, 2023
Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

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

This is looking better, but I'm seeing a new style issue (at least in Firefox -- I didn't try other browsers). In all three provided themes, the search box and type drop down are no longer aligned with each other. Screen shots are from bootprint3, but the other two are similar.

Before (dev branch):

image

After (this branch):

image

See also a few very minor suggestions below.

I've put a 9.1 milestone on this, since I'm pretty confident we can get it polished before that release, and this will encourage discussion on the next Community Call. I'd also like to get a review from someone more UI-oriented than myself before merging it, but I won't request that until we finish fixing the minor issues from my own reviews, to avoid any redundant suggestions.

themes/bootstrap3/js/common.js Outdated Show resolved Hide resolved
themes/bootstrap3/templates/search/searchbox.phtml Outdated Show resolved Hide resolved
@xmorave2
Copy link
Contributor Author

@demiankatz: Another round done ;) I incorporated your suggestions and fixed the visual glitch.

Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

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

Thanks, @xmorave2 -- this is looking much better to me. Just one remaining problem that I can see: the clear icon is nearly invisible in the sandal theme:

image

We may need some sandal-specific styling to adjust for this problem.

That detail aside, though, I think this is ready for input from others, so I'm going to request a couple more reviews -- I'm interested in @ckaz's thoughts on accessibility and @crhallberg's comments on the specific styles and Javascript approach.

@xmorave2
Copy link
Contributor Author

I fixed the color in sandal theme

@demiankatz
Copy link
Member

Thanks, @xmorave2! Looks good to me now. I also merged dev into this branch to resolve minor conflicts caused by other recent style changes. This has my personal approval, but I'll wait to mark it as approved until we receive feedback from others.

@crhallberg
Copy link
Contributor

crhallberg commented Jul 25, 2023

I'm not seeing any evidence of this interfering with the clear button that some browsers add to type=search inputs, which is good, but that's my only concern.

@demiankatz
Copy link
Member

Thanks, @crhallberg, that's a good point! I'm glad that we're not seeing any problems related to this behavior, but do we understand why? I don't see an obvious reason why the browser wouldn't try to add its own clear button to this input, so why aren't we seeing double in some cases? I notice that Chrome isn't adding a clear button on the existing VuFind search box (e.g. at the public demo). Why not? It might be good to see if we can force the pseudo-element to appear so we can be sure that there is no edge case where it's going to cause problems.

I also found this StackOverflow thread which talks about styling the Webkit pseudo-element. If nothing else, maybe we should explicitly hide that in our styles if we think there's any chance we might encounter it. Or maybe we should try to leverage the native function where available, though I personally prefer not to get into supporting features that only work in certain browsers. @xmorave2, what do you think about all this?

@xmorave2
Copy link
Contributor Author

It is not interfering with standard reset button in webkit/chrome based browsers, because normalize from bootstrap is hiding it. See https://github.com/twbs/bootstrap/blob/v3.4.1/less/normalize.less#L367

I would be happy to use the standard reset button provided by browser, but Firefox is still not implementing it.

Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

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

Thanks, @xmorave2! Since we have a clear explanation for why the browser-provided button is hidden, I have no concerns about conflicts arising from the new functionality, and I think this is the best option for the present since not all browsers offer a standard implementation. I will merge this now!

@demiankatz demiankatz merged commit 8e12272 into vufind-org:dev Jul 27, 2023
7 checks passed
@demiankatz demiankatz deleted the searchFormReset branch July 27, 2023 15:27
@ckaz
Copy link
Contributor

ckaz commented Aug 2, 2023

Sorry, I've been away on holiday leave. I have no issues with this PR -- looks perfect to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants