Improve the budget page and the project card #5809
Improve the budget page and the project card #5809
Conversation
26db64f to
921d50d
Compare
|
Hi @agustibr is this still a draft? or it is ready to merge? |
|
Hi @tramuntanal ! it's a draft as the design part was pending. |
921d50d to
a83fed6
Compare
a83fed6 to
c065da5
Compare
4d378de to
66dc6e1
Compare
66dc6e1 to
fdcf44a
Compare
536602f to
54202b6
Compare
136db22 to
efc076f
Compare
|
@decidim/core this is approved by @decidim/product , can you review it please? |
00bd150 to
602ee3a
Compare
7f7aae9 to
bf709e5
Compare
tramuntanal
left a comment
There was a problem hiding this comment.
Hi @agustibr ,
Good job!
I've left a few suggestions, and have the following doubt:
Why do we have a create_dummy_resource (I can't see where it is used) and the corresponding create_dummy_resource_spec?
| - **decidim-core**: Fix clearing the current_user after sign out [#5823](https://github.com/decidim/decidim/pull/5823) | ||
| - **decidim-budgets**: Send email with summary on order checkout [\#6006](https://github.com/decidim/decidim/pull/6006) | ||
| - **decidim-budgets**: Projects filter by multiple categories [/#5992](https://github.com/decidim/decidim/pull/5992) | ||
| - **decidim-budgets**: Projects filter by multiple categories [\#5992](https://github.com/decidim/decidim/pull/5992) |
There was a problem hiding this comment.
It seems you doubled the "Projects filter by multiple categories" entry by mistake when fixing the slash
| end | ||
| # manually reset cached photos | ||
| @attached_to.reload | ||
| @attached_to.instance_variable_set(:@photos, nil) |
There was a problem hiding this comment.
why do we need instance_variable_set and not use a regular accessor? we should avoid metaprograming..
There was a problem hiding this comment.
I moved the existing gallery_methods.rb (and attachment_methods.rb) from decidim-proposals to decidim-core the author is @microstudi, surely he can answer you better than I 😁
There was a problem hiding this comment.
To be honest, I don't remember 😓 . Probably I was testing something and it wasn't spotted at the review. looking at the code now, it certainly doesn't seem necessary at all.
| # A command with all the business logic when a user updates a proposal. | ||
| class UpdateProposal < Rectify::Command | ||
| include AttachmentMethods | ||
| include Decidim::AttachmentMethods |
There was a problem hiding this comment.
| include Decidim::AttachmentMethods | |
| include ::Decidim::AttachmentMethods |
| # A command with all the business logic when a user creates a new proposal. | ||
| class CreateProposal < Rectify::Command | ||
| include AttachmentMethods | ||
| include Decidim::AttachmentMethods |
There was a problem hiding this comment.
In modules it is typical to have problems with namespacing. If we use the absolute namespace this will avoid having to perform many overrides
| include Decidim::AttachmentMethods | |
| include ::Decidim::AttachmentMethods |
There was a problem hiding this comment.
The reason is that this is not widely used in Decidim, but yes I'll change it to use the absolute namespace.
| # A command with all the business logic when a user updates a proposal. | ||
| class UpdateProposal < Rectify::Command | ||
| include AttachmentMethods | ||
| include Decidim::AttachmentMethods |
There was a problem hiding this comment.
| include Decidim::AttachmentMethods | |
| include ::Decidim::AttachmentMethods |
| # A command with all the business logic when a user creates a new collaborative draft. | ||
| class CreateCollaborativeDraft < Rectify::Command | ||
| include AttachmentMethods | ||
| include Decidim::AttachmentMethods |
There was a problem hiding this comment.
| include Decidim::AttachmentMethods | |
| include ::Decidim::AttachmentMethods |
| # A command with all the business logic when a user creates a new proposal. | ||
| class CreateProposal < Rectify::Command | ||
| include AttachmentMethods | ||
| include Decidim::AttachmentMethods |
There was a problem hiding this comment.
| include Decidim::AttachmentMethods | |
| include ::Decidim::AttachmentMethods |
Hi @tramuntanal, as far as I know, codecov only takes into account tests from each module independly (without taking into account if it's tested in another In this PR The 😁 |
|
Hi @agustibr , thanks for applying the suggestions. In my question I was asking why create a create_dummy_resource command, not the placement of its tests. Probably I'm missing something and we're misunderstanding each other 🤦 |
|
Hi @tramuntanal , The I also added this methods tests in Do you have any thoughts on how to test it in another way? |
|
Ok @agustibr lets keep |
|
@tramuntanal I've extracted it and applied them in proposals and budgets. This should be ready to merge now 😁 |
|
@agustibr there's a test related to translations failing. I guess you can solve it with |
|
well, I'll try to manage it while merging |
|
Ok, thanks @tramuntanal 👍 |
* Fix Js bundle sanity * add admin resource gallery examples * Apply suggested changes by decidim/core * fix stylelint issues * refix specs * Add decidm-core specs for GalleryMethods and AttachmentMethods. * padding when project card has no image * Update Changelog * feat(budgets): create ProjectListItemCell * move AttachmentMethods, GalleryMethods and related out of Proposals to use it in Budgets * Project's card with image and description * Admin can manage image gallery in projects
* Fix Js bundle sanity * add admin resource gallery examples * Apply suggested changes by decidim/core * fix stylelint issues * refix specs * Add decidm-core specs for GalleryMethods and AttachmentMethods. * padding when project card has no image * Update Changelog * feat(budgets): create ProjectListItemCell * move AttachmentMethods, GalleryMethods and related out of Proposals to use it in Budgets * Project's card with image and description * Admin can manage image gallery in projects
|
Squashed and merged to |
* develop: (29 commits) Update Conversations design with decidim-design UI (decidim#6008) Add counter of active users to admin dashboard (decidim#5907) Show activity graphs on admin dashboard (decidim#6030) Update sassc gem version (decidim#6062) Fix generator Gemfile after puma upgrade (decidim#6060) New Crowdin translations (decidim#6059) Add Slovak as a new language (decidim#6039) Remove all tests for i18n PRs (decidim#6061) Update move up and down buttons after dragging questions when managing questionnaire (decidim#5947) Fix using Decidim as a provider for omniauth authentication (decidim#6042) Add redesign for responsive public profile navigation tabs (decidim#6032) Add versioning pages to initiatives (decidim#5935) Notify users when roles get assigned (decidim#5886) Improve the budget page and the project card (decidim#5809) New Crowdin translations (decidim#6050) New Crowdin translations (decidim#6046) Ignore jobs on locales branches (decidim#6047) Automatic task for deleting Meeting Inscription data (decidim#5989) New Crowdin translations (decidim#5877) Ignore builds on Crowdin PRs (decidim#6037) ...
🎩 What? Why?
📌 Related Issues
📋 Subtasks
CHANGELOGentrydecidim-proposalstodecidim-coreso they can be used indecidim-budgets, and share the functionality.📷 Screenshots (optional)

- Project cards with image and description: