PlacesQuery: Add options to sort history by "Date and Site" or "Last Visited"
Categories
(Toolkit :: Places, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox139 | --- | fixed |
People
(Reporter: jsudiaman, Assigned: jsudiaman)
References
Details
(Whiteboard: [fidefe-sidebar])
Attachments
(1 file)
Currently, the legacy sidebar supports arranging history by "Date and Site" (i.e. containers of Today, Yesterday, Last 7 Days, etc. -> sub-containers of site domains) and "Last Visited" (i.e. a single container of all visits, sorted by most recent).
In order to bring this functionality into the new sidebar, ideally we should update the asynchronous history API to provide these additional sorting options.
One challenge is that cachedHistory is expected to be a Map<any, HistoryVisit[]>
. However, these two sorting options may call for a different shape:
- Date and Site:
Map<number, Map<string, HistoryVisit[]>>
, where the "number" is the timestamp for a day, and the "string" is a site domain. - Last Visited:
HistoryVisit[]
that is sorted by timestamp of the most recent visit.
A way to make this easier is to possibly maintain the internal cache as a Map<any, HistoryVisit[]>
, and use a "combined key" to store Date and Site entries. For example, "1742342400_mozilla.org" => [Today's visits to mozilla.org]
, "1742342400_youtube.com" => [Today's visits to youtube.com]
, and so on. We could reshape this map into the expected type when calling getHistory()
.
Updated•1 month ago
|
Assignee | ||
Updated•1 month ago
|
Comment 1•1 month ago
|
||
(In reply to Jonathan Sudiaman [:jsudiaman] from comment #0)
In order to bring this functionality into the new sidebar
Is there a rationale for bringing over old groupings? The day, week, month groupings have always been a intended as a workaround for the lack of good timeframe filtering (e.g. being able to have a N days scrolling window, or just plain from/to filters). Similarly the by domain grouping was a workaround to the lack of a good domain filter when searching (only show sites for this domain).
Those containers had their own perf problems due the size of their contents. They lacked flexibility as the user couldn't sort their contents by a different field. And were also non ergonomic for the user, as a large lists of non filterable uris is just wasting user's time.
I can sympathize with avoiding to disrupt the user habits, but the old experience was not good, to start with. I hope we can do better, otherwise we can just restyle the old view.
Assignee | ||
Comment 2•1 month ago
|
||
(In reply to Marco Bonardo [:mak] from comment #1)
(In reply to Jonathan Sudiaman [:jsudiaman] from comment #0)
In order to bring this functionality into the new sidebar
Is there a rationale for bringing over old groupings? The day, week, month groupings have always been a intended as a workaround for the lack of good timeframe filtering (e.g. being able to have a N days scrolling window, or just plain from/to filters). Similarly the by domain grouping was a workaround to the lack of a good domain filter when searching (only show sites for this domain).
Those containers had their own perf problems due the size of their contents. They lacked flexibility as the user couldn't sort their contents by a different field. And were also non ergonomic for the user, as a large lists of non filterable uris is just wasting user's time.
I can sympathize with avoiding to disrupt the user habits, but the old experience was not good, to start with. I hope we can do better, otherwise we can just restyle the old view.
The rationale is to support user's existing workflow, as you alluded to. See https://bugzilla.mozilla.org/show_bug.cgi?id=1924349#c0. The new history panel is basically a lightweight version of Firefox View, which already provides a reskinned view of the date/site bucketed containers. So, this would just be tacking additional functionality onto this surface.
Your concerns make sense, though. Maybe for now, the frontend can simply sort by date, and then create the sub-containers outside of the API - that could make it easier to rework in the future.
Comment 3•1 month ago
•
|
||
To be clear, this is not specifically about this bug or your work, I'm mostly confused by the direction we are taking.
I think this is not the right approach for the history sidebar, I base that on technically maintaining that space for more than 15 years, and reading users concerns and feedback.
Originally we agreed upon creating a new history view with the premise it would have taken a different direction from the old view, that had obvious pitfalls and usability concerns. Otherwise, we could have just restyled the old history view, rather than spending time writing a new one.
I spent time in the past explaining my concerns to UX about this, and I'm still unsure why they apparently were dismissed.
I don't mind if the grouping is done in backend or frontend, I mind that this view is effectively providing value to our users, and I think this is not, as it's just a copy of the old one.
The current by day grouping is good because it provides vertical rythm and visual indicators, the things that are missing are ways to pick a timeframe or limit to a domain, both of those things are simple filters, while here we try to enforce them as hierarchies, that add complexity.
The current domain grouped view is already not particularly usable if you try it.
Do these additional hierarchies actually answer user needs? A few simple examples:
I want to find a page I visited today, I remember the title but I can't sort by title.
I remember I visited a page on somedomain.com last week and I'd like to retrieve it.
I more or less remember some event about cars I read about one month ago.
I want to know at what time I visited someothertsite.com.
All of these apparently require to try different groupings until one seem to fit and then scroll a long list...
Here is how things work in other modern browsers: by default I see recent history grouped by day (same), I can type my search string (same), I can also define a timeframe to filter results (not in Firefox), I can right click on an entry and "Show me only this domain" (hard in Firefox), I can see the time per each entry (not in Firefox), I can select multiple entries and remove them all at once (not in the new View?), and I have handy tools to clear and manage history split from the view options (mixed up in Firefox).
Comment 4•29 days ago
|
||
(In reply to Marco Bonardo [:mak] from comment #3)
To be clear, this is not specifically about this bug or your work, I'm mostly confused by the direction we are taking.
I think this is not the right approach for the history sidebar, I base that on technically maintaining that space for more than 15 years, and reading users concerns and feedback.
Originally we agreed upon creating a new history view with the premise it would have taken a different direction from the old view, that had obvious pitfalls and usability concerns. Otherwise, we could have just restyled the old history view, rather than spending time writing a new one.
I spent time in the past explaining my concerns to UX about this, and I'm still unsure why they apparently were dismissed.I don't mind if the grouping is done in backend or frontend, I mind that this view is effectively providing value to our users, and I think this is not, as it's just a copy of the old one.
The current by day grouping is good because it provides vertical rythm and visual indicators, the things that are missing are ways to pick a timeframe or limit to a domain, both of those things are simple filters, while here we try to enforce them as hierarchies, that add complexity.
The current domain grouped view is already not particularly usable if you try it.Do these additional hierarchies actually answer user needs? A few simple examples:
I want to find a page I visited today, I remember the title but I can't sort by title.
I remember I visited a page on somedomain.com last week and I'd like to retrieve it.
I more or less remember some event about cars I read about one month ago.
I want to know at what time I visited someothertsite.com.
All of these apparently require to try different groupings until one seem to fit and then scroll a long list...Here is how things work in other modern browsers: by default I see recent history grouped by day (same), I can type my search string (same), I can also define a timeframe to filter results (not in Firefox), I can right click on an entry and "Show me only this domain" (hard in Firefox), I can see the time per each entry (not in Firefox), I can select multiple entries and remove them all at once (not in the new View?), and I have handy tools to clear and manage history split from the view options (mixed up in Firefox).
Hi Marco, I can assure you that your concerns have not been "dismissed". Lets take this conversation off of bugzilla and in the future, please bring concerns directly to me, Ania or Yulia.
Assignee | ||
Comment 5•25 days ago
|
||
On hold for now.
Comment 6•23 days ago
•
|
||
An update on this: The sidebar leads had a discussion with Marco about this and while we've agreed there's more we can do here to improve history overall, taking into account his suggestions and work the search team is doing. However, in the short term we want to continue work on adding these filters since there are indicators a segment of users utilize them.
Assignee | ||
Comment 7•23 days ago
|
||
- Adds additional sortBy options to rearrange history using containers similar to legacy sidebar.
- "datesite": Group visits based on date, then sub-group based on host.
- "lastvisited": Ungrouped list of visits sorted by recency.
Comment 9•8 days ago
|
||
bugherder |
Description
•