You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Form fields for filtering in CMSMain are hardcoded - and some of the functionality is duplicated or else needlessly different between this filter functionality and GridFieldFilterHeader.
original POC PR - this PR includes many additional notes and implementation details
Acceptance Criteria
The fields to use for filtering are pulled from the model in the same way GridFieldFilterHeader does (i.e. it uses searchableFields())
SearchContext is used for filtering in CMSMain the same way it is in GridFieldFilterHeader
Any CMSSiteTreeFilter logic is either made generic if possible, or else used by the SearchContext for SiteTree wherever filtering pages is used
i.e. filtering pages in a gridfield uses the same logic as filtering pages in CMSMain
A shared template and shared javascript/css are used for the filter in GridFieldFilter and CMSMain (with the ability to use different custom templates as desired - e.g. by trying to get specific templates by class name first, and falling back to the shared one)
As much as feasible, PHP logic for filtering in GridFieldFilterHeader and CMSMain is shared
PRs
Enable WithinRangeFilter in searchable_fields
This set of PRs is required to match the ranged filtering against LastEdited which is currently only possible for SiteTree inside CMSMain.
Avoid filterByCallback() in CMSSiteTreeFilter subclasses
This set of PRs is required to migrate the SiteTree filtering functionality to primarily use SearchContext, which requires filtering be done by the ORM not in PHP.
Form fields for filtering in
CMSMainare hardcoded - and some of the functionality is duplicated or else needlessly different between this filter functionality andGridFieldFilterHeader.Relevant
Acceptance Criteria
GridFieldFilterHeaderdoes (i.e. it usessearchableFields())SearchContextis used for filtering inCMSMainthe same way it is inGridFieldFilterHeaderCMSSiteTreeFilterlogic is either made generic if possible, or else used by theSearchContextforSiteTreewherever filtering pages is usedCMSMainGridFieldFilterandCMSMain(with the ability to use different custom templates as desired - e.g. by trying to get specific templates by class name first, and falling back to the shared one)GridFieldFilterHeaderandCMSMainis sharedPRs
Enable
WithinRangeFilterinsearchable_fieldsThis set of PRs is required to match the ranged filtering against
LastEditedwhich is currently only possible forSiteTreeinsideCMSMain.Avoid
filterByCallback()inCMSSiteTreeFiltersubclassesThis set of PRs is required to migrate the
SiteTreefiltering functionality to primarily useSearchContext, which requires filtering be done by the ORM not in PHP.Kitchen sink CI run
The main refactoring
CMS 5 PRs
Important
After merging, reassign to Guy so they can merge up and rebase the CMS 6 PRs on top
CMS 6 PRs
Kitchen sink CI run