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

Expand site filters and add more filter options to site:list and org:site:list #1981

Open
wants to merge 2 commits into
base: 2.x
Choose a base branch
from

Conversation

ataylorme
Copy link

Addresses #1980.

Add new filters to the Site collection:

  • Add filterByPlanNameNot filter
  • Add filterByFrozenStatus filter
  • Add filterByFramework filter

Add new filter options to org:site:list:

  • plan_not
  • framework
  • hide_frozen - defaults to true
  • name - accepts regex
  • tags - accepts comma separated tags

Add new filter options to site:list:

  • plan_not
  • framework
  • hide_frozen - defaults to true

…site:list

Add new filters to the `Site` collection:

* Add `filterByPlanNameNot` filter
* Add `filterByFrozenStatus` filter
* Add `filterByFramework` filter

Add new filter options to `org:site:list`:

* `plan_not`
* `framework`
* `hide_frozen` - defaults to `true`
* `name` - accepts regex
* `tags` - accepts comma separated tags

Add new filter options to `site:list`:

* `plan_not`
* `framework`
* `hide_frozen` - defaults to `true`
@greg-1-anderson
Copy link
Member

Rather than implement like this, it would be more maintainable to support https://github.com/consolidation/filter-via-dot-access-data and provide flags as shortcuts for some comparisons.

@ataylorme
Copy link
Author

Rather than implement like this, it would be more maintainable to support consolidation/filter-via-dot-access-data and provide flags as shortcuts for some comparisons.

@greg-1-anderson I was just following the existing pattern here. I think rewriting the entire filtering logic is out of scope for what I am trying to accomplish.

If reworking all the filtering gets prioritized I would advocate for adding the filters currently missing from org:site:list and site:list, such as framework, when doing that refactor.

@ataylorme
Copy link
Author

I think hiding frozen sites by default is a bit heavy-handed as it could break existing implementations. I will work thinking of a different way to implement filtering frozen sites.

@greg-1-anderson
Copy link
Member

I implemented filter-via-dot-access-data across all commands in Drush; it didn't take that long.

https://getpantheon.atlassian.net/browse/AL-1742

@ataylorme
Copy link
Author

@greg-1-anderson I'm not saying we shouldn't do it, just that refactoring filtering across Terminus should be a separate issue/task. If you want to schedule half a day together to knock it out I'd be open to that.

@greg-1-anderson
Copy link
Member

I am -1 on adding more filters as a one-off, but that's just an opinion; I am not a maintainer here. @TeslaDethray might choose to accept this strategy.

I'll ping some folks about doing work on the filters.

@ataylorme
Copy link
Author

My goal is to solve the problem folks have about needing more filters (both internally and externally). How that is achieved is less important to me. I had an hour so I opened a PR to get things started.

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.

2 participants