Skip to content

searchNspeed#12

Merged
VatsalSy merged 19 commits intomainfrom
searchNspeed
Mar 2, 2025
Merged

searchNspeed#12
VatsalSy merged 19 commits intomainfrom
searchNspeed

Conversation

@VatsalSy
Copy link
Member

@VatsalSy VatsalSy commented Mar 2, 2025

feat: Enhance search functionality and user experience

This pull request introduces several improvements to the search functionality and user experience:

  • Implement a Cmd+K (or Ctrl+K on non-Mac) shortcut to open the search modal in the team page
  • Convert the existing search_db.json file to a more structured searchData format that is compatible with the NinjaKeys library
  • Automatically detect the user's operating system and display the appropriate shortcut text (Cmd or Ctrl) in the search button
  • Enhance the search data by adding more metadata, such as section, keywords, and icons, to improve the search experience
  • Add JavaScript dependencies for Marked.js and Fuse.js to enable advanced search capabilities
  • Integrate NinjaKeys library for a seamless keyboard-driven search experience
  • Replace the search button with a magnifying glass icon for a more intuitive visual cue
  • Simplify the search input placeholder to "⌘K" to clearly indicate the keyboard shortcut
  • Remove the separate "Cmd+K" search button, as the keyboard shortcut is now the primary way to access search
  • Update the README to reflect the new search functionality and keyboard shortcut
  • Modify the styles for the search input and button to enhance the user experience
  • Identify and prioritize teaching content, in addition to team members and research papers, in the search database
  • Process teaching pages and course details to include in the search index
  • Extract tags from research papers to improve search relevance
  • Fetch and index blog posts from the comphy-lab.org blog
  • Add a simple command palette to the website, allowing users to quickly navigate to different pages and perform common actions
  • Implement search functionality and excerpt display in the command palette
  • Optimize the search functionality by removing unused code and dependencies
  • Enhance the command palette UI and styling, including a dark mode theme
  • Improve the header navigation layout and styling for better visual consistency
  • Add the ability to index blog content directly from the CoMPhy-Lab-Blogs GitHub repository
  • Implement a new layout for teaching course pages with improved performance and functionality
  • Increase the size of the header logo and adjust the associated styles

VatsalSy added 19 commits March 1, 2025 22:52
The changes in this commit include:

1. Implement a Cmd+K (or Ctrl+K on non-Mac) shortcut to open the search modal in the team page.
2. Convert the existing `search_db.json` file to a more structured `searchData` format that is compatible with the NinjaKeys library.
3. Automatically detect the user's operating system and display the appropriate shortcut text (Cmd or Ctrl) in the search button.
4. Enhance the search data by adding more metadata, such as section, keywords, and icons, to improve the search experience.
This commit introduces several improvements to the search functionality and user experience:

- Adds JavaScript dependencies for Marked.js and Fuse.js to enable advanced search capabilities
- Integrates NinjaKeys library for seamless keyboard-driven search experience
- Replaces the search button with a magnifying glass icon for a more intuitive visual cue
- Simplifies the search input placeholder to "⌘K" to clearly indicate the keyboard shortcut
- Removes the separate "Cmd+K" search button, as the keyboard shortcut is now the primary way to access search
- Updates the README to reflect the new search functionality and keyboard shortcut
Modify the styles for the search input and button to enhance the user
experience. The key changes are:

- Increase the width of the search input to 75px
- Reduce the right padding of the search input to 1.6rem
- Reduce the left padding of the search input to 0.8rem
- Reduce the font size of the search icon to 1rem
- Remove the left margin of the search icon
- Add a 24px width and height, 50% border-radius, and centered
  positioning to the search button
- Add a light gray background color to the search button

These changes make the search input and button more visually appealing
and better aligned with the overall design of the application.
This commit makes the following improvements to the search database:

- Identifies and prioritizes teaching content, in addition to team members and research papers
- Processes teaching pages and course details to include in the search index
- Extracts tags from research papers to improve search relevance
- Fetches and indexes blog posts from the comphy-lab.org blog

These changes will provide users with a more comprehensive and relevant search experience, allowing them to easily find teaching materials, research papers, and other important content on the website.
This commit adds a simple command palette to the website, allowing users to quickly navigate to different pages and perform common actions.

The key changes include:

- Add a new CSS file `command-palette.css` to style the command palette
- Add a script block to the `default.html` layout to initialize the command palette
- Add a new button in the header to open the command palette
- Define the command data in a new `command-data.js` file, including navigation commands and external links

These changes provide a more efficient and intuitive way for users to interact with the website, improving the overall user experience.
The changes in this commit add search functionality to the command palette and display excerpts for search results.

The main changes are:

1. Fetch and preload the search database on page load for faster searching.
2. Add a new `command-palette-excerpt` class to display a short excerpt for each search result.
3. Implement a new `renderSections` function to handle rendering the command palette sections.
4. Add a search query check and call the `searchDatabaseForCommandPalette` function to fetch and display search results.
5. Hide the excerpt on mobile devices to save space.

These changes improve the overall user experience of the command palette by providing a more powerful search feature and additional context for the search results.
Removes the command palette shortcut display as it
is not necessary for the user experience. This
simplifies the UI and makes the command palette
more focused on the essential information.
This commit adds keyboard navigation functionality to the command palette
modal. Users can now use the up and down arrow keys to navigate through the
available commands, and press Enter to select the currently highlighted
command. Additionally, a footer has been added to the modal, providing
instructions for the keyboard shortcuts.

