Conversation
|
@oriolgual, thanks for your PR! By analyzing the history of the files in this pull request, we identified @mrcasals, @Dor3nz and @josepjaume to be potential reviewers. |
There was a problem hiding this comment.
Missing top-level module documentation comment.
There was a problem hiding this comment.
Missing top-level class documentation comment.
743495c to
dbc5691
Compare
Current coverage is 97.26% (diff: 98.76%)@@ master #525 diff @@
==========================================
Files 262 269 +7
Lines 4116 4277 +161
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 4001 4160 +159
- Misses 115 117 +2
Partials 0 0
|
dbc5691 to
16e9c64
Compare
|
@oriolgual, thanks for your PR! By analyzing the history of the files in this pull request, we identified @mrcasals, @josepjaume and @Dor3nz to be potential reviewers. |
87b6334 to
e4c3745
Compare
|
I'll handle the autocomplete field in another PR |
4840706 to
718694f
Compare
There was a problem hiding this comment.
I think we need to decide a style for this so everyone uses _ for private methods or not.
There was a problem hiding this comment.
I don't have a strong opinion on this, but I'm OK with doing it.
There was a problem hiding this comment.
docs are outdated (the only param is a block)
There was a problem hiding this comment.
I wonder if this can break things at L'Hospitalet repo. In order to diferentiate the built-in engines form the ones from Decidim, I named the survey engine as decidim_hospitalet/surveys, and it looks like this could not work well. Is there any way to Overwrite this? Can we use an attribute for this and, if blank, delegate to this value?
There was a problem hiding this comment.
This is confusing as the mounted_engine_name doesn't have anything to do with the engine_name, as routes are mounted using the feature_name instead.
@oriolgual maybe you could change this to mounted_feature_name?
There was a problem hiding this comment.
This is actually the name of the mounted route: https://github.com/AjuntamentdeBarcelona/decidim/blob/master/decidim-core/config/routes.rb#L32
I guess it isn't related to the engine name per se (the class)
There was a problem hiding this comment.
@oriolgual what I said holds true, maybe a renaming is due 🎩
There was a problem hiding this comment.
OK, I hope we don't have collisions on this :/
There was a problem hiding this comment.
@josepjaume but what I actually want is the name of the mounted engine that rails is suing so I can call: decidim_meetings.meeting_path for example, and this is not a feature it's an engine.
|
Shouldn't we define the ResourceManifest in each existing feature, or this works automagically? |
beagleknight
left a comment
There was a problem hiding this comment.
Outstanding work man! I just commented a few things because I don't understand some decisions. If you can elaborate them it will be useful.
There was a problem hiding this comment.
s/eachother/each other
There was a problem hiding this comment.
If the link_name is supposed to be a String why do you need to call to_s?
There was a problem hiding this comment.
This to_s is redundant, since if you pass a Symbol it will automatically be converted to a String when performing the query
There was a problem hiding this comment.
Why do we need that dependency as development and not as a normal one?
There was a problem hiding this comment.
Because this way you could have the meetings engine without the proposals one (this why I added the ResourceLink concept). But it's needed at dev in order to test it.
There was a problem hiding this comment.
Why didn't use a scoped resource here?
There was a problem hiding this comment.
Umm I guess I can do it.
There was a problem hiding this comment.
IMO this should be new/create instead of edit/update, since what you are dealing with here is the event of closing a meeting, not the meeting itself, so you are creating a "close this meeting" event, not editing the meeting
There was a problem hiding this comment.
The thing is that there aren't any close meeting model, it's just updating an existing model. I guess I can add edit/update too but they'll do the same as new/create.
There was a problem hiding this comment.
Yeah, I know there's no model for this. See this controller:
Activating a step is not related to an "activation model" either, but I'm creating the activation, that's why I used create/destroy there (destroy was removed since we decided that we could not deactivate steps anymore).
Anyway, that might just be me here, might be just my opinion.
There was a problem hiding this comment.
I guess I can use new/create even when we're re-closing a meeting.
There was a problem hiding this comment.
Shouldn't this be add_dependency?
There was a problem hiding this comment.
No, because we don't want meetings to depend on proposals.
There was a problem hiding this comment.
Group of People Complaining About Something LOL
|
@mrcasals you only need to define a |
josepjaume
left a comment
There was a problem hiding this comment.
Epic work you did here. Can't help to think all this could be moved to a decidim-resources module.
There was a problem hiding this comment.
Still unsure wether the header should belong here, but let's leave it like that for the moment.
There was a problem hiding this comment.
Even if we don't allow null names in the DB, I think we should validate presence here anyway.
There was a problem hiding this comment.
It's just on the previous line!
There was a problem hiding this comment.
JúsepCI: Remove blank line
There was a problem hiding this comment.
Wrong docs: this line is just a copy-paste from FeatureManifest and doesn't make sense in this context
There was a problem hiding this comment.
This is confusing as the mounted_engine_name doesn't have anything to do with the engine_name, as routes are mounted using the feature_name instead.
@oriolgual maybe you could change this to mounted_feature_name?
There was a problem hiding this comment.
Isn't this kind of private-ish?
There was a problem hiding this comment.
Not really, I'm using it at CloseMeetingForm to load all the proposals in the same process.
There was a problem hiding this comment.
Shouldn't we split this feature in smaller files somewhere else?
There was a problem hiding this comment.
Maybe, but after having to deal with it and understanding it felt that it was easier to use it and modify it when everything is together. Otherwise it might be difficult to see the whole picture. I can split it though if you think it's worth it.
There was a problem hiding this comment.
Don't we need to specify a resource name like register_feature?
There was a problem hiding this comment.
We can, but since it's optional you can do it at the block.
718694f to
ba85bfb
Compare
ba85bfb to
f6d79a2
Compare
- revert 7b6f2e5 for `author_event` - add conditional checks for `UserPresenter` on Organization class
- reverting 25bd9a4 - reverting 7b6f2e5 - better fix comes from decidim@7372946
* [BACKPORT] Fix user presenter for user groups (decidim#4974) * Fix user presenter for user groups (decidim#4973) * Fix user presenter for user groups The user groups do not have a `.deleted?` method defined for them which caused the user presenter to break the notifications view in case the notification was linking to a group user. * Add CHANGELOG entry * Fix changelog * 🐛 ⏪ Better fixes for decidim#525 - reverting 25bd9a4 - reverting 7b6f2e5 - better fix comes from decidim@7372946 * 🌐 amendable event FR label decidim#532 * 🐛 HashtagRenderer in comment events decidim#532 * 🐛 fix step_cta_path decidim#488 * 🌐 [pages] FR "Titre" >> "Page" !
🎩 What? Why?
Adds a feature to close a meeting. In order to close it, you need to specify which proposals where created during that meeting.
To do this I've created a way to link resources (meetings, proposals, whatever) between them without having to create dependencies between engines.
📌 Related Issues
📋 Subtasks
📷 Screenshots (optional)
👻 GIF