Commit Graph

1164 Commits

Author SHA1 Message Date
David Taylor 6f682acae3
DEV: Convert to native class syntax (#653) 2024-11-29 16:41:31 +01:00
David Taylor cb32ce6506
DEV: Update linting (#652) 2024-11-28 15:50:27 +01:00
Discourse Translator Bot e4e9f2f171
Update translations (#650) 2024-11-26 23:14:52 +01:00
David Taylor f72b75202e
DEV: Update linting (#648) 2024-11-20 18:52:14 +01:00
David Taylor 80d6df256a
DEV: Update linting (#647) 2024-11-20 15:44:54 +01:00
Discourse Translator Bot 7838572585
Update translations (#646) 2024-11-20 00:21:20 +01:00
dependabot[bot] 161f1ec27c
Bump cross-spawn from 7.0.3 to 7.0.6 (#645)
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-19 10:39:06 +00:00
David Taylor 4038e4ce48
DEV: Update eslint config (#644) 2024-11-19 11:20:00 +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
Jarek Radosz 588052ff0d
DEV: Convert helpers to plain functions (#640)
(`format-event-name` was unused)
2024-10-30 22:27:28 +01:00
Jarek Radosz 82d72f03f1
DEV: Remove after-user-name outlet connector (#639)
d-calendar is now using user-status to display holiday flair, so this wasn't needed (or resulted in duplicated icon, e.g. on group-index)
2024-10-30 12:41:04 +01:00
benj 55004c2fe3
DEV: Adds ability to see multiday events in sidebar (#609)
* DEV: Adds ability to see multiday events in sidebar
2024-10-29 13:30:29 -05:00
Discourse Translator Bot efdf3f63f2
Update translations (#638) 2024-10-29 15:31:27 +01:00
dependabot[bot] dc1a65b872
Bump rexml from 3.3.6 to 3.3.9 (#637)
Bumps [rexml](https://github.com/ruby/rexml) from 3.3.6 to 3.3.9.
- [Release notes](https://github.com/ruby/rexml/releases)
- [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/rexml/compare/v3.3.6...v3.3.9)

---
updated-dependencies:
- dependency-name: rexml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-28 20:41:30 +01:00
Gabriel Grubba 1ffd8abfcd
DEV: Update plugin annotations (#634) 2024-10-25 09:42:44 +01:00
Kelv 8bcf98bbe1
DEV: resolve Rails/ReversibleMigrationMethodDefinition errors (#636) 2024-10-25 14:57:08 +08: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
David Taylor d05ab78ad4
DEV: Modernise csv-uploader component (#633)
- remove uppy mixin
- native class
- glimmer component
- gjs file format
2024-10-24 20:48:21 +01:00
Joffrey JAFFEUX b7858ef7cb
FIX: category settings for calendar were incorrect (#631)
Following the key change in d31933bf49 this has been broken.

This commit also hides the section if `sort_categories_by_event_start_date_enabled` AND `disable_resorting_on_categories_enabled` are not enabled, prior to this change we would just show the title, with no checkbox to check.
2024-10-24 16:13:51 +09:00
Joffrey JAFFEUX 52ebb592d2
FIX: prevents pushing null watching invitee (#629)
This commit has 3 parts:

- Ensuring than when attempting to join a event we return an invitee even if the user was already part of the event, before we would return null which would have required a special handling. In this case we were just adding a null invitee.

- Ensures invitees/suggestedUsers/sampleInvitees use tracked properties correctly. And do not require to manually create a TrackedArray, the model should always handle this implementation detail.

- When joining an event we were pushing the watchingInvitee to the sampleInvitees even when the watchingInvitee was null, which would create an error.
2024-10-24 11:50:45 +09:00
Joffrey JAFFEUX 223697e880
UI: forces full height of calendar on upcoming events (#630) 2024-10-23 19:09:26 +09:00
Joffrey JAFFEUX 6a918390a5
FIX: correctly set upcoming events key (#628)
The previous one has been removed in d31933bf49
2024-10-23 18:35:11 +09:00
Joffrey JAFFEUX 72a28c4a47
FIX: prevents error if post event node is not found (#626)
This could happen during a server error for example. Ideally we should ensure the post event doesn't disappear on such error, but at least for now we avoid the crash.
2024-10-23 14:06:43 +11: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 e0c5433022
FIX: correctly fill recurrence property (#625) 2024-10-23 12:07:09 +11:00
Sam a90490e20a
FIX: missing localization (#624) 2024-10-23 09:32:40 +09: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
Discourse Translator Bot 382ad8f477
Update translations (#622) 2024-10-22 22:44:28 +09:00
Sam b9fc1bd60c
FEATURE: suppress interested and not going buttons by default (#621)
Interested and not going are generally not used.

To avoid adding this clutter to the UI we now suppress this.

Sites wishing to have these buttons can amend the `event_participation_buttons` site setting

Also:

- Add a show participants button even if there are no participants (so admins can populate events)
- Fix localization for event participation
- Allow toggling attendance by pressing the same button
- Removes leave event button from the dropdown menu
- Refactors outlets to allow maximum flexibility

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-10-22 18:39:29 +09:00
Joffrey JAFFEUX ef3e3cbfcd
DEV: correctly setup modifier (#620) 2024-10-22 13:54:45 +09:00
Joffrey JAFFEUX 3f37ca6256
DEV: adds a post event status decorator (#619) 2024-10-22 13:52:41 +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
Discourse Translator Bot 54460416c2
Update translations (#618) 2024-10-16 17:51:52 +09:00
Renato Atilio eda5232248
UX: add upcoming events from recurrence to the category calendar (#616)
Bringing parity to the same behavior from the /upcoming-events calendar.
2024-10-15 16:59:05 -03:00
Kelv 1b191711e1
DEV: Switch to use pnpm (#617) 2024-10-14 13:38:37 +02: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
Renato Atilio 8a6acef386
UX: fix event builder i18n (#613)
* UX: fix post builder i18n

* Update assets/javascripts/discourse/components/modal/post-event-builder.js

Co-authored-by: Jarek Radosz <jradosz@gmail.com>

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-10-09 15:24:42 -03:00
Discourse Translator Bot 068967816e
Update translations (#612) 2024-10-08 20:21:39 +02:00
Discourse Translator Bot 2f0dd08569
Update translations (#608) 2024-10-02 08:49:42 +02:00
Kris b00c14447e
UX: prioritize events with high participant counts (#610) 2024-09-30 10:35:03 -04:00
Keegan George 81e1c8e3c4
SECURITY: Fix XSS in calendar event name (#607)
We need to sanitize event names to prevent XSS from occurring in events.
2024-09-12 10:22:05 -07:00
benj f83605c30b
UX: Allow event time to be hidden if desired (#606)
* Allow event time to be hidden if desired

* spec adjustment

* re: feedback

* Update test/javascripts/integration/components/upcoming-events-list-test.gjs

Co-authored-by: Jarek Radosz <jradosz@gmail.com>

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-09-10 10:18:06 -05:00
dependabot[bot] 3020fa9f27
Bump micromatch from 4.0.5 to 4.0.8 (#605)
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-01 12:46:32 +02:00
dependabot[bot] fc4f59373d
Bump rexml from 3.3.3 to 3.3.6 (#602)
Bumps [rexml](https://github.com/ruby/rexml) from 3.3.3 to 3.3.6.
- [Release notes](https://github.com/ruby/rexml/releases)
- [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/rexml/compare/v3.3.3...v3.3.6)

---
updated-dependencies:
- dependency-name: rexml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-01 12:28:51 +02:00
Natalie Tay 66259cd21d
DEV: Extract common calendar options (#604)
Extract common calendar options
2024-08-28 10:48:49 +08:00
benj 57fa918858
Adds plugin outlet to events list (#601) 2024-08-22 15:39:34 -05:00
Joffrey JAFFEUX 70ef3f8fea
FIX: removes clean title codepath (#600)
This codepath was buggy when the title was ending with digits and moreover it's usefulness was debatable given post events support showing the date in the topic list; you shouldn't need to have the date in the title itself.
2024-08-17 13:06:32 +02:00
Régis Hanol f268eccaa0
PERF: removed N*2+1 in availability topic (#599)
WE "recently" did a few changes in the way we use the availability topic

- We used to have 1 topic per year, but have now moved to just using one topic and deleted past posts
- We used to delete past automatic holidays, but we don't anymore since we use them to keep track of #leave days used
- There are more employees covering more regions

All three changes made the query that list all the events to be displayed in the availability topic go 💥

It used to be

- 1 query to list all events from 6 months ago up to 6 months in the future
- 1 query for every events to load the associated user
- 1 query for every events to load the associated's user timezone

So basically, a N*2 + 1 😅

This commit fixes the issue by doing

- 1 query to get all "standalone" events (those associated to a post)
- 1 query to get all the users timezones (just the ones who have an holiday in the current period).
- 1 query to get all the "automatic" events (aka. holidays that are comming from the holidays gem).

So we went from N*2 + 1 down to 3 🚀
2024-08-14 18:11:24 +02:00