The changes include:

- Adding event listeners to the document to handle keyboard events
- Implementing logic to track the currently selected command and update the
  UI accordingly
- Ensuring the selected command is scrolled into view when navigating
- Adding a footer element with keyboard shortcut information

These improvements enhance the usability and accessibility of the command
palette feature.
The changes made in this commit focus on optimizing the search functionality of the website. The main changes are:

- Removed the `search.js` script and replaced it with a new `command-data.js` script. This new script likely contains the data and logic for the search functionality.
- Removed the `hotkeys-js` library, which was previously used for handling keyboard shortcuts. This library is no longer needed, as the search functionality has been updated.

These changes aim to improve the overall search experience for users by optimizing the underlying data and logic. The removal of the `hotkeys-js` library also helps to reduce the overall file size and improve the website's performance.
This change introduces a modal that allows users to filter research content by
tags. The modal displays all unique tags found on the page, and users can
navigate through the tags using keyboard controls (arrow keys, Enter, Esc).
When a tag is selected, the modal can be closed, and the research content
will be filtered accordingly.
The changes remove the `shortcuts` property from various command objects in the `command-data.js` file. This simplifies the command palette implementation by removing the need to handle keyboard shortcuts, as the focus is now on providing a more streamlined search and navigation experience.

The key changes are:

- Removed `shortcuts` property from 10 different command objects.
- Updated the `team.html` layout to hide the command palette by default and show it when the user interacts with the search input.
- Added event listener to the command palette input to handle keyboard navigation (Escape key to close the palette).
Moves the site styles to load before preload tags to prioritize
their loading. Replaces the Google Maps iframe with a custom
implementation that only loads the map when it's about to come
into view, improving initial page load performance. Also adds a
fallback for browsers without IntersectionObserver support.
The `team_fixed.html` layout file was removed as it was not being used in the project. This cleanup helps to reduce the codebase and improve maintainability.
The changes made in this commit focus on improving the visual appearance and user experience of the command palette feature. The key changes are:

- Increased padding and added border-radius to the command palette commands for a more polished look.
- Added hover and selected states for the command palette commands, with corresponding background color changes.
- Adjusted the icon color and size to better match the overall design.
- Improved the styling of the shortcut help content, including a new background color, border, and box shadow.
- Optimized the mobile layout of the command palette, including adjustments to the button size and modal positioning.
- Implemented a dark mode theme with appropriate color changes for various elements.

These changes aim to create a more visually appealing and intuitive command palette experience for users.
The changes made to the `command-palette.css` file focus on improving the visual
appearance and interactivity of the command palette button. The key changes are:

- Updating the button's background color, border, and box-shadow to create a
  more modern and visually appealing design.
- Adjusting the font size, padding, and border radius to improve the overall
  aesthetics and usability of the button.
- Implementing a hover effect that adds a subtle transformation and enhanced
  box-shadow to provide visual feedback when the user interacts with the button.
- Updating the focus styles to provide a clear indication of the button's active
  state.
- Updating the dark mode styles to ensure the button maintains a consistent
  appearance in both light and dark themes.

These changes aim to enhance the user experience and visual appeal of the
command palette feature.
Implement the following changes to the header navigation:

- Ensure consistent height and alignment for all header items, including icons
- Center the Bluesky icon within its container
- Ensure all nav links have consistent height and styling
- Adjust mobile layout to improve responsiveness and consistency
- Add dark mode styling for the navigation close button

These changes improve the overall visual consistency and user experience of the header navigation.
This change adds the ability to index blog content directly from the
CoMPhy-Lab-Blogs GitHub repository. The key improvements are:

- Filters content based on frontmatter `publish: false` status
- Automatically excludes files with "todo" in the filename
- Updates the search index every 12 hours via GitHub Actions
- Allows manual triggering of the search index update
- Provides instructions for manually updating the search index locally
- Improves search quality by accessing raw markdown content and
  respecting publish status
This commit introduces a new layout for teaching course pages. The
key changes include:

- Adds a new `teaching-course.html` layout file
- Includes critical CSS for faster initial paint
- Preloads critical resources like CSS and JavaScript files
- Adds favicon and related metadata
- Loads font dependencies with `font-display: swap`
- Includes site styles and JavaScript dependencies
- Initializes a simple command palette functionality

These changes aim to provide a well-structured and performant layout
for teaching course pages on the website.
The changes in this commit increase the size of the header logo and adjust the
associated styles across multiple layout files. The goal is to make the logo
more prominent and visually appealing on the website.

The key changes are:

- Increase the height of the `.s-header__logo` element to 65 pixels
- Set the `max-height` of the logo image to 65 pixels to ensure it scales
  properly
- Remove the specific height and width declarations for the logo image, as the
  new height setting will automatically adjust the width

These changes are applied to the `team.html`, `research.html`,
`teaching-course.html`, `default.html`, and `teaching.html` layout files.
@VatsalSy VatsalSy merged commit 4d2ce1d into main Mar 2, 2025
1 of 2 checks passed
Copilot AI mentioned this pull request Mar 27, 2025
@VatsalSy VatsalSy deleted the searchNspeed branch March 29, 2025 19:55
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.

1 participant