Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ID23. No minimal character for suggestions #47

Open
4 tasks done
paarals opened this issue Jun 13, 2023 · 1 comment
Open
4 tasks done

ID23. No minimal character for suggestions #47

paarals opened this issue Jun 13, 2023 · 1 comment
Assignees

Comments

@paarals
Copy link

paarals commented Jun 13, 2023

Currently, suggestion have validations on the minimum and maximum amount of characters allowed that are hardcoded:
https://github.com/openpoke/decidim-module-participatory-documents/blob/78d146304430b08574e78d58d69d684abfc2d630/app/forms/decidim/participatory_documents/suggestion_form.rb#L9

We need to make it configurable at the module configuration level and also at the component level, something like the number of chars allowed in the comments for the proposals component:
image

module Decidim
  # This namespace holds the logic of the `decidim-participatory_documents` module.
  module ParticipatoryDocuments
    include ActiveSupport::Configurable

    # ..desc
    config_accessor :min_suggestion_length do
      5
    end
...
  end
end

Tasks:

  • Add global configuration option for minimal/maximum suggestion length. Defaults are 5/500
  • Add component configuration for minimal/maximum suggestion length. Defaults to the configured in the module.
  • Add a readme description of the option (or at least a todo)
  • Specs
@paarals
Copy link
Author

paarals commented Jun 13, 2023

awesome must limited also suggestions characters (like letterbox)

@paarals paarals changed the title no minimal character for inputs ID23. No minimal character for suggestions Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: QA Testing
Development

No branches or pull requests

2 participants