Skip to content

Conversation

@froger
Copy link
Contributor

@froger froger commented Jul 8, 2024

🎩 What? Why?
This PR gives admins the ability to define as many private fields as are considered necessary, and also delete the fields defined as private in the proposals component at the end of the process, without deleting the rest of the content proposal or the authorship.

📌 Related Issues
Same as #307, but using a branch where decidim-awesome contributors can make updates.
Related to #?
Fixes # Add private fields to the Proposals component

Testing

📷 Screenshots
image
proposal private fields menu
image
Disclosure for private fields

♥️ Thank you!

rsdeus and others added 30 commits March 2, 2023 12:14
* New translations en.yml (Czech)

* New translations en.yml (Czech)
* add admin config option in proposals

* add amendments controller concern

* limit amendments on controller

* limit only new and create methods

* add modal explanation window

* do not show modal if amendments limit disabled

* add test cases

* fx locales

* add readme

* fix locales

* remove quotes

* remove space

* New Crowdin updates (#264)

* New translations en.yml (Romanian)

* New translations en.yml (French)

* New translations en.yml (Spanish)

* New translations en.yml (Catalan)

* New translations en.yml (Czech)

* New translations en.yml (German)

* New translations en.yml (Basque)

* New translations en.yml (Hungarian)

* New translations en.yml (Italian)

* New translations en.yml (Dutch)

* New translations en.yml (Swedish)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.yml (French)

* New translations en.yml (French)

* New translations en.yml (Czech)

* New translations en.yml (French)

* New translations en.yml (Spanish)

* New translations en.yml (Catalan)

* New translations en.yml (Czech)

* New translations en.yml (German)

* New translations en.yml (Japanese)

* New translations en.yml (German)

* New translations en.yml (Romanian)

* New translations en.yml (Basque)

* New translations en.yml (Dutch)

* New translations en.yml (Swedish)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.yml (Hungarian)

* New translations en.yml (German)

* New translations en.yml (French)

* New translations en.yml (Spanish)

* New translations en.yml (Catalan)

* New translations en.yml (German)

* New translations en.yml (French)

* New translations en.yml (Spanish)

* New translations en.yml (Catalan)

* New translations en.yml (German)

* New translations en.yml (French)

* New translations en.yml (Japanese)

* New translations en.yml (Czech)

* New translations en.yml (Japanese) (#269)

* skip hidden emendations

---------

Co-authored-by: PokeCode Bot <[email protected]>
* fix hidden images in public proposals

* fix offences

* fix 27 configuration

* fix overrides
@codecov
Copy link

codecov bot commented Jul 23, 2024

Codecov Report

Attention: Patch coverage is 53.93586% with 158 lines in your changes missing coverage. Please review.

Project coverage is 67.87%. Comparing base (a851688) to head (457bd45).
Report is 60 commits behind head on develop.

Files Patch % Lines
...m_awesome/proposals/proposal_serializer_methods.rb 28.94% 27 Missing ⚠️
...m_awesome/proposals/application_helper_override.rb 8.69% 21 Missing ⚠️
...decidim_awesome/add_proposal_type_custom_fields.rb 43.33% 17 Missing ⚠️
...cidim/decidim_awesome/has_proposal_extra_fields.rb 36.00% 16 Missing ⚠️
...forms/decidim/decidim_awesome/admin/config_form.rb 17.64% 14 Missing ⚠️
...idim/decidim_awesome/amendments_helper_override.rb 8.33% 11 Missing ⚠️
...awesome/api/types/translated_custom_fields_type.rb 64.00% 9 Missing ⚠️
..._awesome/proposals/proposal_serializer_override.rb 57.89% 8 Missing ⚠️
lib/decidim/decidim_awesome/engine.rb 76.47% 8 Missing ⚠️
...wesome/proposals/admin/update_proposal_override.rb 78.57% 3 Missing ⚠️
... and 13 more

❗ There is a different number of reports uploaded between BASE (a851688) and HEAD (457bd45). Click for more details.

HEAD has 6 uploads less than BASE
Flag BASE (a851688) HEAD (457bd45)
8 2
Additional details and impacted files
@@             Coverage Diff              @@
##           develop     #314       +/-   ##
============================================
- Coverage    96.02%   67.87%   -28.15%     
============================================
  Files           97       75       -22     
  Lines         2440     2014      -426     
============================================
- Hits          2343     1367      -976     
- Misses          97      647      +550     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@microstudi microstudi merged commit 57125e4 into develop Jul 28, 2024
@microstudi microstudi deleted the feat/awesome_decidim_private_fields branch July 28, 2024 20:10
antopalidi pushed a commit that referenced this pull request Aug 8, 2024
* admin form_builder private fields

* chore: CustomFieldsBuilders is a [public, private] array

* fixup! chore: CustomFieldsBuilders is a [public, private] array

* refacto: CustomFieldsBuilders is a hash of editor

* chore: handle renaming key with private fields

* logs: remove debugging

* chore: show private fields form

* chore: show private fields on create form

* chore: display private field editors in proposals

* chore: save private body in DB and display it admin side

* fix: migration on decidim 0.24

* fix: more robust way to know if a proposal is new

* fix: edit proposal private fields

* wip: move 024 fixes to 026

* chore: improve UX on editor

* fix: export custom fields

* compat: simple_proposal fields

* fix: private fields isolation

* New Crowdin updates (#294)

* New translations en.yml (Czech)

* New translations en.yml (Czech)

* Allow to limit non-accepted amendments in proposals (#261)

* add admin config option in proposals

* add amendments controller concern

* limit amendments on controller

* limit only new and create methods

* add modal explanation window

* do not show modal if amendments limit disabled

* add test cases

* fx locales

* add readme

* fix locales

* remove quotes

* remove space

* New Crowdin updates (#264)

* New translations en.yml (Romanian)

* New translations en.yml (French)

* New translations en.yml (Spanish)

* New translations en.yml (Catalan)

* New translations en.yml (Czech)

* New translations en.yml (German)

* New translations en.yml (Basque)

* New translations en.yml (Hungarian)

* New translations en.yml (Italian)

* New translations en.yml (Dutch)

* New translations en.yml (Swedish)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.yml (French)

* New translations en.yml (French)

* New translations en.yml (Czech)

* New translations en.yml (French)

* New translations en.yml (Spanish)

* New translations en.yml (Catalan)

* New translations en.yml (Czech)

* New translations en.yml (German)

* New translations en.yml (Japanese)

* New translations en.yml (German)

* New translations en.yml (Romanian)

* New translations en.yml (Basque)

* New translations en.yml (Dutch)

* New translations en.yml (Swedish)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.yml (Hungarian)

* New translations en.yml (German)

* New translations en.yml (French)

* New translations en.yml (Spanish)

* New translations en.yml (Catalan)

* New translations en.yml (German)

* New translations en.yml (French)

* New translations en.yml (Spanish)

* New translations en.yml (Catalan)

* New translations en.yml (German)

* New translations en.yml (French)

* New translations en.yml (Japanese)

* New translations en.yml (Czech)

* New translations en.yml (Japanese) (#269)

* skip hidden emendations

---------

Co-authored-by: PokeCode Bot <[email protected]>

* fix hidden images in public proposals (#301)

* fix hidden images in public proposals

* fix offences

* fix 27 configuration

* fix overrides

* fix: default to english on custom proposal fields

* lint: automatic rubocop corrections

* lint: fix offenses

* fix: don't update custom_fields_renderer

* fix: en locales

* refactor: rename export name for explicit trad

* New Crowdin updates (#303)

* New translations en.yml (French)

* New translations en.yml (Spanish)

* New translations en.yml (Catalan)

* New translations en.yml (Czech)

* New translations en.yml (German)

* New translations en.yml (Italian)

* New translations en.yml (Japanese)

* chore: move private_fields to decidim_awesome_proposal_extra_fields

* fix: rubocop ofenses

* clean PR

* chore: handle empty fieldsets

* chore: improve admin readability

* chore: remove cards where it makes no sense to have card

* chore: encrypt private data

* revert: leave package-lock untouch

* fixup! revert: leave package-lock untouch

* fix: rubocop

* chore: prettier on eslint on packs

* fix: tests

* fix: rubocop

* add proposal_custom_fields submenu

* add proposal_private_custom_fields view

* delete unused migration

* fix rubocop

* add disclosure for proposal_private_custom_fields

* apply styles to proposal_private_custom_fields

* refactor views

* use standard attribute encryptors

* add custom fields specs

* remove wrong deface

* fix styles on form

* clean form

* add commands specs

* fix rendering

* fix javascript

* ffi

* summary fixes

* fix more specs

* convert to polymorphic

* fix specs, fix amendments

* fix specs

* fix serialzier specs

* fix export specs

* version bump

* readme image

* add private display in admin

* fix checksums

* add notes export

* handle translations

* add docs

* changelog

---------

Co-authored-by: Renato <[email protected]>
Co-authored-by: Hadrien Froger <[email protected]>
Co-authored-by: PokeCode Bot <[email protected]>
Co-authored-by: Ivan Vergés <[email protected]>
Co-authored-by: elviabth <[email protected]>
microstudi added a commit that referenced this pull request Aug 19, 2024
* Add private fields to proposal components (#314)

* admin form_builder private fields

* chore: CustomFieldsBuilders is a [public, private] array

* fixup! chore: CustomFieldsBuilders is a [public, private] array

* refacto: CustomFieldsBuilders is a hash of editor

* chore: handle renaming key with private fields

* logs: remove debugging

* chore: show private fields form

* chore: show private fields on create form

* chore: display private field editors in proposals

* chore: save private body in DB and display it admin side

* fix: migration on decidim 0.24

* fix: more robust way to know if a proposal is new

* fix: edit proposal private fields

* wip: move 024 fixes to 026

* chore: improve UX on editor

* fix: export custom fields

* compat: simple_proposal fields

* fix: private fields isolation

* New Crowdin updates (#294)

* New translations en.yml (Czech)

* New translations en.yml (Czech)

* Allow to limit non-accepted amendments in proposals (#261)

* add admin config option in proposals

* add amendments controller concern

* limit amendments on controller

* limit only new and create methods

* add modal explanation window

* do not show modal if amendments limit disabled

* add test cases

* fx locales

* add readme

* fix locales

* remove quotes

* remove space

* New Crowdin updates (#264)

* New translations en.yml (Romanian)

* New translations en.yml (French)

* New translations en.yml (Spanish)

* New translations en.yml (Catalan)

* New translations en.yml (Czech)

* New translations en.yml (German)

* New translations en.yml (Basque)

* New translations en.yml (Hungarian)

* New translations en.yml (Italian)

* New translations en.yml (Dutch)

* New translations en.yml (Swedish)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.yml (French)

* New translations en.yml (French)

* New translations en.yml (Czech)

* New translations en.yml (French)

* New translations en.yml (Spanish)

* New translations en.yml (Catalan)

* New translations en.yml (Czech)

* New translations en.yml (German)

* New translations en.yml (Japanese)

* New translations en.yml (German)

* New translations en.yml (Romanian)

* New translations en.yml (Basque)

* New translations en.yml (Dutch)

* New translations en.yml (Swedish)

* New translations en.yml (Portuguese, Brazilian)

* New translations en.yml (Hungarian)

* New translations en.yml (German)

* New translations en.yml (French)

* New translations en.yml (Spanish)

* New translations en.yml (Catalan)

* New translations en.yml (German)

* New translations en.yml (French)

* New translations en.yml (Spanish)

* New translations en.yml (Catalan)

* New translations en.yml (German)

* New translations en.yml (French)

* New translations en.yml (Japanese)

* New translations en.yml (Czech)

* New translations en.yml (Japanese) (#269)

* skip hidden emendations

---------

Co-authored-by: PokeCode Bot <[email protected]>

* fix hidden images in public proposals (#301)

* fix hidden images in public proposals

* fix offences

* fix 27 configuration

* fix overrides

* fix: default to english on custom proposal fields

* lint: automatic rubocop corrections

* lint: fix offenses

* fix: don't update custom_fields_renderer

* fix: en locales

* refactor: rename export name for explicit trad

* New Crowdin updates (#303)

* New translations en.yml (French)

* New translations en.yml (Spanish)

* New translations en.yml (Catalan)

* New translations en.yml (Czech)

* New translations en.yml (German)

* New translations en.yml (Italian)

* New translations en.yml (Japanese)

* chore: move private_fields to decidim_awesome_proposal_extra_fields

* fix: rubocop ofenses

* clean PR

* chore: handle empty fieldsets

* chore: improve admin readability

* chore: remove cards where it makes no sense to have card

* chore: encrypt private data

* revert: leave package-lock untouch

* fixup! revert: leave package-lock untouch

* fix: rubocop

* chore: prettier on eslint on packs

* fix: tests

* fix: rubocop

* add proposal_custom_fields submenu

* add proposal_private_custom_fields view

* delete unused migration

* fix rubocop

* add disclosure for proposal_private_custom_fields

* apply styles to proposal_private_custom_fields

* refactor views

* use standard attribute encryptors

* add custom fields specs

* remove wrong deface

* fix styles on form

* clean form

* add commands specs

* fix rendering

* fix javascript

* ffi

* summary fixes

* fix more specs

* convert to polymorphic

* fix specs, fix amendments

* fix specs

* fix serialzier specs

* fix export specs

* version bump

* readme image

* add private display in admin

* fix checksums

* add notes export

* handle translations

* add docs

* changelog

---------

Co-authored-by: Renato <[email protected]>
Co-authored-by: Hadrien Froger <[email protected]>
Co-authored-by: PokeCode Bot <[email protected]>
Co-authored-by: Ivan Vergés <[email protected]>
Co-authored-by: elviabth <[email protected]>

* fix engine syntax

* Add clear old private data controller (#316)

* add maintenance controller

* standarize views

* fix gemfile

* fix gemfile

* fix gemfile

* add presenters

* add action log

* add specs

* add specs

* add private data info

* add specs

* add last specs

* fix spec

* fix syntax

* fix erb

* fix tests for: commands, controllers

* fix tests, menu, images in editor

* fix spec/lib

* fix spec.permissions

* fix presenter

* fix modals

* add x86_64-linux to platforms, change icons

* Gemfile.lock

* Gemfile.lock

* change app version in Gemfile.legacy.lock

* fix rubocop

* fix stylelint

* erblint

* change icons

* fix text_editor

* refactoring render_proposal_custom_fields_override

* fix menu, icons

* remove breadcrumb

* remove ContentSecurityPolicy

* fix menu hacks

* fix edit proposal spec

* fix custom fields form

* fix specs

* fix AmendmentsHelperOverride

* fix spec javascript config vars

* fix spec

* fix npm lint

* fix awesome_summary_spec

* fix controllers specs

* fix menu, classes, titles

* controller spec

* fix tests, add class to label editor

* fix js, specs

* fix tests

* fix test

* fix overrides and old javascript

* fix auto_edit.js

* fix override for drafts

* fix voting spec

* fix styles

* change public styles

* change public styles

* remove apply

* fix script

* lint & 26

* fix version

* fix autoedit

* downgrade activrecord syntax

* readd css rule

---------

Co-authored-by: hfroger <[email protected]>
Co-authored-by: Renato <[email protected]>
Co-authored-by: Hadrien Froger <[email protected]>
Co-authored-by: PokeCode Bot <[email protected]>
Co-authored-by: Ivan Vergés <[email protected]>
Co-authored-by: elviabth <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants