Skip to content

Enhance Site Navigation: Add Search Bar to Navbar #90

Open

Description

@divine7022

To improve site navigation and make it easier for users to find information, this issue proposes adding a search bar to the main navigation bar. This will allow users to quickly search the site's content.

Activity

  1. dlebauer commented on Feb 18, 2025

    @dlebauer
    Member

    This is a great idea. If implemented, I think it would be of limited use if the scope only included the webpage content itself.

    What would be particularly useful is if it included the Develop Branch of the Documentation. I am not sure how difficult this will be, but it would also be great to update (#18) and index our package documentation.

  2. divine7022 commented on Feb 18, 2025

    @divine7022
    MemberAuthor

    This is a great idea. If implemented, I think it would be of limited use if the scope only included the webpage content itself.

    What would be particularly useful is if it included the Develop Branch of the Documentation. I am not sure how difficult this will be, but it would also be great to update (#18) and index our package documentation.

    @dlebauer Okay, I understand. I'll look into including the Develop Branch and indexing the package documentation. Thanks for the feedback!

  3. dlebauer commented on Feb 18, 2025

    @dlebauer
    Member

    Thanks @divine7022 ! Just to be clear, I meant 'the develop branch of the documentation' ... not the entire develop branch (though once #18 is implemented it would be great to include that as well).

  4. divine7022 commented on Feb 18, 2025

    @divine7022
    MemberAuthor

    Thanks @divine7022 ! Just to be clear, I meant 'the develop branch of the documentation' ... not the entire develop branch (though once #18 is implemented it would be great to include that as well).

    @dlebauer Got it! Thank you

  5. divine7022 commented on Feb 20, 2025

    @divine7022
    MemberAuthor

    @dlebauer
    Hello sir I am currently working on indexing the develop branch of the documentation using Algolia’s crawler. I’m in the process of setting it up and testing to ensure that search results work correctly, and i am trying to make it work.

    Let me know if you have any specific requirements or suggestions!
    Thank you

  6. allgandalf commented on Mar 1, 2025

    @allgandalf
    Collaborator

    Let me know if you have any specific requirements or suggestions!

    Can you update this branch with a POC video ?

  7. divine7022 commented on Mar 1, 2025

    @divine7022
    MemberAuthor

    @allgandalf Hello sir Thank you for feedback!

    I initially used a local search library, which worked for searching static site content like blogs, publications, and the about page. However, it couldn't search the documentation content since the documentation is rendered from the pecan-documentation repository, which is built by GitHub Actions.

    To address this, I integrated Algolia's crawler to index both:

    1. The develop branch of the documentation.
    2. The PecanProject.github.io website.

    However, I encountered two issues:

    1. The URLs of the develop branch documentation are indexed properly, but when searching from the website, an extra parameter is being appended to the URL (e.g., http://localhost:3000/pecan-documentation/develop/demo-table.html#demo-table).
    2. For the PecanProject.github.io website, all indexed results are pointing to the base URL (https://pecanproject.github.io/) instead of their respective pages.
    3. And also still there are other issues need to be fixed.
    • I’m investigating how Algolia is handling URL fragments (#demo-table).
    • I’m reviewing Algolia’s crawler configuration to ensure it correctly indexes individual pages on the website.
    • I'll record a POC video demonstrating the current implementation and issues.
  8. divine7022 commented on Mar 1, 2025

    @divine7022
    MemberAuthor
    Untitled.video.-.Made.with.Clipchamp.2.mp4
    Untitled.video.-.Made.with.Clipchamp.3.mp4

    Let me know if you have any specific requirements or suggestions!

    Can you update this branch with a POC video ?

  9. divine7022 commented on Mar 1, 2025

    @divine7022
    MemberAuthor

    @allgandalf
    Initially, the search bar in this image was built using a local search library, which worked correctly for searching the website's content (such as blogs, about, publications, etc.).

    Image
    Thank you!

  10. allgandalf commented on Mar 11, 2025

    @allgandalf
    Collaborator

    @divine7022 using algolia would cost us $$, i don't think so we want to go down with that appraoch

  11. dlebauer commented on Mar 11, 2025

    @dlebauer
    Member

    @allgandalf and @divine7022 could the free tier could meet our needs https://www.algolia.com/pricing ? I doubt we will get anywhere near 10k searches/ month.

  12. infotroph commented on Mar 11, 2025

    @infotroph
    Member

    I do not trust their free tier to be free. From the pricing FAQ: "Search operations are triggered when a search is performed. In autocomplete and search-as-you-type implementations, a new search request is performed on every keystroke." 😬

  13. allgandalf commented on Mar 11, 2025

    @allgandalf
    Collaborator

    @infotroph did you check if we can trigger the search on debounced inputs ? a timeout of say 2 seconds after the user has stopped typing would help

  14. infotroph commented on Mar 11, 2025

    @infotroph
    Member

    No, and I do not plan to spend more time on it. PEcAn is built to be reliably free for everyone; Trying to find loopholes to use paid services for free is a bad use of our time.

  15. allgandalf commented on Mar 11, 2025

    @allgandalf
    Collaborator

    fair pointtttt

  16. divine7022 commented on Mar 11, 2025

    @divine7022
    MemberAuthor

    @infotroph did you check if we can trigger the search on debounced inputs ? a timeout of say 2 seconds after the user has stopped typing would help

    It seems to be a good idea. Using a debounced input with a 2-second delay before sending a request could significantly reduce the number of API calls, preventing unnecessary searches on every keystroke. This might help us stay within the free tier limits. However, we'd need to test how well it works in practice.

  17. allgandalf commented on Mar 24, 2025

    @allgandalf
    Collaborator

    @divine7022 lets get away from using 3rd party tool, try if you can find any open source tool for this, else we should focus on what we can do now with the available resources

  18. divine7022 commented on Mar 24, 2025

    @divine7022
    MemberAuthor

    Hello @allgandalf,
    Got it! I'll look into open source alternatives for search functionality. If I find a suitable one, i will test its integration. Otherwise, will explore how we can enhance the current approach with available resources.

    Let me know if you have any preferences regarding potential solutions.

    Thanks!

  19. allgandalf commented on Apr 26, 2025

    @allgandalf
    Collaborator

    Hello, any update on this one @divine7022 ?

  20. divine7022 commented on Apr 26, 2025

    @divine7022
    MemberAuthor

    @allgandalf I really apologize to for the delay, since I am tied up with other tasks I couldn't look at this sooner, but I'll try completing this as soon as possible.
    Thanks for your patience and reviewing #88

  21. allgandalf commented on Jun 17, 2025

    @allgandalf
    Collaborator

    hey, any progress here @divine7022 ?

  22. allgandalf commented on Sep 4, 2025

    @allgandalf
    Collaborator

    hello @divine7022 any updates 😄

  23. divine7022 commented on Sep 4, 2025

    @divine7022
    MemberAuthor

    @allgandalf I apologize for the delay in responding here -- I paused this work because of the follow-up discussion here:
    #91 (comment)
    Please go through all the comments starting from the one I cited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions