Commit bfbb04c
authored
Enchance/event invites (#1074)
This pull request introduces significant improvements to the event
invitation workflow, debugging guidelines, and UI enhancements for
person selection. The main changes include a new searchable person
selector in the frontend, expanded controller logic for inviting
existing users, improved debugging documentation, and more robust
handling of invitation notifications and authorization.
**Event Invitation Workflow Improvements**
* Added an `available_people` endpoint to
`Events::InvitationsController` to provide a filtered, searchable list
of people eligible for invitation, excluding those already invited and
those without email addresses. This endpoint supports search queries and
returns results formatted for frontend consumption.
* Updated invitation creation logic to support inviting existing users
by ID, automatically populating email and locale from the selected
person.
* Improved invitation destruction and creation responses to support
Turbo Streams, updating the UI dynamically and displaying flash
messages.
[[1]](diffhunk://#diff-f5bce0fdefe4021e576bd0afd9c7aa69a1fc93d255ac43b4677b6cd4a494d03eR38-R52)
[[2]](diffhunk://#diff-f5bce0fdefe4021e576bd0afd9c7aa69a1fc93d255ac43b4677b6cd4a494d03eR134-R140)
* Enhanced notification logic to distinguish between invitations for
existing users (using in-app notifications) and invitations by email
(using mailers).
**Frontend Enhancements**
* Added a new Stimulus controller `person_search_controller.js` that
replaces a standard select box with a live-search input for person
selection, calling the new backend endpoint and updating the select
based on user choice.
* Added new invitation-related styles in `invitations.scss` and imported
them in the main stylesheet.
[[1]](diffhunk://#diff-e0c8019729fad32b5ea701ddce7b7c208a2b77a40b6e4c9b082059a3c1169627R1-R5)
[[2]](diffhunk://#diff-5499b5855ee11d3be02ebb1d25ee68dbe0331c7a2fc94250b73f716f42b803c6R34)
**Debugging and Development Guidelines**
* Updated documentation in `.github/copilot-instructions.md` and
`AGENTS.md` to clarify that Rails console and runner should not be used
for debugging. Instead, debugging should be performed through
comprehensive tests and log analysis, with specific tips for using RSpec
and temporary debug output.
[[1]](diffhunk://#diff-227c2c26cb2ee0ce0f46a320fc48fbcbdf21801a57f59161b1d0861e8aad55f5R95-R107)
[[2]](diffhunk://#diff-227c2c26cb2ee0ce0f46a320fc48fbcbdf21801a57f59161b1d0861e8aad55f5L105-R122)
[[3]](diffhunk://#diff-a54ff182c7e8acf56acfd6e4b9c3ff41e2c41a31c9b211b2deb9df75d9a478f9R22-R32)
[[4]](diffhunk://#diff-a54ff182c7e8acf56acfd6e4b9c3ff41e2c41a31c9b211b2deb9df75d9a478f9L32-R43)
**Authorization and Notification Handling**
* Improved authorization logic in `EventsController` and
`ApplicationController`, ensuring proper handling for unauthenticated
users and integrating invitation token authorization and notification
reading.
[[1]](diffhunk://#diff-ffc530a02a78834a7cc82d089dee80fa08f52d911015abfa0c563543b9fce194R6-R8)
[[2]](diffhunk://#diff-ffc530a02a78834a7cc82d089dee80fa08f52d911015abfa0c563543b9fce194R31-R35)
[[3]](diffhunk://#diff-353dd41f0d149f307449a2697955bbe8d70e73ea85c77b4a42ee9751273ba960R161-R169)File tree
176 files changed
+4505
-606
lines changed- .github
- app
- assets
- javascripts/better_together/controllers
- stylesheets/better_together
- controllers
- better_together
- events
- users
- concerns/better_together
- helpers/better_together
- javascript/controllers/better_together
- jobs/better_together
- geography
- mailers/better_together
- models
- better_together
- concerns/better_together
- notifiers/better_together
- joatu
- policies/better_together
- views/better_together
- event_invitation_notifier/notifications
- event_invitations_mailer
- events
- people
- person_blocks
- config
- initializers
- locales
- db/migrate
- docs
- community_organizers
- developers/systems
- diagrams
- exports
- png
- svg
- source
- end_users
- meta
- platform_organizers
- future_spec
- models/better_together
- requests/better_together/api/auth
- spec
- builders/better_together
- controllers
- better_together
- concerns
- dummy/db
- examples
- factories/better_together
- features
- agreements
- conversations
- devise
- events
- joatu
- notifications
- jobs/better_together
- lib
- mailers/better_together
- models
- better_together
- geography
- infrastructure
- joatu
- metrics
- concerns
- notifiers/better_together
- joatu
- policies/better_together
- joatu
- requests/better_together
- joatu
- metrics
- services/better_together/joatu
- support
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
176 files changed
+4505
-606
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
95 | 108 | | |
96 | 109 | | |
97 | 110 | | |
| |||
102 | 115 | | |
103 | 116 | | |
104 | 117 | | |
105 | | - | |
| 118 | + | |
106 | 119 | | |
107 | 120 | | |
108 | 121 | | |
| 122 | + | |
109 | 123 | | |
110 | 124 | | |
111 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
18 | 31 | | |
19 | 32 | | |
20 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
22 | 33 | | |
23 | 34 | | |
24 | 35 | | |
| |||
29 | 40 | | |
30 | 41 | | |
31 | 42 | | |
32 | | - | |
| 43 | + | |
33 | 44 | | |
34 | 45 | | |
35 | 46 | | |
| |||
Lines changed: 154 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
162 | 168 | | |
163 | 169 | | |
164 | 170 | | |
| |||
0 commit comments