Refactor modules mounting routes#13294
Merged
andreslucena merged 10 commits intodecidim:developfrom Jan 10, 2025
Merged
Conversation
Merged
The merge-base changed after approval.
55a7e36 to
01d3a5f
Compare
Member
|
As we discussed in the meeting, I don't have any alternative way of doing this. I agree with what you mention about consistency, the routes should be all the similar that we can between the different kind of modules (being for participants or admins). Apart from what you mentioned and added in the PR, I'd also add some Releases Notes in |
andreslucena
reviewed
Jan 8, 2025
andreslucena
reviewed
Jan 8, 2025
andreslucena
reviewed
Jan 8, 2025
Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
Member
|
@alecslupu can you solve the git conflicts here 🙏🏽 ? |
Contributor
Author
Done |
andreslucena
approved these changes
Jan 10, 2025
entantoencuanto
added a commit
that referenced
this pull request
Jan 14, 2025
* develop: (27 commits) WCAG navigation submenu (#13796) Update gem dependencies (part 3) (#13849) Prevent notifications for deleted users (#13812) Retries NPM installation a couple times to prevent network timeouts (#13831) Update gem dependencies (part 2) (#13839) Enhance signature pdf export (#13778) Fix HexaPDF dependency (#13834) Fix flaky spec in authentication (#13827) Merge upload field for documents and image on proposal admin form (#13735) Update gem dependencies (#13835) Upgrade erb_lint to 0.8.0 (#13833) Fix flaky spec in geocoder (#13820) Refactor modules mounting routes (#13294) Upgrade check-spelling action (#13825) Add missing images in the custom registration emails from meetings (#13632) Add missing translations (#13793) Fix proposal map performance with hundreds of markers (#13798) Create multiple surveys within same Survey component (#13420) Accountability bulk actions (#13730) Improve UI for sorting options on comments (#13670) ...
antopalidi
pushed a commit
to openpoke/decidim
that referenced
this pull request
Feb 12, 2025
* Refactor decidim mounting routes option * Fix failing specs * Apply review recommendation * Run lint on release notes * Apply suggestions from code review Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com> * Run linters --------- Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
andreslucena
added a commit
that referenced
this pull request
Mar 3, 2025
* Refactor decidim mounting routes option * Fix failing specs * Apply review recommendation * Run lint on release notes * Apply suggestions from code review Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com> * Run linters --------- Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

🎩 What? Why?
While working on #13267, i have noticed that some of the specs have started to fail due to some wrong routes being generated. Among those routes, are the admin templates, and admin participatory space. Upon a closer investigation, i have seen that the routes are being correctly generated in console, but for some reason they are not being correctly generated in the web interface.
The edit admin participatory space route was generated without the
/adminnamespace when called from the user interface, yet it was correctly generated when was called from admin interface.Investigating rails routing data, i came across: rails/rails#51933 and rails/rails#45719 which may be the culprits of this issue.
Trying the fix suggested in rails/rails#51933 with an override, i got even more specs that were failing.
When i have looked at the changes suggested by rails/rails#45719, I could not find the config setting that would have allowed me to properly set the data at engine level.
In order to be able to keep the functionality, i had attempted to define some helper methods to redefine the
decidim_admin_assembliesengine to be specially used for that button, yet it still failed. As an attempt to fix the issue, i have tried also the changes in this PR, and worked flawlessly.I am opening a standalone PR, as this change could be elaborated more. While this PR changes only the admin routes :
decidim/decidim-admin/config/routes.rb
Lines 18 to 20 in ccfbe5d
and also
decidim/decidim-admin/config/routes.rb
Line 42 in ccfbe5d
An open question regarding the consistency still remains for verification engines mounted in admin, namely :
decidim/decidim-admin/config/routes.rb
Lines 38 to 40 in ccfbe5d
And, also, for consistency reasons I would perform the same kind of changes for the frontend part.
📌 Related Issues
Link your PR to an issue
Testing