I would like to propose a feature that would make it easier to switch away from some providers: the ability to search through calendar events.
Precedent: Google Calendar
Google Calendar in "Week" view initially looks like this near the top:
...and activating the looking class changes most of the widgets on the top row:
Typing a query there will pull up past AND future events (in that order), with past events showing faded.
Stalwart support
Once I figured out where in the documentation the API for searching was and how to use it for calendar events, I confirmed that Stalwart v0.16.22 supported it (and I'm assuming v1.x will support it).
Punchline: it's a lot like the CalendarEvent/query that's already being done to retrieve events for the calendar view, except that the filter has text (to search everywhere) set to the user's query, with or without the usual after and before filters. For example, I used inbuxa's demo to add some dining events to the calendar, making sure to add the word "Japanese" in a few of the events, then I was able to POST the following:
...and I indeed got the subset of the events in the demo account where I had used that word.
I think it's fine to start with a "search everything" and later consider whether it's worth having users provide more filters via keywords, just like the current e-mail search.
What the results could look like
I searched for screenshots of Google Calendar search results and somehow found a screenshot of Proton Calendar's search results instead (which is pretty close):
Thanks for considering this idea!
I would like to propose a feature that would make it easier to switch away from some providers: the ability to search through calendar events.
### Precedent: Google Calendar
[Google Calendar in "Week" view](https://calendar.google.com/calendar/u/0/r) initially looks like this near the top:

...and activating the looking class changes most of the widgets on the top row:

Typing a query there will pull up past AND future events (in that order), with past events showing faded.
### Stalwart support
Once I figured out where in the documentation the API for searching was and how to use it for calendar events, I confirmed that Stalwart v0.16.22 supported it (and I'm assuming v1.x will support it).
Punchline: it's a lot like the `CalendarEvent/query` that's already being done to retrieve events for the calendar view, except that the `filter` has `text` (to search everywhere) set to the user's query, with or without the usual `after` and `before` filters. For example, I used inbuxa's demo to add some dining events to the calendar, making sure to add the word "Japanese" in a few of the events, then I was able to POST the following:
```json
{
"using": [
"urn:ietf:params:jmap:core",
"urn:ietf:params:jmap:mail"
],
"methodCalls": [
[
"CalendarEvent/query",
{
"accountId": "a1",
"filter": {
"text": "japanese"
},
"sort": [
{
"property": "start",
"isAscending": false
}
],
"collapseThreads": true,
"position": 0,
"limit": 50,
"calculateTotal": true
},
"q"
],
[
"CalendarEvent/get",
{
"accountId": "a1",
"#ids": {
"resultOf": "q",
"name": "CalendarEvent/query",
"path": "/ids"
},
"properties": [
"id",
"calendarIds",
"isDraft",
"isOrigin",
"title",
"description",
"start",
"to",
"subject",
"receivedAt",
"sentAt",
"size",
"preview"
]
},
"e"
]
]
}
```
...and I indeed got the subset of the events in the demo account where I had used that word.
I think it's fine to start with a "search everything" and later consider whether it's worth having users provide more filters via keywords, just like the current e-mail search.
### What the results could look like
I searched for screenshots of Google Calendar search results and somehow found a screenshot of Proton Calendar's search results instead (which is pretty close):

Thanks for considering this idea!
Thanks @oli_is_cool, this is a good one, and thank you for working out the query. That saved real time.
Event search is part of standard JMAP Calendars, so it fits what ihasmail is for: if Stalwart can do it, ihasmail should show it. ihasmail is mostly bug fixes these days, but this is small and self-contained, so I'm planning to add it. It won't happen for a week or more, though.
The plan: the search bar becomes "Search events" when you're in the calendar. Results show in one list, upcoming first and then past events (faded), across your own and shared calendars. A repeating event shows once, with its next date. I agree with starting with "search everything" and leaving keyword filters for later, like mail search has.
I'll update this issue when it's in a release.
Thanks @oli_is_cool, this is a good one, and thank you for working out the query. That saved real time.
Event search is part of standard JMAP Calendars, so it fits what ihasmail is for: if Stalwart can do it, ihasmail should show it. ihasmail is mostly bug fixes these days, but this is small and self-contained, so I'm planning to add it. It won't happen for a week or more, though.
The plan: the search bar becomes "Search events" when you're in the calendar. Results show in one list, upcoming first and then past events (faded), across your own and shared calendars. A repeating event shows once, with its next date. I agree with starting with "search everything" and leaving keyword filters for later, like mail search has.
I'll update this issue when it's in a release.
This landed in #70, thanks again @oli_is_cool. In the calendar the search bar now searches events, with upcoming results first and past ones faded below, across your own, shared and subscribed calendars. A repeating event shows once, at its next date.
One thing to know: Stalwart matches whole words, so "japan" won't find "Japanese". Keyword filters are still for later. It'll be in the next release.
This landed in #70, thanks again @oli_is_cool. In the calendar the search bar now searches events, with upcoming results first and past ones faded below, across your own, shared and subscribed calendars. A repeating event shows once, at its next date.
One thing to know: Stalwart matches whole words, so "japan" won't find "Japanese". Keyword filters are still for later. It'll be in the next release.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
I would like to propose a feature that would make it easier to switch away from some providers: the ability to search through calendar events.
Precedent: Google Calendar
Google Calendar in "Week" view initially looks like this near the top:


...and activating the looking class changes most of the widgets on the top row:
Typing a query there will pull up past AND future events (in that order), with past events showing faded.
Stalwart support
Once I figured out where in the documentation the API for searching was and how to use it for calendar events, I confirmed that Stalwart v0.16.22 supported it (and I'm assuming v1.x will support it).
Punchline: it's a lot like the
CalendarEvent/querythat's already being done to retrieve events for the calendar view, except that thefilterhastext(to search everywhere) set to the user's query, with or without the usualafterandbeforefilters. For example, I used inbuxa's demo to add some dining events to the calendar, making sure to add the word "Japanese" in a few of the events, then I was able to POST the following:...and I indeed got the subset of the events in the demo account where I had used that word.
I think it's fine to start with a "search everything" and later consider whether it's worth having users provide more filters via keywords, just like the current e-mail search.
What the results could look like
I searched for screenshots of Google Calendar search results and somehow found a screenshot of Proton Calendar's search results instead (which is pretty close):

Thanks for considering this idea!
Thanks @oli_is_cool, this is a good one, and thank you for working out the query. That saved real time.
Event search is part of standard JMAP Calendars, so it fits what ihasmail is for: if Stalwart can do it, ihasmail should show it. ihasmail is mostly bug fixes these days, but this is small and self-contained, so I'm planning to add it. It won't happen for a week or more, though.
The plan: the search bar becomes "Search events" when you're in the calendar. Results show in one list, upcoming first and then past events (faded), across your own and shared calendars. A repeating event shows once, with its next date. I agree with starting with "search everything" and leaving keyword filters for later, like mail search has.
I'll update this issue when it's in a release.
This landed in #70, thanks again @oli_is_cool. In the calendar the search bar now searches events, with upcoming results first and past ones faded below, across your own, shared and subscribed calendars. A repeating event shows once, at its next date.
One thing to know: Stalwart matches whole words, so "japan" won't find "Japanese". Keyword filters are still for later. It'll be in the next release.