feat(index): Added search bar for template filtering#434
feat(index): Added search bar for template filtering#434teja-pola wants to merge 3 commits intoaccordproject:mainfrom
Conversation
Signed-off-by: Dharma Teja <dteja2468@gmail.com>
| 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.
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.
@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 <dteja2468@gmail.com>
@DianaLease tried doing so, but still tests are not checked. should i abort? |
DianaLease
left a comment
There was a problem hiding this comment.
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 <dteja2468@gmail.com>
|
@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