diff --git a/app/lib/frontend/templates/views/pkg/index.dart b/app/lib/frontend/templates/views/pkg/index.dart index 5edde3e8e..82c29c74c 100644 --- a/app/lib/frontend/templates/views/pkg/index.dart +++ b/app/lib/frontend/templates/views/pkg/index.dart @@ -225,11 +225,9 @@ d.Node _tagBasedCheckbox({ required String title, }) { final tag = '$tagPrefix:$tagValue'; - final toggledSearchForm = searchForm.toggleRequiredTag(tag); return _formLinkedCheckbox( id: 'search-form-checkbox-$tagPrefix-$tagValue', label: label, - toggledSearchForm: toggledSearchForm, isChecked: searchForm.parsedQuery.tagsPredicate.isRequiredTag(tag), isIndeterminate: searchForm.parsedQuery.tagsPredicate.isProhibitedTag(tag), tag: tag, @@ -241,7 +239,6 @@ d.Node _tagBasedCheckbox({ d.Node _formLinkedCheckbox({ required String id, required String label, - required SearchForm toggledSearchForm, required bool isChecked, bool isIndeterminate = false, String? tag, @@ -256,14 +253,12 @@ d.Node _formLinkedCheckbox({ child: material.checkbox( id: id, label: label, - labelNodeContent: (label) => d.a( - href: toggledSearchForm.toSearchLink(), + labelNodeContent: (label) => d.span( text: label, attributes: { if (action != null) 'data-action': action, if (tag != null) 'data-tag': tag, }, - rel: 'nofollow', ), checked: isChecked, indeterminate: isIndeterminate, diff --git a/app/test/frontend/golden/pkg_index_page.html b/app/test/frontend/golden/pkg_index_page.html index 3dcd20c9b..004562751 100644 --- a/app/test/frontend/golden/pkg_index_page.html +++ b/app/test/frontend/golden/pkg_index_page.html @@ -138,7 +138,7 @@

@@ -155,7 +155,7 @@

@@ -172,7 +172,7 @@

@@ -189,7 +189,7 @@

@@ -206,7 +206,7 @@

@@ -223,7 +223,7 @@

@@ -248,7 +248,7 @@

@@ -265,7 +265,7 @@

@@ -290,7 +290,7 @@

@@ -315,7 +315,7 @@

@@ -332,7 +332,7 @@

@@ -349,7 +349,7 @@

@@ -366,7 +366,7 @@

@@ -383,7 +383,7 @@

@@ -400,7 +400,7 @@

diff --git a/app/test/frontend/golden/search_page.html b/app/test/frontend/golden/search_page.html index e6c6f5427..414b7d239 100644 --- a/app/test/frontend/golden/search_page.html +++ b/app/test/frontend/golden/search_page.html @@ -139,7 +139,7 @@

@@ -156,7 +156,7 @@

@@ -173,7 +173,7 @@

@@ -190,7 +190,7 @@

@@ -207,7 +207,7 @@

@@ -224,7 +224,7 @@

@@ -249,7 +249,7 @@

@@ -266,7 +266,7 @@

@@ -291,7 +291,7 @@

@@ -316,7 +316,7 @@

@@ -333,7 +333,7 @@

@@ -350,7 +350,7 @@

@@ -367,7 +367,7 @@

@@ -384,7 +384,7 @@

@@ -401,7 +401,7 @@

diff --git a/pkg/web_app/lib/src/search.dart b/pkg/web_app/lib/src/search.dart index c5c426aa9..5aa2f743f 100644 --- a/pkg/web_app/lib/src/search.dart +++ b/pkg/web_app/lib/src/search.dart @@ -66,10 +66,10 @@ void _setEventsForSearchForm() { // checking the checkbox will trigger a click on the link. document.querySelectorAll('.search-form-linked-checkbox').forEach((e) { final checkbox = e.querySelector('input'); - final link = e.querySelector('a'); - if (checkbox != null && link != null) { - final tag = link.dataset['tag']; - final action = link.dataset['action']; + final label = e.querySelector('[data-tag]'); + if (checkbox != null && label != null) { + final tag = label.dataset['tag']; + final action = label.dataset['action']; if (tag == null) return; Future handleClick(Event event) async { @@ -84,7 +84,7 @@ void _setEventsForSearchForm() { } checkbox.onChange.listen(handleClick); - link.onClick.listen(handleClick); + label.onClick.listen(handleClick); e.onClick.listen(handleClick); } });