waldyrious / primerpedia

Simplified extracts of Wikipedia articles, showing just the basic information.
https://primerpedia.toolforge.org
Other
11 stars 7 forks source link

Disable search button when search field is empty #52

Closed Jan-Ka closed 6 years ago

Jan-Ka commented 6 years ago

Live preview of the changes

This resolves #43 .

While implementing the required changes I thought about the submit call to search in the html. In theory this can be fired before the window.onload ran through. For that reason in setSearchButtonEnabledState i really wanted to ensure that we had the correct elements.

It does not really have any effect/impact on 99% of the executions.

Jan-Ka commented 6 years ago

Added the required changes as discussed, @waldyrious

waldyrious commented 6 years ago

I greatly appreciate the effort to make atomic commits. My preference (although I don't always manage to follow this myself) is to retain multiple commits in the final history of each branch when they represent atomic steps towards the overall change, rather than to reflect the history of the review process (which often includes some back and forth, as is the case with 6f3a223, for instance).

With this in mind, I'll squash the changes in this PR down to a single commit, but still merge it with --no-ff so that the graph properly indicates that there was indeed a PR and a review process. Hopefully this rationale will make sense to you.