-
Notifications
You must be signed in to change notification settings - Fork 110
feat(index): Added search bar for template filtering #434
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Dharma Teja <[email protected]>
| let matchFound = false; | ||
| for (let i = 1; i < rows.length - 1; i++) { // Exclude the last row (noResultsRow) | ||
| let td = rows[i].getElementsByTagName("th")[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getElementsByTagName is not the most concise way to access the first element, possible to use
let td = rows[i].querySelector("th");
querySelector to target the first and avoid the need for the index 0.
What do you say?
| <!-- Search Bar --> | ||
| <div class="field"> | ||
| <div class="control"> | ||
| <input type="text" id="searchInput" class="input" placeholder="SEARCH FOR TEMPLATE" onkeyup="filterTable()"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@teja-pola if I am not wrong this is for searching templates, possible to make the id more related to that.
ex: id=searchTemplateInput
@DianaLease It looks like the CI pipeline hasn't run successfully in a long time. The failure seems to be due to deprecated Node.js versions (12.x and 16.x). Could we update GitHub Actions to use Node.js 20? I guess this should fix the CI issues and allow unit tests to run again. |
@teja-pola Want to try updating https://github.com/accordproject/cicero-template-library/blob/main/.github/workflows/build.yml and https://github.com/accordproject/cicero-template-library/blob/main/.github/workflows/build-and-publish.yml in your PR to use node 20 instead and see if that fixes it? |
Signed-off-by: Dharma Teja <[email protected]>
@DianaLease tried doing so, but still tests are not checked. should i abort? |
DianaLease
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also change lines 7, 31, 35, and 39 in .github/workflows/build-and-publish.yml to point to main instead of master? And also line 7 in .github/workflows/build.yml? That should trigger the tests to run on your PR in the CI.
Signed-off-by: Dharma Teja <[email protected]>
|
@DianaLease Now please review again. |
|
How about adding search by algolia instead of this? |
Closes #433
This pull request adds a search bar above the template table to enhance usability by allowing users to quickly find specific templates. The search function dynamically filters table rows as the user types. Additionally, when no matching templates are found, a "No results found" message is displayed to improve user feedback.
This feature improves navigation within the template library, making it easier to locate specific templates efficiently.
Changes
Flags
N/A
Screenshots
BEFORE
AFTER
Related Issues
Author Checklist
--signoffoption of git commit.masterfromfork:branchname