Skip to content

Conversation

@1letter
Copy link
Contributor

@1letter 1letter commented Oct 6, 2025

  • add new portlet option -> select2
  • update translations

@1letter 1letter requested a review from petschki October 6, 2025 10:55
@petschki
Copy link
Member

petschki commented Oct 6, 2025

Note: the release checks can be fixed with upgrading to latest plone.meta changes. Run this onliner inside the package:

uvx --from plone.meta config-package --branch=current .

Copy link
Member

@petschki petschki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this branch and it looks promising! 🥳

One thought though:

If I have a single select dropdown I would have expected the searchable dropdown (like we have as the language selector in the edit mask) rather than a input field with a single tag:

Image

Besides that, the tile integration is missing also (https://github.com/collective/collective.collectionfilter/blob/main/src/collective/collectionfilter/tiles/filter.pt) we're using filter tiles in mosaic extensively ... it would be great to have it there too 😉

@1letter 1letter marked this pull request as draft October 6, 2025 11:48
add pat-select2 for mosaic filter tile
fix empty result set
@1letter
Copy link
Contributor Author

1letter commented Oct 6, 2025

@petschki
i have implemented your suggestions. can you check and test please.
sidenote: i would like to fix/upgrade/refactor the acceptance tests in the near future. then the test suite can run without errors. so my hope ;-)

<select class="form-select"
name="${view/filter_id}"
tal:attributes="
class python:'form-select pat-select2' if view.input_type=='select2_single' else 'form-select';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not combine form-select with pat-select2 css class ... either one of them is enough ... otherwise you end up with duplicated dropdown markers:

Image
Suggested change
class python:'form-select pat-select2' if view.input_type=='select2_single' else 'form-select';
class python:'pat-select2' if view.input_type=='select2_single' else 'form-select';

<select class="form-select"
name="${view/filter_id}"
tal:attributes="
class python:'form-select pat-select2' if view.input_type=='select2_single' else 'form-select';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... same here.

Suggested change
class python:'form-select pat-select2' if view.input_type=='select2_single' else 'form-select';
class python:'pat-select2' if view.input_type=='select2_single' else 'form-select';

Copy link
Member

@petschki petschki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my point of view, this is good to merge. Failing testsetup could need some love though ...

@1letter 1letter marked this pull request as ready for review October 7, 2025 06:45
@1letter 1letter merged commit ef6474e into main Oct 7, 2025
3 of 21 checks passed
@1letter 1letter deleted the select2 branch October 7, 2025 12:01
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.

Can we use pat-select2 as a new portlet option Missing translation for reset button in portlet

3 participants