Closed Treora closed 6 years ago
Can I work on this?
@Chaitya62: I have some vague ideas in mind about how to approach it and abstract it neatly. Feel free to show an approach if you have a nice design in mind, though I may want to do things differently.
Closing this issue; probably not needed anymore as the features related to logging have been removed from product roadmap.
Still, I feel this may be worth creating at some moment as a separate project, as it could be helpful for many browser extensions.
It is necessary or practical for many features to query information about tabs and the pages they show. E.g. to access the referrer page/tab, the http headers, and other things that cannot be obtained from the browser API (except in certain event handlers).
I am thinking it may be worth to make this isolated and generic, to make it reusable in other projects. In a sense it would provide an alternative browser API. It would listen to various browser events and collect their data in a data structure. I am not sure about the desired structure: it could be an object with info for each tab (tab id as key); or it could be more like a queryable event log (datascript comes to mind), but that feels a bit too complicated to me.
Features like tracking the visit time (#45) and viewed area (#44) would also need to keep state per tab, and would thus fit in this state-keeper, but for reusability's sake it might be wiser to keep such custom self-produced data somewhat separate. Perhaps an easily extensible system would be appropriate, or those features keep their own state while referring to items in the tab state system.