Commit Graph

232 Commits

Author SHA1 Message Date
David Taylor d471bbdf9a
DEV: Convert group timezones from widgets to glimmer (#731)
Also introduces a basic system spec for the feature (previously there was no test coverage of the frontend at all)
2025-05-28 11:36:13 +01:00
Sam 8152a0ca7c
FEATURE: optional attached chat channel for event (#728)
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>
2025-05-28 16:13:33 +10:00
Krzysztof Kotlarek 42d6ccf44d
FIX: allow create events for everyone group (#726)
When `discourse_post_event_allowed_on_groups` is set to `everyone`, everyone should be able to create post events.
2025-05-02 15:47:21 +08:00
Joffrey JAFFEUX 89a90d892f
DEV: fill in doesnt trigger key down/up/press events (#724)
This won't work in the future for playwright.
2025-04-25 18:27:04 +02:00
Joffrey JAFFEUX f874383526
DEV: ensures we are on correct page (#723)
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.
2025-04-25 17:21:19 +02:00
Loïc Guitaut 90313ae82a
DEV: Add system spec to check core features are working fine (#713) 2025-04-09 14:21:34 +02:00
David Taylor b023c4d2f2
DEV: Update spec in preparation for dropping glimmer_topic_list_mode (#714) 2025-04-03 15:50:08 +01:00
Alan Guo Xiang Tan 7674040f4f
DEV: Fix flaky test (#711)
When asserting against the database, we have to consider that
asynchronous nature of system test.
2025-03-28 16:42:09 +08:00
Juan David Martínez Cubillos 3d6b7ae482
DEV: Allow the 'UpcomingEventsCalendar' Component to be used outside of the 'PostEventUpcomingEventsIndexRoute' route (#706)
* 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
2025-03-25 10:31:57 -05:00
Alan Guo Xiang Tan 1c61e4324f
PERF: Fix N+1 problem on `DiscoursePostEvent::EventsController#index` (#698) 2025-03-10 15:27:55 +08:00
Arpit Jalan ece387e429
FIX: do not show 'send pm' button to the user who created the event (#690) 2025-02-12 18:31:59 +05:30
Bianca Nenciu 72aa6e1a9b
FIX: Allow events belonging to deleted users to be destroyed (#688)
`DiscourseCalendar::CreateHolidayEvents` periodically deletes holiday
events to recreate updated ones. If one of the events belonged to a user
that has been destroyed and if `enable_user_status` was enabled, the
`after_destroy` hook would raise an exception.
2025-02-10 19:16:27 +02:00
Jordan Vidrine 3007975b95
UX: Do not show participants in admin drop down menu for standalone events (#679) 2025-01-14 19:28:06 -06:00
David Taylor 0d13b05695
DEV: Force enable glimmer topic list in specs (#670)
Otherwise it'll fail if some other incompatible plugin is installed at the same time
2024-12-19 17:30:31 +00:00
David Taylor 602db39265
DEV: Update specs for core change (#669)
https://github.com/discourse/discourse/pull/30375
2024-12-19 17:17:41 +00:00
Joffrey JAFFEUX df7e7a9098
FIX: ensures bulk-invite is working properly (#666)
There was two bugs:
- naming of properties were incorrect s/is_private/isPrivate and s/is_public/isPublic
- a previous refactoring has used `=` for setter when it's an `EmberObject` and `set` should be used

This commit also adds a spec and page objects to ensure this modal is working as expected.
2024-12-10 14:57:46 +01:00
Jordan Vidrine 725ae51373
UX: Events UI Edits (#641)
This PR restyles the current events post UI:

Minimize size of invitee avatars
move CTA buttons to bottom
remove invitee header & show more button (show more is in ellipses drop down)
restyle border
restyle month & date size & spacing
increase font size for title
add "0 going" placeholder to prevent jumpiness when invitees are rendered

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-12-03 18:34:34 +01:00
Jarek Radosz 026d755c78
DEV: Use `topic-list-header-sortable-column` transformer (#651) 2024-12-02 14:40:53 +01:00
Alan Guo Xiang Tan a6d940770a
DEV: Bump rubocop-discourse to 3.8.0 (#643)
This commit resolves all `Lint/OrAssignmentToConstant` cop violations.
2024-11-15 06:43:27 +08:00
Renato Atilio b2fb2e4efc
FIX: regressions from modernization (#642)
When converting widgets to Glimmer and modernizing the plugin, there were some small leftovers.

status wasn’t tracked, so the UI didn’t update

raw_invitees should be camelCase now

custom_fields should be camelCase, and setting it was not working
2024-11-07 10:56:21 -03:00
Joffrey JAFFEUX 557d00b886
FEATURE: keeps going invitees for recurring events (#632)
Prior to this fix when computing the next event date we were resetting the status of every invitees. The status will now only be reset for non going users.
2024-10-25 09:23:16 +09:00
Joffrey JAFFEUX d31933bf49
DEV: moves translatations under discourse_post_event (#627)
Various events in the life of this plugin have caused an over complicated key and duplicated keys. This commits attempts to regroup everything related to discourse_post_event under a top level `discourse_post_event` key, removes the `event_ui` level as it's not very clear, technically everything is UI. And finally attempts to remove the duplicates.
2024-10-23 14:06:09 +11:00
Joffrey JAFFEUX ee693e33b0
FIX: correctly render html of event title (#623)
This has been lost during the move to glimmer.

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2024-10-22 23:18:15 +09:00
Joffrey JAFFEUX b4c4e4e0bc
DEV: migrate post event to glimmer (#615)
This commit is making two major changes:

- Move all the post event widgets code to glimmer
- Implement tracked models to ensure reactivity, many paths didn't have real reactivity atm and were mostly working by luck or the fact that widgets re-render a lot
---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-10-22 12:38:40 +09:00
Sam 647ba1ca7f
FEATURE: allow event editors to control list of users on the event (#614)
Previously event editors could remove people from an event but had no way
of acting on behalf of users in the event and adding them.

That meant that for events to properly show up in agenda and so on a user
must actively click a button.

In some cases (company ran events) the event manager may prefer controlling
attendance.
2024-10-14 08:59:23 +11:00
Joffrey JAFFEUX 499f29a2a0
FIX: shows category calendar on hot/latest (#611)
* FIX: shows category calendar on hot/latest

The previous URL parsing code was not resilient to these paths, we now use the router to recognize these paths and extract the params we need.

* linting

* Update category_calendar_spec.rb
2024-10-10 17:00:14 +11:00
Penar Musaraj 40d4c65efd
DEV: fix flakey post event spec (#596) 2024-08-08 15:44:22 -04:00
Régis Hanol 20a9fe4a39
FIX: BBCode parsing specs (#575)
Requires discourse/discourse#27173 to be merged.

Will add a `.discourse-compatibility` once merged.
2024-06-18 11:53:10 +02:00
Régis Hanol 62d7fffb5a
FIX: delete future holidays on region change (#571)
When a user changes their holiday region in their profile, we will automatically compute upcoming (6 months) holidays for their new regions. If the events are similar between the two regions, we automatically fix the region. But when they're drastically different, we just leaves the old holiday events be...

It's a somewhat rare event but is annoying enough that it warranted a proper fix.

This ensures we removes any "pre-loaded" holiday events that aren't in the regions the users have selected. That way, no more "fanthom" holidays from the previous region.

Internal ref - t/64785
2024-05-21 16:46:07 +02:00
Régis Hanol acb0681ff9
FEATURE: closed events (#564)
Adds support for "closed" events instead of just relying on the start & end dates.

An event might now be "expired" when it happened in the past.

An event might now also be "closed", if for whatever reasons, the author decides to "cancel" it.

Context - https://meta.discourse.org/t/when-closing-event-it-moves-it-to-todays-date-time/307292
2024-05-14 10:12:47 +02:00
Loïc Guitaut 665d35f914 DEV: Fix new Rubocop offenses 2024-03-05 16:54:54 +01:00
Natalie Tay 84ef46a38c
SECURITY: Hide invitees from users who are not allowed to see the event post (#544) 2024-02-22 11:32:47 +08:00
Natalie Tay dfc4fa15f3
SECURITY: Disallow self invite to private events (#543) 2024-02-21 15:36:36 +08:00
Martin Brennan 35d93e65f9
DEV: Add auto group refresh to specs (#542)
This is needed for the change in the core PR
https://github.com/discourse/discourse/pull/25602
2024-02-08 12:32:04 +10:00
Kris 2cf2c7b482
FIX: update test for holiday adjustments (#541) 2024-02-06 22:29:46 +01:00
Renato Atilio dea70ab377
FIX: convert emoji to unicode on event title (#530) 2024-01-29 11:50:50 -03:00
Ted Johansson b49e327f5c
DEV: Fix some TL group loading for admins in tests (#536) 2024-01-25 17:50:22 +10:00
Ted Johansson ee6ad02d0b
DEV: Exclude system users when serializing group timezones (#533)
The post_serializer_spec was calling Group.refresh_automatic_groups!(:admins), relying on that call booting system users from the group.

This change makes it so the implementation excludes any system users instead.
2024-01-25 07:42:46 +08:00
Renato Atilio 189846f980
DEV: fix another time dependent flaky test (#529) 2024-01-18 11:24:43 -03:00
Ted Johansson 82689c51bf
DEV: Fix time dependent flaky test (#528)
If event1 and event2 are fabricated in different second increments, this will flake. This PR provides explicit timestamps to the fabricated events.
2024-01-18 15:27:58 +08:00
Renato Atilio b622e0f200
FEATURE: support upcomingDays parameter on the upcoming events list (#524)
Adds a before parameter to the events endpoint and uses it through a upcomingDays parameter to the upcoming events list component – which can be used when adding it to the right sidebar blocks theme component.
2024-01-17 21:54:39 -03:00
Jarek Radosz 2201b254ff
DEV: Update linting (#503) 2024-01-15 11:24:00 +00:00
Vinoth Kannan 5e77d77239
FIX: include year in holiday identifier to differentiate yearly recurring events. (#523)
We must include the year identifier since now we can use same topic to track holidays for multiple years. Also, we don't need to load old public holiday events for more than 6 months.
2024-01-10 01:44:17 +05:30
Renato Atilio 9fe3eb2583
FEATURE: support count parameter on the events list component (#513)
* FEATURE: support count parameter on the events list component

* DEV: fix linting
2024-01-08 15:09:47 -03:00
Juan David Martínez Cubillos ffe812b2a9
FIX: Event sorting shows oldest events first (#429)
* FIX: Event sorting shows oldest events first

---------

Co-authored-by: Jean Perez <jmperez127@gmail.com>
2023-12-14 11:31:37 -04:00
Krzysztof Kotlarek d873057af6
DEV: Replace deprecated min_trust_to_create_post (#505)
In https://github.com/discourse/discourse/pull/24740, `min_trust_to_create_topic` site setting was replaced by `create_topic_allowed_groups`. This PR replaces the former, deprecated one, with the latter.
2023-12-14 14:37:41 +11:00
Renato Atilio becfe9b2ad
FEATURE: site setting to include expired events on calendar views (#499)
* FEATURE: site setting to include expired events on calendar views

Adds a new site setting to include expired events on calendar views (Upcoming Events and Category Calendar).

Past events are displayed with the configured color (from the category or from the "Map events to color" site setting) as text and border colors instead of the background.
2023-12-12 19:10:54 -03:00
Renato Atilio b9188c4c16
DEV: optional include_details param for events' list (#496) 2023-12-08 22:01:04 -03:00
Krzysztof Kotlarek 1c5beb4432
DEV: merge discourse post event settings to calendar (#490)
Before, site settings were divided into `discourse calendar` and `discourse events`.

This PR is merging them. Also, translation were moved under `discourse_calendar` key.
2023-12-07 08:59:08 +11:00
Jarek Radosz 39bd81580f
DEV: Fix flaky specs (#492) 2023-12-04 17:49:13 +01:00