IBM / page-lab

PageLab enables web performance, accessibility, SEO, etc testing at scale.
Apache License 2.0
19 stars 10 forks source link

Additional pre-defined filter types #33

Open amfred opened 6 years ago

amfred commented 6 years ago

Description: Our stakeholders need to be able to see how different sets of pages are performing over time. With our latest updates, PageLab will show you a report based on a query (a simple substring match with a comma-separated list). That's very good, but we also need to be able to take a report (either based on a substring query, or starting from the full set of URLs), and then filter it to only show the pages for a specific business unit or locale.

Obviously, how one sets up pages for various business units and locales, and how you can determine which pages belong to each set, will be different for each company.

I think what we'll need to do is add some general functionality to the open-source Page Lab where it can support predefined filter types (i.e. "select a business unit", "select a geography"). Then we'll need to provide a way for Page Lab developers or admins to define their specific filter types, and hook into the business logic and back-end queries they need to implement those filters.

Acceptance Criteria: 1) Given a set of web page URLs (which may be "all URLs" or the result of a substring match), and one or more additional filters such as business unit or locale, return a report (a web page) containing:

2) Sanitize all data on input and escape the data on output, for security purposes

3) I need to be able to share a report I've crafted with someone else who's not a techie. Sharing a copy/pasted URL is easy. Saving named reports for everyone to re-use is another way to do this, in which case, I want to be able to share a link to a named report.

4) If I send someone a link to a report I set up, they're probably going to want to continue playing with the filtering options from there.

ecumike commented 6 years ago

Yup.. basic taxonomy tagging. David and I have done this before on several other Django projects we've built at IBM, and it involves creating a couple new models. It will allow any implementation to create, define, and tag a URL with any taxonomy or tagging they want. As well, on the "report" side, be able to filter report by any of the same taxonomy and tagging options. We've built a document tagging system that does exactly this.

So for example, when Yahoo Finance site wants to use this to monitor their stock site, they would be able to create a taxonomy called "Markets". And then add values like S&P Dow NASDAQ OTC, etc. And it will be 100% content based.

rcalfredson commented 5 years ago

On the topic of extensions or enhancements to filters, I would like please to share one idea I have for feedback. This would be the ability to combine filters into sets (one further level up from individual filters). In such a model, the filter would be to the filter-set as the filter-part is now to the filter. Query results of individual filters could be combined using AND or OR, and the sets would allow some more complex nesting to be achieved. What do you think about this?

I am not sure yet to what extent it would complement (versus conflict with) the tagging-based idea described above. I thought to put it in this issue because it relates to the topic of additional predefined filter types, but will create a new issue for it if desired.

Here is a link to branch containing proof-of-concept implementation of such an idea, as well as a small test for it. Thank you!