Skip to content
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

Add remembering filter properties of Access Policy Templates grid in browser url #16084

Closed
wants to merge 2 commits into from
Closed

Add remembering filter properties of Access Policy Templates grid in browser url #16084

wants to merge 2 commits into from

Conversation

Ruslan-Aleev
Copy link
Collaborator

What does it do?

  • Add remembering filter properties of Access Policy Templates grid in browser url

apt_url

Why is it needed?

Allow to copy/paste the state of the filter with the browser url.

Related issue(s)/PR(s)

#16081
#16063
#15946
#15942
#15935
#15186
#15185
#15184
#15183
#15182
#15181
#15115
#14086

@cla-bot cla-bot bot added the cla-signed CLA confirmed for contributors to this PR. label Mar 2, 2022
@Ruslan-Aleev Ruslan-Aleev added the pr/review-needed Pull request requires review and testing. label Mar 2, 2022
@Ruslan-Aleev Ruslan-Aleev added this to the v3.1.0 milestone Mar 2, 2022
,search: function(tf,newValue,oldValue) {
var nv = newValue || tf;
this.getStore().baseParams.query = Ext.isEmpty(nv) || Ext.isObject(nv) ? '' : nv;
,searchPolicyTemplate: function(cb, newValue, oldValue) {
Copy link
Member

Choose a reason for hiding this comment

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

Why you have oldValue in the signature if it's not in use?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It may be used in the future, let it be (it was originally indicated).

Copy link
Collaborator

Choose a reason for hiding this comment

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

FWIW I don't have a strong position on this although I'd moreso side with only including the params you're using in cases like this—where the listener callback is calling a secondary function (such as has been done here). I do think with the callbacks themselves, the entire signature should always be provided to make it easier for devs to know what they can do within the function without having to necessarily go to the listener's documentation.

Copy link
Member

Choose a reason for hiding this comment

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

I actually have a strong opinion on this and there should be no unused variables or parameters. If it will be required in the future, let's add it in the future.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Well, I did not add them, so I see no reason to remove them. Again, this is true for most other grids.
If you do not agree and you have the time and desire, you can, after all the corrections in the PRs, go through the files and remove unnecessary variables.

Copy link
Member

Choose a reason for hiding this comment

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

wdym you didn't add them? You are adding searchPolicyTemplate function with clearly unused oldValue

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Well, not really, I just bring the code to the form as in the rest of the grids, at least I try. Those we can leave it all with the old search code - everything will work same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed CLA confirmed for contributors to this PR. pr/review-needed Pull request requires review and testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants