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

Embed Command Palette into xanadu-sphinx-theme w/ enable flag #57

Merged

Conversation

Alan-eMartin
Copy link
Contributor

@Alan-eMartin Alan-eMartin commented Dec 16, 2024

Context:

  • Embedded pennylane-command-palette for global search interface.

Description of the Change:

  • Embedded production script for pennylane-command-palette.
  • Created mobile and desktop button for opening pennylane-command-palette.
  • Created event listener for closing, and function for opening command palette.
  • Created OS detection logic using navigator and dynamic command label logic.
  • Created theme configuration for enabling and disabling the command palette.

Benefits:

  • Enables global search of PennyLane content from docs site

Possible Drawbacks:

  • None

Related GitHub Issues:

  • None

Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit .github/CHANGELOG.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name and GitHub username in the contributors section.

@Alan-eMartin Alan-eMartin marked this pull request as ready for review December 18, 2024 19:19
@Alan-eMartin Alan-eMartin changed the title Sc 77533 search command palette button is added to Embed Command Palette into xanadu-sphinx-theme w/ enable flag Dec 19, 2024
Copy link
Contributor

@AndrewGardhouse AndrewGardhouse 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 great, just one comment:
Is it possible to remove the focus state from here, so it's consistent with pennylane.ai?
Screenshot 2024-12-19 at 11 00 08 AM

@Alan-eMartin
Copy link
Contributor Author

Done! Thanks for the thorough review @AndrewGardhouse, the PR is now ready for re-review. Sometimes you may need to clear your cache to see changes.

Copy link
Contributor

@AndrewGardhouse AndrewGardhouse left a comment

Choose a reason for hiding this comment

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

LGTM!

@Alan-eMartin Alan-eMartin merged commit f78d462 into master Dec 19, 2024
2 checks passed
@Alan-eMartin Alan-eMartin deleted the sc-77533-search-command-palette-button-is-added-to branch December 19, 2024 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants