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

Update search function for Command palette #772

Merged
merged 14 commits into from
May 26, 2024

Conversation

janfaracik
Copy link
Contributor

@janfaracik janfaracik commented May 19, 2024

Updates the search method to support the 'Command palette' introduced n jenkinsci/jenkins#7569. Also includes backwards compatibility for the classic YUI search bar.

Testing done

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@janfaracik janfaracik marked this pull request as ready for review May 26, 2024 20:32
long startTime = System.currentTimeMillis();

while (System.currentTimeMillis() - startTime < maxWaitTime) {
if (page.querySelector("*").getTextContent().contains(value)) {
Copy link
Member

Choose a reason for hiding this comment

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

can probably be simplified with asText()? https://stackoverflow.com/a/6538127/4951015

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Couldn't find the asText method, getVisibleText exists however so I've updated it with that

@timja timja merged commit 3bdf04c into jenkinsci:master May 26, 2024
14 checks passed
@janfaracik janfaracik deleted the command-palette branch May 26, 2024 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants