This fixes an issue where we would show the popover for
a calendar event, but then not destroy it when navigating
to another page, which meant it ended up stuck in the top
left of the page.
This brings the behavior in line with other places we do
`destroyPopover()`, like when the mouse leaves the event
element.
We were building the list of events by using the non padded day as key, eg:
```
{ 3: { ... }, 16: { ... } }
```
Which we would then use to construct a date and would end up doing something like:
```
moment("2025-07-3").format()
```
It was working in most browsers, but safari was not accepting it and would display an `invalid date` error.
The fix is using a padded day as key that will ensure consistent behavior.
No test as it's browser specific behavior.
This is a recent regression due to bdf8869a01
I wanted to write a test, but this is non trivial given this is a standalone component. We also have other internal repos testing this behavior (how I discovered the regression). Will try to have a test for this one later.
Attempts to wrap format in standard ASCII double quotes (") and prevent the browser from substituting them with language-specific typographic quotes, such as the German „ (low-9) and “ (left double).
This pull request introduces two major new features to the calendar plugin: the ability to add a location/description to an event, and a new "My Events" view on the upcoming events page.
### Event Location
You can now add a `location` to an event. This is a free-text field that can be used for a physical address, a URL, or any other location details.
* A `location` field has been added to the event builder modal.
* The location is displayed in the event details in the post, complete with a new "location-pin" icon. URLs within the location field are automatically linked.
* This is supported by a database migration to add the `location` column, and updates to the event model, serializer, and parser.
### Event description
You can now add a `description ` to an event. This is a free-text field that can be used to describe your event.
* A `description` field has been added to the event builder modal.
* The description is displayed in the event details in the post, complete with a new "circle-info" icon. URLs within the location field are automatically linked. It supports linebreaks.
* This is supported by a database migration to add the `description` column, and updates to the event model, serializer, and parser.
### "My Events" Filter
The `/upcoming-events` page now includes tabs to switch between "All events" and "My events".
* The "My events" tab shows all upcoming events that the current user is "Going" to.
* This creates a personalized calendar for users to easily see their own upcoming schedule.
* A new `/upcoming-events/mine` route has been added, and the backend event finder now supports filtering by an `attending_user`.
### Other Improvements
* The calendar view on the `/upcoming-events` page now defaults to a "list" view on mobile for a better experience.
* The "Open Event" and "Close Event" actions now have a disabled/saving state to provide better feedback during the operation.
* System tests have been added to cover the new functionality.
This PR overhauls the way event dates are rendered by applying context-aware formatting rules:
* Single-day events only show times when appropriate, hiding “12:00 AM” for events without endDate.
* Multi-day ranges omit redundant parts (e.g. for the current year) and include weekday/month/day when needed.
### Impact
* Improves readability of event dates across the app
* Reduces visual noise by hiding redundant date/time fragments
* Ensures consistency with user expectations around relative dates
---------
Co-authored-by: Yuriy Kurant <yuriy@discourse.org>
* Create Zimbabwe definitions file
Add a draft zw.yaml file for Zimbabwe
* Update for Zimbabwe
add holiday region and timezone
* Update for Zimbabwe
add Zimbabwe locale zw
* Update index.yaml for z
* Fix syntax
add missing comma to line 274
* Update tests
simplify the tests so only one per holiday
* Fix syntax
replace backtic with single closing quote on line 86
* Add generated Ruby files for Zimbabwe holidays
Since it was converted to Glimmer, the nbsp html entity is being escaped by ember before rendering. We can use a unicode literal instead.
Followup to d471bbdf9a
- we were not applying the timezone for the list of upcoming events
- we would return the first event + the upcoming events, we now get all the events generate by RRule if this is a recurring event, and if it's not a recurring event we just return the event, instead of doing a dance where we would remove the first event from RRule but prepend the initial event on the frontend
This defines a feature where event creators can opt for an associated chat channel
creation.
This is a staff only feature for now.
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Playwright will not accept this kind of specs as it's not reliable. You would potentially get this error:
```
Playwright::Error:
Element is not attached to the DOM
Call log:
- attempting click action
- - waiting for element to be visible, enabled and stable
```
What happens is that the ".nav-item_latest" would be present before navigation, and playwright would find it just before the page has loaded, the click though might happen right after page transition and the initial element wouldn't be attached to the dom anymore.
This is not the best UX as user might enter an event name with double quotes and they'll be deleted once they click save. But at least it won't break their event because the double quote breaks the BBCode/Markdown.
A proper fix would be to manipulate an AST instead of using regular expressions on a a string.
Meta - https://meta.discourse.org/t/-/360010
Adds support to parsing/serializing/displaying an event preview representation for the rich editor view.
Co-authored-by: Renato Atilio <renato@discourse.org>
* DEV: Allow the 'UpcomingEventsCalendar' Component to be used outside of the 'PostEventUpcomingEventsIndexRoute' route
* add system test to upcoming events
* improved addRecurrentEvents function
* fixed flaky test