terminus icon indicating copy to clipboard operation
terminus copied to clipboard

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

Open ataylorme opened this issue 6 years ago • 7 comments

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

ataylorme avatar Jun 07 '19 18:06 ataylorme

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.

greg-1-anderson avatar Jun 07 '19 21:06 greg-1-anderson

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 avatar Jun 10 '19 14:06 ataylorme

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.

ataylorme avatar Jun 10 '19 14:06 ataylorme

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

greg-1-anderson avatar Jun 10 '19 16:06 greg-1-anderson

@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.

ataylorme avatar Jun 10 '19 16:06 ataylorme

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.

greg-1-anderson avatar Jun 10 '19 18:06 greg-1-anderson

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.

ataylorme avatar Jun 10 '19 18:06 ataylorme