Skip to content

[15.0][ADD] web_hide_custom_search #1124

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

Open
wants to merge 1 commit into
base: 15.0
Choose a base branch
from

Conversation

AungKoKoLin1997
Copy link
Contributor

@AungKoKoLin1997 AungKoKoLin1997 commented Jul 16, 2025

This module allows controlling the visibility of the “Add Custom Filter” and “Add Custom Group” options in the search view for specific models and specific user groups.

@qrtl QT4975

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 15.0-add-custom_filter_groupby_visibility_control branch from 8b96711 to 1570873 Compare July 16, 2025 05:58
@pedrobaeza pedrobaeza added this to the 15.0 milestone Jul 16, 2025
@pedrobaeza
Copy link
Member

Shouldn't it start with web_?

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 15.0-add-custom_filter_groupby_visibility_control branch from 1570873 to d2abed9 Compare July 16, 2025 08:30
@AungKoKoLin1997 AungKoKoLin1997 changed the title [15.0][ADD] custom_filter_groupby_visibility_control [15.0][ADD] web_custom_filter_groupby_visibility_control Jul 16, 2025
@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 15.0-add-custom_filter_groupby_visibility_control branch 2 times, most recently from 2632ae1 to c9371c6 Compare July 16, 2025 10:34
@AungKoKoLin1997 AungKoKoLin1997 changed the title [15.0][ADD] web_custom_filter_groupby_visibility_control [15.0][ADD] web_hide_custom_filter Jul 16, 2025
@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 15.0-add-custom_filter_groupby_visibility_control branch from c9371c6 to b6e3319 Compare July 16, 2025 10:39
Copy link
Member

@yostashiro yostashiro left a comment

Choose a reason for hiding this comment

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

Partial review.

Module name suggestion: web_hide_custom_search

Sorry, I just came to think that 'custom search' would cover both filter and group-by.

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 15.0-add-custom_filter_groupby_visibility_control branch 2 times, most recently from c382341 to 5476066 Compare July 17, 2025 02:22
Copy link
Member

@yostashiro yostashiro left a comment

Choose a reason for hiding this comment

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

Code LGTM. Could we add tests?

patch(CustomFilterItem.prototype, "web_hide_custom_search.CustomFilterItemPatch", {
setup() {
this._super.apply(this, arguments);
this.visibleState = useState({isVisible: true});
Copy link
Member

Choose a reason for hiding this comment

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

This may be more in line with the usual convention?

Suggested change
this.visibleState = useState({isVisible: true});
this.state = useState({isVisible: true});

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I checked using state, but since it's initialized inside the constructor, even if we try to add visible inside setup(), it only contains the original initialized value. So, I’ll just use a new variable instead.

@AungKoKoLin1997 AungKoKoLin1997 changed the title [15.0][ADD] web_hide_custom_filter [15.0][ADD] web_hide_custom_search Jul 17, 2025
@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 15.0-add-custom_filter_groupby_visibility_control branch from 5476066 to 338b985 Compare July 17, 2025 07:32
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.

3 participants